diff --git a/.changelog/7923.txt b/.changelog/7923.txt new file mode 100644 index 00000000000..ecb08342d1b --- /dev/null +++ b/.changelog/7923.txt @@ -0,0 +1,6 @@ +```release-note:bug +storage: fixed inconsistent final plan when labels are added to `google_storage_bucket` +``` +```release-note:bug +dataflow: fixed inconsistent final plan when labels are added to `google_dataflow_job` +``` diff --git a/google/resource_dataflow_job.go b/google/resource_dataflow_job.go index f781d88c2ce..b840342a629 100644 --- a/google/resource_dataflow_job.go +++ b/google/resource_dataflow_job.go @@ -119,6 +119,7 @@ func ResourceDataflowJob() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, + Computed: true, DiffSuppressFunc: resourceDataflowJobLabelDiffSuppress, Description: `User labels to be specified for the job. Keys and values should follow the restrictions specified in the labeling restrictions page. NOTE: Google-provided Dataflow templates often provide default labels that begin with goog-dataflow-provided. Unless explicitly set in config, these labels will be ignored to prevent diffs on re-apply.`, }, diff --git a/google/resource_storage_bucket.go b/google/resource_storage_bucket.go index ed50dcba6c4..0470375598e 100644 --- a/google/resource_storage_bucket.go +++ b/google/resource_storage_bucket.go @@ -84,6 +84,7 @@ func ResourceStorageBucket() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, + Computed: true, // GCP (Dataplex) automatically adds labels DiffSuppressFunc: resourceDataplexLabelDiffSuppress, Elem: &schema.Schema{Type: schema.TypeString},