terradart_google 0.6.0-dev copy "terradart_google: ^0.6.0-dev" to clipboard
terradart_google: ^0.6.0-dev copied to clipboard

terradart curated GCP factory wrappers — 71 google_* resources + 1 data source (Compute, BigQuery, KMS, Cloud Storage, DNS, Cloud Run v2, Logging, Monitoring, Pub/Sub, Cloud Tasks, Secret Manager, Clo [...]

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
0
points
399
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

terradart curated GCP factory wrappers — 71 google_* resources + 1 data source (Compute, BigQuery, KMS, Cloud Storage, DNS, Cloud Run v2, Logging, Monitoring, Pub/Sub, Cloud Tasks, Secret Manager, Cloud Scheduler, IAM, Cloud SQL, Service Networking) for Dart-first Terraform stacks.

Repository (GitHub)
View/report issues

Topics

#terraform #infrastructure #codegen #google-cloud

License

unknown (license)

Dependencies

meta, terradart_core

More

Packages that depend on terradart_google