GcsBackend class final
terraform { backend "gcs" { ... } } configuration.
Core ships the three backends that need no provider knowledge to
configure: GcsBackend, S3Backend, and LocalBackend. Anything
else (Terraform Cloud, Consul, ...) implements StackBackend in the
caller — synth's TfJsonEncoder has a generic path for that.
TfJsonEncoder.terraformBlock special-cases GcsBackend because it
predates the generic path; the emitted JSON is the same either way.
Every field is optional, so a partial configuration — the block with
the values supplied at init time instead (terraform init -backend-config=bucket=..., or a -backend-config=FILE) — is
expressible: const GcsBackend() emits backend "gcs" {}.
- Implemented types
- Annotations
-
- @immutable
Constructors
- GcsBackend({String? bucket, String? prefix})
-
const
Properties
- backendType → String
-
Backend type tag, e.g.
'gcs','s3','local'. Synth uses this as the JSON key underterraform.backend.<type>.no setteroverride - bucket → String?
-
GCS bucket holding the Terraform state file, or
nullfor a partial configuration that supplies it with-backend-config.final - hashCode → int
-
The hash code for this object.
no setterinherited
- prefix → String?
-
Optional prefix inside the bucket. Defaults to
defaulton the Terraform side; we omit the field entirely if unset so the user's existing state path isn't accidentally prefixed.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toTfJson(
) → Map< String, Object?> -
Backend-specific config block contents (bucket, prefix, etc.).
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited