Skip to content

Migrating

Read this page before bumping terradart_google across minor lines or when a release note calls out breaking API changes.

The canonical, full migration history lives in the repo: MIGRATING.md on GitHub.

0.12.11 → 0.12.12 (sealed exactly-one slots)

Section titled “0.12.11 → 0.12.12 (sealed exactly-one slots)”

0.12.12 enforces GCP exactly_one_of groups at compile time on seven existing factories. Optional per-block params (allow / deny, httpsHealthCheck, query, filename, …) become a single required sealed virtual slot (rulePolicy, protocol, jobConfiguration, buildSpec, …).

Bump lockstep:

dependencies:
terradart_core: ^0.12.12
terradart_google: ^0.12.12
FactoryBeforeAfter
GoogleComputeFirewallallow: / deny:rulePolicy:
GoogleComputeHealthCheckhttpsHealthCheck: / …protocol:
GoogleComputeRegionHealthCheckper-protocol optional blocksprotocol:
GoogleMonitoringUptimeCheckConfigmonitoredResource: / …target:
GoogleBigqueryJobquery: / load: / …jobConfiguration:
GoogleBigqueryConnectioncloudSql: / aws: / …backend:
GoogleCloudbuildTriggerfilename: / build: / …buildSpec:

Full tables and before/after examples: MIGRATING.md — 0.12.11 → 0.12.12.


Read this section before bumping terradart_google from 0.12.9 to 0.12.10 (or any ^0.12.10 caret that resolves to 0.12.10+). Patch releases within 0.12.10 are additive only; the breaking surface below landed in 0.12.10.

Bump all workspace packages together:

dependencies:
terradart_core: ^0.12.10
terradart_google: ^0.12.10

Check pub.dev for the latest 0.12.x patch.

terradart_google now uses typed enums and nested helper classes wherever the Terraform provider schema exposes a finite set of string values or a structured nested block. Fields that used to accept TfArg<String> or TfArg<Map<String, dynamic>>? may now require enum constants or helper encode() types.

dart analyze surfaces most mismatches immediately — string literals that compiled on 0.12.9 no longer type-check.

FactoryFieldEnum
GoogleBigqueryDatapolicyDataPolicydataPolicyTypeBigqueryDatapolicyDataPolicyType
GoogleBigqueryReservationAssignmentjobTypeBigqueryReservationAssignmentJobType
GoogleComputeServiceAttachmentconnectionPreferenceServiceAttachmentConnectionPreference
GoogleComputeRegionSecurityPolicytypeRegionSecurityPolicyType
GoogleComputeRegionSslPolicyprofile / minTlsVersionRegionSslPolicyProfile / RegionSslPolicyMinTlsVersion
GoogleComputeTargetTcpProxyproxyHeaderTargetTcpProxyProxyHeader
GoogleComputeTargetSslProxyproxyHeaderTargetSslProxyProxyHeader
GoogleComputeRegionTargetTcpProxyproxyHeaderRegionTargetTcpProxyProxyHeader
GoogleCloudTasksQueuedesiredStateCloudTasksQueueDesiredState
GoogleLoggingSavedQueryvisibilityLoggingSavedQueryVisibility
GoogleMonitoringSlocalendarPeriodMonitoringSloCalendarPeriod
GoogleStorageHmacKeystateStorageHmacKeyState
GoogleKmsCryptoKeyVersionstateKmsCryptoKeyVersionState
GoogleSecretManagerSecretVersiondeletionPolicySecretManagerSecretVersionDeletionPolicy
GoogleComputeInstanceGroupManagerlistManagedInstancesResultsInstanceGroupManagerListManagedInstancesResults
GoogleComputeRegionInstanceGroupManagerlistManagedInstancesResultsRegionInstanceGroupManagerListManagedInstancesResults
GoogleSqlUserdeletionPolicySqlUserDeletionPolicy

Optional Analytics Hub discoveryType fields use BigqueryAnalyticsHubDataExchangeDiscoveryType / BigqueryAnalyticsHubListingDiscoveryType.

Factories introduced in 0.12.10 (for example GoogleDnsRecordSet.type, GoogleCloudRunV2WorkerPool.launchStage) ship as enums from day one — there is no prior String API to migrate.

FactorySlotHelper / enum
GoogleComputeRouterbgpComputeRouterBgp / ComputeRouterBgpAdvertiseMode
GoogleComputeSecurityPolicyRulematch / rateLimitOptionsComputeSecurityPolicyRule* types
GoogleComputeRegionSecurityPolicyRulematch / rateLimitOptionsComputeRegionSecurityPolicyRule* types
GoogleEventarcMessageBus / GoogleEventarcGoogleApiSource / GoogleEventarcPipelineloggingConfigEventarcMessageBusLoggingConfig / EventarcMessageBusLogSeverity
GoogleComputeInstance / GoogleComputeInstanceTemplatenetworkPerformanceConfigComputeInstanceNetworkPerformanceConfigTotalEgressBandwidthTier
GoogleComputeBackendServicelocalityLbPoliciesLocalityLbPolicy
GoogleComputeRegionSecurityPolicyrules / advancedOptionsConfig / …ComputeRegionSecurityPolicy* helpers
GoogleComputeUrlMap / GoogleComputeRegionUrlMaproute actions / cache policy*UrlMapRouteAction / *UrlMapCacheMode
GoogleDnsPolicyalternativeNameServerConfigDnsPolicyAlternativeNameServerConfig
GoogleDnsRecordSetroutingPolicyDnsRecordSetRoutingPolicy*
GoogleDnsResponsePolicyRulelocalDataDnsResponsePolicyRuleLocalData
GooglePubsubTopicschemaSettings / ingestionDataSourceSettingsPubsubTopic* helpers
GoogleGkeHubFleetdefaultClusterConfigGkeHubFleetDefaultClusterConfig
GoogleGkeBackupBackupPlan / GoogleGkeBackupRestorePlanschedule / restore configGkeBackup* helpers
GoogleCloudRunV2WorkerPooltemplate / scalingCloudRunV2WorkerPool* helpers
GoogleBigqueryDatapolicyDataPolicydataMaskingPolicyBigqueryDatapolicyDataPolicyDataMaskingPolicy
GoogleArtifactRegistryRepositoryremote APT/YUM basesArtifactRegistryAptRepositoryBase / ArtifactRegistryYumRepositoryBase
0.12.9
dataPolicyType: TfArg.literal('DATA_MASKING_POLICY'),
connectionPreference: TfArg.literal('ACCEPT_AUTOMATIC'),
// 0.12.10
dataPolicyType: TfArg.literal(BigqueryDatapolicyDataPolicyType.dataMaskingPolicy),
connectionPreference:
TfArg.literal(ServiceAttachmentConnectionPreference.acceptAutomatic),

For nested blocks, replace raw maps with helper constructors and call .encode() only when you hand-roll arg maps — curated factories accept the helper types directly on constructor parameters.

GoogleComputeRegionSecurityPolicy now expects embedded rules on the policy resource. Standalone GoogleComputeRegionSecurityPolicyRule remains for additional rules added after the policy exists.

Waves 23–24 shipped ten new curated factories in 0.12.10. They are additive — only adopt them when you need the capability. See Waves 23–24 for the factory list and runnable examples.

Earlier breaking changes (WIF provider sealed trustSource, terradart codegen removal, Stack class modifiers, and more) are documented in MIGRATING.md.