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

terradart hand-written, blessed Tier 1 GCP factories (Pub/Sub, Cloud Tasks, Secret Manager, Cloud Scheduler, IAM, service accounts) for Dart-first Terraform stacks.

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 hand-written, blessed Tier 1 GCP factories (Pub/Sub, Cloud Tasks, Secret Manager, Cloud Scheduler, IAM, service accounts) for Dart-first Terraform stacks.

Repository (GitHub)
View/report issues

Topics

#terraform #infrastructure #codegen #google-cloud

License

unknown (license)

Dependencies

meta, schemantic, terradart_annotations, terradart_core

More

Packages that depend on terradart_google