terradart_google 0.9.0 copy "terradart_google: ^0.9.0" to clipboard
terradart_google: ^0.9.0 copied to clipboard

terradart curated GCP factory wrappers — 118 google_* resources + 1 data source (Compute + LB stack, Cloud Build, Artifact Registry, Eventarc, BigQuery + Data ops, KMS, Cloud Storage + notifications, [...]

example/main.dart

import 'dart:convert' as convert;

import 'package:terradart_core/terradart_core.dart';
import 'package:terradart_google/terradart_google.dart';

/// Minimal example: a single Pub/Sub topic, synthesized to Terraform JSON.
class HelloStack extends Stack {
  HelloStack({required String projectId})
      : super(
          providers: [
            GoogleProvider(project: projectId, region: 'us-central1')
          ],
        ) {
    add(GooglePubsubTopic(localName: 'hello', name: TfArg.literal('hello')));
  }

  @override
  Future<void> synth({required String outDir}) async {
    final result = StackSynth.synth(this);
    print(const convert.JsonEncoder.withIndent('  ').convert(result.tfJson));
  }
}

void main() async {
  await HelloStack(projectId: 'YOUR-PROJECT-ID').synth(outDir: '.');
}
0
likes
150
points
399
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

terradart curated GCP factory wrappers — 118 google_* resources + 1 data source (Compute + LB stack, Cloud Build, Artifact Registry, Eventarc, BigQuery + Data ops, KMS, Cloud Storage + notifications, DNS, Cloud Run v2, Logging + sinks, Monitoring + uptime + SLO, Pub/Sub + schema, Cloud Tasks, Secret Manager, Cloud Scheduler, IAM, Cloud SQL, Service Networking) for Dart-first Terraform stacks.

Topics

#terraform #infrastructure #codegen #google-cloud

License

Apache-2.0 (license)

Dependencies

meta, terradart_core

More

Packages that depend on terradart_google