Skip to content

Commit

Permalink
schema/backends: Reflect 1.4 changes in gcs (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko authored May 31, 2023
1 parent b8753cb commit d58b619
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/schema/backends/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,20 @@ func gcsBackend(v *version.Version) *schema.BodySchema {
delete(bodySchema.Attributes, "path")
}

if v.GreaterThanOrEqual(v1_4_0) {
// https://github.com/hashicorp/terraform/commit/89ef27d3
bodySchema.Attributes["storage_custom_endpoint"] = &schema.AttributeSchema{
Constraint: schema.LiteralType{Type: cty.String},
IsOptional: true,
Description: lang.Markdown("A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (`/storage/v1/b`, [see here](https://cloud.google.com/storage/docs/json_api/v1/buckets/get#http-request))."),
}
// https://github.com/hashicorp/terraform/commit/d43ec0f30
bodySchema.Attributes["kms_encryption_key"] = &schema.AttributeSchema{
Constraint: schema.LiteralType{Type: cty.String},
IsOptional: true,
Description: lang.Markdown("A Cloud KMS key ('customer managed encryption key') used when reading and writing state files in the bucket. Format should be 'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}'."),
}
}

return bodySchema
}

0 comments on commit d58b619

Please sign in to comment.