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

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

terradart_google #

Curated GCP factory wrappers for terradart. 28 resources + 1 data source, each shipping with typed Dart enums for fixed-value-set fields, typed helper classes for every nested block, and golden-tested deterministic codegen.

Resources #

Compute (5) #

  • GoogleComputeNetwork, GoogleComputeAddress, GoogleComputeSubnetwork, GoogleComputeFirewall, GoogleComputeInstance (typed BootDisk, NetworkInterface, Scheduling, ShieldedInstanceConfig, ConfidentialInstanceConfig, etc.).

BigQuery (2) #

  • GoogleBigqueryDataset (8-variant sealed Access hierarchy covering UserByEmail / GroupByEmail / SpecialGroup / Domain / IamMember / View / Dataset / Routine).
  • GoogleBigqueryTable (typed TimePartitioning, RangePartitioning, MaterializedView, ExternalDataConfiguration + per-format sub-helpers, TableConstraints).

Cloud KMS (2) #

  • GoogleKmsKeyRing, GoogleKmsCryptoKey (typed KmsKeyPurpose, KmsProtectionLevel, VersionTemplate).

Cloud Storage (2) #

  • GoogleStorageBucket (typed BucketStorageClass, LifecycleRule, LifecycleAction, LifecycleCondition, Versioning, RetentionPolicy, Autoclass, Encryption, SoftDeletePolicy, IpFilter, etc.).
  • GoogleStorageBucketObject (sealed BucketObjectContent for source / content exactly-one-of; typed BucketObjectStorageClass, CustomerEncryption, BucketObjectRetention).

Cloud DNS (1) #

  • GoogleDnsManagedZone (typed DnsZoneVisibility, DnssecState, DnssecKeyAlgorithm, DnssecKeyType, ForwardingPath; helpers for private visibility / DNSSEC / peering / forwarding / cloud logging configs).

Cloud Run v2 (1) #

  • GoogleCloudRunV2Service (sealed EnvVarSource for env literal vs. secret_key_ref; sealed VolumeSource for the 5 volume sources; typed Ingress, LaunchStage, ExecutionEnvironment, ScalingMode, Template, ServiceContainer, ContainerResources, ContainerPort, VolumeMount, StartupProbe, LivenessProbe).

Cloud Logging (1) #

  • GoogleLoggingProjectSink (typed BigqueryOptions, LogSinkExclusion).

Cloud Monitoring (1) #

  • GoogleMonitoringAlertPolicy (typed Comparison, Aligner 19 variants, Reducer 14 variants, EvaluationMissingData, AlertSeverity, AlertCombiner; AlertCondition covering the 6 mutually-exclusive condition variants; AlertStrategy, NotificationRateLimit, Documentation).

Pub/Sub (4) #

  • GooglePubsubTopic, GooglePubsubSubscription (typed PushConfig, BigQueryConfig, CloudStorageConfig, DeadLetterPolicy, RetryPolicy, ExpirationPolicy, OidcToken, NoWrapper).
  • GooglePubsubTopicIamMember, GooglePubsubSubscriptionIamMember.

Cloud Tasks (2) #

  • GoogleCloudTasksQueue (typed RateLimits, RetryConfig, QueueHttpTarget, StackdriverLoggingConfig, AppEngineRoutingOverride).
  • GoogleCloudTasksQueueIamMember.

Secret Manager (3) #

  • GoogleSecretManagerSecret (sealed Replication for auto / userManaged variants).
  • GoogleSecretManagerSecretVersion (write-only secret_data_wo).
  • GoogleSecretManagerSecretIamMember.

Cloud Scheduler (1) #

  • GoogleCloudSchedulerJob (Pub/Sub / HTTP / AppEngine targets).

IAM (1) #

  • GoogleServiceAccount (pre-formatted member ref for IAM bindings).

Project enablement (1) #

  • GoogleProjectService.

Data sources (1) #

  • GoogleProject (project number lookup).

How resources are built #

The factory wrappers under lib/src/<service>/ are emitted by terradart wrap from curated overrides under terradart_codegen. They are committed to the package so consumers can depend on terradart_google directly without running any codegen themselves.

CI verifies determinism via terradart wrap --check: all 56 emitted files (28 resource Layer 2 + 28 resource Layer 1) must stay byte-identical across PRs.

For any other google_* / google-beta_* resource that isn't in the catalog above, run terradart codegen against your provider schema dump and emit bindings into your own lib/generated/ rather than depending on this package.

For the runtime side (Stack, Resource<S>, StackSynth.synth), see terradart_core. For project-level documentation, see the terradart repo README.

Installation #

dependencies:
  terradart_core: ^0.1.0-dev
  terradart_google: ^0.1.0-dev

terradart is a SemVer pre-release; explicit ^0.1.0-dev constraints are required because dart pub get skips pre-releases by default.

Usage example #

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

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'),
        location: TfArg.literal('ASIA-NORTHEAST1'),
        storageClass: TfArg.literal(BucketStorageClass.standard), // typed enum
        versioning: const Versioning(enabled: true),              // typed helper
        lifecycleRule: const [
          LifecycleRule(
            action: LifecycleAction(
              type: LifecycleActionType.setStorageClass,
              storageClass: BucketStorageClass.archive,
            ),
            condition: LifecycleCondition(age: 365),
          ),
        ],
      ),
    );
  }
}

See the 14 runnable quickstart projects under examples/ for end-to-end usage of every service.

0
likes
0
points
258
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

terradart curated GCP factory wrappers — 28 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) 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