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

Curated factory wrappers for Google Cloud resources (Compute, BigQuery, Cloud Run, Cloud SQL, Pub/Sub, Monitoring, ...) for Dart-first Terraform stacks.

terradart_google #

pub: terradart_google Dart SDK License: Apache-2.0

Curated factory wrappers for Google Cloud resources (the official hashicorp/google Terraform provider) for Dart-first Terraform stacks.

Ships 1337 curated resource factories + 461 data sources (1798 catalog entries) across per-service barrels (compute, pubsub, cloud_run, bigquery, …). The GA hashicorp/google catalog is filled.

Beta-only types live in terradart_google_beta (128 resource factories). The full factory table with example pointers is on Coverage. Discover factories programmatically via package:terradart_google/catalog.dart (terradartCatalog).

Installation #

dependencies:
  terradart_core: ^0.28.x
  terradart_google: ^0.28.x

Usage example #

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

final class AssetsStack extends Stack {
  AssetsStack({required String projectId})
      : super(providers: [
          GoogleProvider(project: projectId, region: 'asia-northeast1'),
        ]) {
    add(GoogleStorageBucket(
      localName: 'assets',
      name: TfArg.literal('my-app-assets-prod'),
      storageClass: TfArg.literal(BucketStorageClass.standard),
    ));
  }
}
// bin/infra.dart
import 'package:my_infra/assets_stack.dart';

Future<void> main() async {
  final stack = AssetsStack(projectId: 'my-project-id');
  await stack.writeTo('tf-out');
}
dart pub get
dart run bin/infra.dart
cd tf-out && terraform init && terraform apply

Register a second configuration with GoogleProvider(alias: 'eu', ...) and select it on a resource with provider: 'google.eu' — every factory and data source takes provider: (Terraform's provider meta-argument); provider: 'google-beta' puts a GA type on the beta provider.

Per-service imports (cloud_run.dart, storage.dart, …) keep IDE completion scoped. See examples/ and the pubsub quickstart for AppExport / boundary patterns.

How resources are built #

Factory wrappers under lib/src/<service>/ are emitted by terradart wrap from curated overrides in terradart_codegen. They are committed so consumers depend on terradart_google without running codegen locally.

CI verifies determinism via terradart wrap --check. Runtime primitives (Stack, TfArg, writeTo) live in terradart_core.

1
likes
160
points
827
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Curated factory wrappers for Google Cloud resources (Compute, BigQuery, Cloud Run, Cloud SQL, Pub/Sub, Monitoring, ...) for Dart-first Terraform stacks.

Repository (GitHub)
View/report issues
Contributing

Topics

#terraform #infrastructure #codegen #google-cloud

License

Apache-2.0 (license)

Dependencies

meta, terradart_core

More

Packages that depend on terradart_google