clouddeploy library

Cloud Deploy — continuous-delivery pipelines, targets, custom target types, automations, and deploy policies. Nested config blocks (serial pipeline stages, deployment targets, custom actions, automation rules, policy selectors) are passed as structured maps.

Classes

AppConstant<T>
A value the Stack hands to application code as a static const in the generated AppExports file — known when synth runs, so the app compiles against it.
AppExports
Where synth writes the Dart file application code imports: the Stack's constants, as the static const members of <name>Constants, and a typed reader of its Terraform outputs, <name>Outputs.
AttributeRef<T>
Public for sealed pattern matching, but constructor is private — only TfRef.attribute() may construct instances.
ClouddeployAutomationAdvanceRolloutRule
Typed helper for the rules.advance_rollout_rule block of google_clouddeploy_automation (derived from provider schema).
ClouddeployAutomationPromoteReleaseRule
Typed helper for the rules.promote_release_rule block of google_clouddeploy_automation (derived from provider schema).
ClouddeployAutomationRepairPhases
Exactly one of retry, rollback on the rules.repair_rollout_rule.repair_phases block of google_clouddeploy_automation: the provider rejects none and more than one, so each variant sets one of them.
ClouddeployAutomationRepairPhasesRetry
The ClouddeployAutomationRepairPhases.retry choice: sets retry.
ClouddeployAutomationRepairPhasesRollback
The ClouddeployAutomationRepairPhases.rollback choice: sets rollback.
ClouddeployAutomationRepairRolloutRule
Typed helper for the rules.repair_rollout_rule block of google_clouddeploy_automation (derived from provider schema).
ClouddeployAutomationRetry
Typed helper for the rules.repair_rollout_rule.repair_phases.retry block of google_clouddeploy_automation (derived from provider schema).
ClouddeployAutomationRollback
Typed helper for the rules.repair_rollout_rule.repair_phases.rollback block of google_clouddeploy_automation (derived from provider schema).
ClouddeployAutomationRules
Exactly one of promote_release_rule, advance_rollout_rule, repair_rollout_rule, timed_promote_release_rule on the rules block of google_clouddeploy_automation: the provider rejects none and more than one, so each variant sets one of them.
ClouddeployAutomationRulesAdvanceRolloutRule
The ClouddeployAutomationRules.advanceRolloutRule choice: sets advance_rollout_rule.
ClouddeployAutomationRulesPromoteReleaseRule
The ClouddeployAutomationRules.promoteReleaseRule choice: sets promote_release_rule.
ClouddeployAutomationRulesRepairRolloutRule
The ClouddeployAutomationRules.repairRolloutRule choice: sets repair_rollout_rule.
ClouddeployAutomationRulesTimedPromoteReleaseRule
The ClouddeployAutomationRules.timedPromoteReleaseRule choice: sets timed_promote_release_rule.
ClouddeployAutomationSelector
Typed helper for the selector block of google_clouddeploy_automation (derived from provider schema).
ClouddeployAutomationTargets
Typed helper for the selector.targets block of google_clouddeploy_automation (derived from provider schema).
ClouddeployAutomationTimedPromoteReleaseRule
Typed helper for the rules.timed_promote_release_rule block of google_clouddeploy_automation (derived from provider schema).
ClouddeployCustomTargetTypeActions
At most one of custom_actions, tasks on google_clouddeploy_custom_target_type: the provider rejects more than one, so each variant sets one of them and a null choice sets none.
ClouddeployCustomTargetTypeActionsTasks
The ClouddeployCustomTargetTypeActions.tasks choice: sets tasks.
ClouddeployCustomTargetTypeContainer
Typed helper for the tasks.deploy.container block of google_clouddeploy_custom_target_type (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployCustomTargetTypeCustomActions
Typed helper for the custom_actions block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployCustomTargetTypeCustomActionsChoice
The ClouddeployCustomTargetTypeActions.customActions choice: sets custom_actions.
ClouddeployCustomTargetTypeDeploy
Typed helper for the tasks.deploy block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployCustomTargetTypeGit
Typed helper for the custom_actions.include_skaffold_modules.git block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployCustomTargetTypeGoogleCloudBuildRepo
Typed helper for the custom_actions.include_skaffold_modules.google_cloud_build_repo block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployCustomTargetTypeGoogleCloudStorage
Typed helper for the custom_actions.include_skaffold_modules.google_cloud_storage block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployCustomTargetTypeIamBindingCondition
Typed helper for the condition block of google_clouddeploy_custom_target_type_iam_binding (derived from provider schema).
ClouddeployCustomTargetTypeIamMemberCondition
Typed helper for the condition block of google_clouddeploy_custom_target_type_iam_member (derived from provider schema).
ClouddeployCustomTargetTypeIncludeSkaffoldModules
Typed helper for the custom_actions.include_skaffold_modules block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployCustomTargetTypeRender
Typed helper for the tasks.render block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployCustomTargetTypeSource
Exactly one of git, google_cloud_storage, google_cloud_build_repo on the custom_actions.include_skaffold_modules block of google_clouddeploy_custom_target_type: the provider rejects none and more than one, so each variant sets one of them.
ClouddeployCustomTargetTypeSourceGit
The ClouddeployCustomTargetTypeSource.git choice: sets git.
ClouddeployCustomTargetTypeSourceGoogleCloudBuildRepo
The ClouddeployCustomTargetTypeSource.googleCloudBuildRepo choice: sets google_cloud_build_repo.
ClouddeployCustomTargetTypeSourceGoogleCloudStorage
The ClouddeployCustomTargetTypeSource.googleCloudStorage choice: sets google_cloud_storage.
ClouddeployCustomTargetTypeTasks
Typed helper for the tasks block of google_clouddeploy_custom_target_type (derived from provider schema).
ClouddeployDeliveryPipelineAlertPolicyChecks
Typed helper for the serial_pipeline.stages.strategy.standard.analysis.google_cloud.alert_policy_checks block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineAnalysis
Typed helper for the serial_pipeline.stages.strategy.standard.analysis block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineCanary
Typed helper for the serial_pipeline.stages.strategy.canary block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineCanaryDeployment
Typed helper for the serial_pipeline.stages.strategy.canary.canary_deployment block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineCanaryDeploymentPostdeploy
Typed helper for the serial_pipeline.stages.strategy.canary.canary_deployment.postdeploy block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineCanaryDeploymentPredeploy
Typed helper for the serial_pipeline.stages.strategy.canary.canary_deployment.predeploy block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineCloudRun
Typed helper for the serial_pipeline.stages.strategy.canary.runtime_config.cloud_run block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineContainer
Typed helper for the serial_pipeline.stages.strategy.standard.postdeploy.tasks.container block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineCustomCanaryDeployment
Typed helper for the serial_pipeline.stages.strategy.canary.custom_canary_deployment block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineCustomChecks
Typed helper for the serial_pipeline.stages.strategy.standard.analysis.custom_checks block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineDeployParameters
Typed helper for the serial_pipeline.stages.deploy_parameters block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineGatewayServiceMesh
Typed helper for the serial_pipeline.stages.strategy.canary.runtime_config.kubernetes.gateway_service_mesh block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineGoogleCloud
Typed helper for the serial_pipeline.stages.strategy.standard.analysis.google_cloud block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineIamBindingCondition
Typed helper for the condition block of google_clouddeploy_delivery_pipeline_iam_binding (derived from provider schema).
ClouddeployDeliveryPipelineIamMemberCondition
Typed helper for the condition block of google_clouddeploy_delivery_pipeline_iam_member (derived from provider schema).
ClouddeployDeliveryPipelineKubernetes
Typed helper for the serial_pipeline.stages.strategy.canary.runtime_config.kubernetes block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelinePhaseConfigs
Typed helper for the serial_pipeline.stages.strategy.canary.custom_canary_deployment.phase_configs block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelinePostdeploy
Typed helper for the serial_pipeline.stages.strategy.standard.postdeploy block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelinePredeploy
Typed helper for the serial_pipeline.stages.strategy.standard.predeploy block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineRouteDestinations
Typed helper for the serial_pipeline.stages.strategy.canary.runtime_config.kubernetes.gateway_service_mesh.route_destinations block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineRuntimeConfig
Typed helper for the serial_pipeline.stages.strategy.canary.runtime_config block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineSerialPipeline
Typed helper for the serial_pipeline block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineServiceNetworking
Typed helper for the serial_pipeline.stages.strategy.canary.runtime_config.kubernetes.service_networking block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineStages
Typed helper for the serial_pipeline.stages block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineStandard
Typed helper for the serial_pipeline.stages.strategy.standard block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineStrategy
Typed helper for the serial_pipeline.stages.strategy block of google_clouddeploy_delivery_pipeline (derived from provider schema).
ClouddeployDeliveryPipelineTask
Typed helper for the serial_pipeline.stages.strategy.standard.analysis.custom_checks.task block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineTasks
Typed helper for the serial_pipeline.stages.strategy.standard.postdeploy.tasks block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeliveryPipelineVerifyConfig
Typed helper for the serial_pipeline.stages.strategy.standard.verify_config block of google_clouddeploy_delivery_pipeline (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeployPolicyDeliveryPipeline
Typed helper for the selectors.delivery_pipeline block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyEndDate
Typed helper for the rules.rollout_restriction.time_windows.one_time_windows.end_date block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyEndTime
Typed helper for the rules.rollout_restriction.time_windows.one_time_windows.end_time block of google_clouddeploy_deploy_policy (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeployPolicyOneTimeWindows
Typed helper for the rules.rollout_restriction.time_windows.one_time_windows block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyRolloutRestriction
Typed helper for the rules.rollout_restriction block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyRules
Typed helper for the rules block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicySelectors
Typed helper for the selectors block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyStartDate
Typed helper for the rules.rollout_restriction.time_windows.one_time_windows.start_date block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyStartTime
Typed helper for the rules.rollout_restriction.time_windows.one_time_windows.start_time block of google_clouddeploy_deploy_policy (derived from provider schema). Shared by every block of this shape in the resource.
ClouddeployDeployPolicyTarget
Typed helper for the selectors.target block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyTimeWindows
Typed helper for the rules.rollout_restriction.time_windows block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployDeployPolicyWeeklyWindows
Typed helper for the rules.rollout_restriction.time_windows.weekly_windows block of google_clouddeploy_deploy_policy (derived from provider schema).
ClouddeployTargetAnthosCluster
Typed helper for the anthos_cluster block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetAnthosClusters
Typed helper for the associated_entities.anthos_clusters block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetAssociatedEntities
Typed helper for the associated_entities block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetCustomTarget
Typed helper for the custom_target block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetDefaultPool
Typed helper for the execution_configs.default_pool block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetExecutionConfigs
Typed helper for the execution_configs block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetGke
Typed helper for the gke block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetGkeClusters
Typed helper for the associated_entities.gke_clusters block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetIamBindingCondition
Typed helper for the condition block of google_clouddeploy_target_iam_binding (derived from provider schema).
ClouddeployTargetIamMemberCondition
Typed helper for the condition block of google_clouddeploy_target_iam_member (derived from provider schema).
ClouddeployTargetMultiTarget
Typed helper for the multi_target block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetPrivatePool
Typed helper for the execution_configs.private_pool block of google_clouddeploy_target (derived from provider schema).
ClouddeployTargetRun
Typed helper for the run block of google_clouddeploy_target (derived from provider schema).
DartDefineOutput
An output whose value is the client build's --dart-define file, registered with Stack.addDartDefineOutput.
Data
Base of every user-instantiable Terraform data block.
DataGoogleClouddeployCustomTargetTypeIamPolicy
Factory wrapper for google_clouddeploy_custom_target_type_iam_policy.
DataGoogleClouddeployDeliveryPipelineIamPolicy
Factory wrapper for google_clouddeploy_delivery_pipeline_iam_policy.
DataGoogleClouddeployTargetIamPolicy
Factory wrapper for google_clouddeploy_target_iam_policy.
DataRef<T>
Public for sealed pattern matching, but constructor is private — only TfRef.data() may construct instances.
EnvironmentConstant
The AppConstant.fromEnvironment choice.
GcsBackend
terraform { backend "gcs" { ... } } configuration.
GoogleClouddeployAutomation
Factory wrapper for google_clouddeploy_automation.
GoogleClouddeployCustomTargetType
Factory wrapper for google_clouddeploy_custom_target_type.
GoogleClouddeployCustomTargetTypeIamBinding
Factory wrapper for google_clouddeploy_custom_target_type_iam_binding.
GoogleClouddeployCustomTargetTypeIamMember
Factory wrapper for google_clouddeploy_custom_target_type_iam_member.
GoogleClouddeployCustomTargetTypeIamPolicy
Factory wrapper for google_clouddeploy_custom_target_type_iam_policy.
GoogleClouddeployDeliveryPipeline
Factory wrapper for google_clouddeploy_delivery_pipeline.
GoogleClouddeployDeliveryPipelineIamBinding
Factory wrapper for google_clouddeploy_delivery_pipeline_iam_binding.
GoogleClouddeployDeliveryPipelineIamMember
Factory wrapper for google_clouddeploy_delivery_pipeline_iam_member.
GoogleClouddeployDeliveryPipelineIamPolicy
Factory wrapper for google_clouddeploy_delivery_pipeline_iam_policy.
GoogleClouddeployDeployPolicy
Factory wrapper for google_clouddeploy_deploy_policy.
GoogleClouddeployTarget
Factory wrapper for google_clouddeploy_target.
GoogleClouddeployTargetIamBinding
Factory wrapper for google_clouddeploy_target_iam_binding.
GoogleClouddeployTargetIamMember
Factory wrapper for google_clouddeploy_target_iam_member.
GoogleClouddeployTargetIamPolicy
Factory wrapper for google_clouddeploy_target_iam_policy.
IgnoreAllChanges
IgnoreChanges.all.
IgnoreAttributes
IgnoreChanges.of.
IgnoreChanges
What ignore_changes covers: every attribute, or the listed ones.
InvalidDartDefineOutput
An output of Stack.addDartDefineOutput that cannot carry what it names: an output that is not registered, is sensitive or has no environment value, two outputs read from one variable, or no output at all.
InvalidLifecycle
A lifecycle block Terraform rejects: a data source (or one of its attributes) in replaceTriggeredBy, all inside IgnoreChanges.of, or a condition with an empty error message.
InvalidMoveTarget
A moved block whose to names no resource of the Stack.
InvalidTimeout
A negative timeouts duration.
LifecycleCondition
A precondition or postcondition block: Terraform fails the plan (LifecycleCondition.pre) or the apply (LifecycleCondition.post) with errorMessage when condition is false.
LifecycleOptions
lifecycle { ... } block on a resource.
LocalBackend
terraform { backend "local" { ... } } configuration.
MissingProvider
A block needs a provider configuration the Stack does not register: the provider its type implies (google for google_pubsub_topic), the one its provider meta-argument names, or one a module call passes on.
ModuleCall
A module "<localName>" { ... } call as a Dart value.
NoProviders
The Stack registers no provider, but declares resources or data sources.
ProviderConflict
Two provider registrations Terraform rejects together: two defaults of one name, a repeated alias, an alias that is not an identifier, or configurations of one name with different source / version constraints.
RefConstant<T>
The AppConstant.ref choice.
ReplaceTrigger
What lifecycle.replaceTriggeredBy lists: a resource of the Stack or an attribute getter of one. Resource and TfRef implement it; synth reports a data source or a data-source attribute as an InvalidLifecycle.
Resource
Base of every user-instantiable Terraform resource.
ResourceRef
Public for sealed pattern matching, but constructor is private — only TfRef.resource() may construct instances.
S3Backend
terraform { backend "s3" { ... } } configuration.
Sensitive<T>
What an argument Terraform marks sensitive takes: a variable, an expression or an attribute getter — a value Terraform resolves, never a Dart literal that would be written into main.tf.json.
SensitiveLiteral
A sensitive field is set to a literal, which would write the secret in plain text into main.tf.json.
Stack
User-extended IaC composition root.
StackBackend
Lightweight backend hook. Core ships GcsBackend, S3Backend, and LocalBackend; anything else implements this interface in the caller. The Stack only stores the value and exposes a discriminator for synth's terraform { backend ... } emitter.
StackProvider
Coordination interface between Stack (in this package) and concrete providers (e.g. GoogleProvider in terradart_google). Concrete providers implement every getter using their baked-in constants from Stage 2 codegen.
SynthIssue
One reason a Stack cannot be synthesized.
SynthResult
Bundle returned by StackSynth.synth.
TfAddressed
Anything that exposes a Terraform address, e.g. google_pubsub_topic.orders.
TfArg<T>
A Terraform argument: a Dart-side literal, a reference to another block's attribute (TfRef), a variable or a raw expression.
TfArgExpression<T>
A raw Terraform expression — the tf.json template string, verbatim.
TfArgLiteral<T>
TfArgVariable<T>
TfCollectionType
list(...), set(...) or map(...).
TfMoved
One moved { from = ... to = ... } block: the state object at from now belongs to the resource at to, so a rename does not become a destroy-and-create.
TfObjectType
object({ ... }).
TfOptionalType
optional(<type>[, <default>]).
TfOutput<T>
An output "<name>" { value = ... } block, registered with Stack.addOutput.
TfPrimitiveType
string, number, bool or any.
TfRef<T>
A Terraform-side reference: an attribute of a resource (AttributeRef) or a data source (DataRef), or a whole resource (ResourceRef).
TfTimeouts
timeouts { ... } on a resource or data source: how long Terraform waits for each operation before giving up.
TfTupleType
tuple([...]).
TfType
A Terraform type constraint: string, list(number), object({ name = string }).
TfVariable
One variable "<name>" { ... } declaration.
UndeclaredVariable
A TfArg.variable or var.<name> in an expression names a variable the Stack does not declare.
UnregisteredReference
A block references another block that was never registered on the Stack: built, but not passed to add(...) / addModule(...).
UnresolvableConstant
An AppConstant.ref whose value is not known at synth: the attribute is not set to a literal, is sensitive, does not match the constant's type, or belongs to a block that is not registered.
ValueConstant<T>
The AppConstant.value choice.

Enums

ResourceKind
Whether a Stack entry is a resource block or a data block in Terraform JSON.

Extension Types

ClouddeployAutomationBackoffMode
backoff_mode — derived from the provider schema description.
ClouddeployDeployPolicyActions
actions — derived from the provider schema description.
ClouddeployDeployPolicyDaysOfWeek
days_of_week — derived from the provider schema description.
ClouddeployDeployPolicyInvokers
invokers — derived from the provider schema description.
OutputEnvironment
The environment Stack.outputEnvironment returns: each variable and its value, in registration order.
RefTo
A reference to a resource of type R, for an argument that names another resource (network, vpc_id, role_arn, ...).

Extensions

RefToList on TfArg<List<RefTo<R>>>
A list-valued reference argument (security_group_ids, subnet_ids): a literal list of RefTos, or one value that is the whole list (TfArg.variable('subnet_ids'), TfArg.expression(...)).
TerraformDurationExt on Duration
Converts a Dart Duration into a Terraform duration string ("604800s").

Constants

terradartManifestVariable → const String
The environment variable the terradart command sets to the file runStack and runEnvironments describe what they wrote in.

Functions

runEnvironments<E extends Enum>(List<String> args, List<E> environments, Stack build(E env), {String dir(E env)?, String? workspace(E env)?, List<String> backendConfig(E env)?, E? defaultEnv}) → Future<void>
The entry point of a project with one Stack per environment. The environments are the members of an enum of the project's own — any names, each carrying its values — so the Stack takes a typed env and derives everything per environment from it, its backend included:
runStack(List<String> args, Stack build(), {String out = 'tf-out'}) → Future<void>
The entry point of a project with one Stack: writes it to out.

Exceptions / Errors

DuplicateModuleError
A ModuleCall registered twice under one name.
DuplicateResourceError
Thrown by Stack.add when an entry with the same (kind, terraformType, localName) triple is registered twice.
SynthException
Thrown by Stack.synth() and Stack.writeTo() when the Stack has one or more SynthIssues. Nothing is written.