Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/4209.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cloudrun: added diff suppress function for `google_cloud_run_domain_mapping` `metadata.annotations` to ignore API-set fields
```
9 changes: 5 additions & 4 deletions google/resource_cloud_run_domain_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ func resourceCloudRunDomainMapping() *schema.Resource {
project ID or project number.`,
},
"annotations": {
Type: schema.TypeMap,
Computed: true,
Optional: true,
ForceNew: true,
Type: schema.TypeMap,
Computed: true,
Optional: true,
ForceNew: true,
DiffSuppressFunc: cloudrunAnnotationDiffSuppress,
Description: `Annotations is a key value map stored with a resource that
may be set by external tools to store and retrieve arbitrary metadata. More
info: http://kubernetes.io/docs/user-guide/annotations`,
Expand Down
3 changes: 3 additions & 0 deletions google/resource_cloud_run_domain_mapping_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ resource "google_cloud_run_domain_mapping" "default" {

metadata {
namespace = "%{namespace}"
annotations = {
"run.googleapis.com/launch-stage" = "BETA"
}
}

spec {
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/cloud_run_domain_mapping.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ resource "google_cloud_run_domain_mapping" "default" {

metadata {
namespace = "my-project-name"
annotations = {
"run.googleapis.com/launch-stage" = "BETA"
}
}

spec {
Expand Down