Skip to content

Commit

Permalink
Cloudrun domain DSF (#4209) (#7764)
Browse files Browse the repository at this point in the history
* Add DSF from cloudrun annotations to domain annotation

* Add beta annotation to domain mapping test

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Nov 10, 2020
1 parent d7c5cf3 commit 5103805
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
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

0 comments on commit 5103805

Please sign in to comment.