From 61a92abb7fb38294f104858af74a0f180579cf9e Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Fri, 29 Sep 2023 18:38:08 +0000 Subject: [PATCH] Fix lables tests and apply new models to alloydb resources (#9123) Signed-off-by: Modular Magician --- .changelog/9123.txt | 3 + google-beta/provider/provider_test.go | 7 +- .../alloydb/resource_alloydb_backup.go | 161 +++++++++++++----- .../resource_alloydb_backup_generated_test.go | 4 +- .../alloydb/resource_alloydb_cluster.go | 87 ++++++---- ...resource_alloydb_cluster_generated_test.go | 4 +- .../alloydb/resource_alloydb_instance.go | 11 +- .../resource_assured_workloads_workload.go | 2 +- .../resource_bigtable_instance_test.go | 10 +- .../resource_cloudbuild_worker_pool.go | 2 +- .../resource_cloudbuildv2_connection.go | 2 +- .../resource_cloudbuildv2_repository.go | 2 +- .../resource_clouddeploy_delivery_pipeline.go | 4 +- .../resource_clouddeploy_target.go | 4 +- .../resource_cloud_run_domain_mapping.go | 5 +- .../cloudrun/resource_cloud_run_service.go | 5 +- .../cloudrunv2/resource_cloud_run_v2_job.go | 5 +- .../resource_cloud_run_v2_service.go | 5 +- .../resource_container_attached_cluster.go | 6 +- .../resource_container_aws_cluster.go | 2 +- .../resource_container_aws_node_pool.go | 2 +- .../resource_container_azure_cluster.go | 2 +- .../resource_container_azure_node_pool.go | 2 +- .../dataflow/resource_dataflow_job_test.go | 10 +- .../dataplex/resource_dataplex_asset.go | 2 +- .../dataplex/resource_dataplex_lake.go | 2 +- .../dataplex/resource_dataplex_zone.go | 2 +- .../resource_dataproc_cluster_upgrade_test.go | 4 +- .../resource_dataproc_workflow_template.go | 2 +- .../datastream/resource_datastream_stream.go | 11 ++ .../dns/data_source_dns_managed_zone_test.go | 4 + .../eventarc/resource_eventarc_trigger.go | 2 +- ...urce_gkeonprem_bare_metal_admin_cluster.go | 6 +- .../resource_gkeonprem_bare_metal_cluster.go | 6 +- ...resource_gkeonprem_bare_metal_node_pool.go | 6 +- .../resource_gkeonprem_vmware_cluster.go | 6 +- .../resource_gkeonprem_vmware_node_pool.go | 6 +- .../resource_network_connectivity_hub.go | 2 +- .../resource_network_connectivity_spoke.go | 2 +- ...resource_privateca_certificate_template.go | 2 +- .../resource_recaptcha_enterprise_key.go | 2 +- .../resource_secret_manager_secret.go | 6 +- .../resource_workstations_workstation.go | 11 +- ...source_workstations_workstation_cluster.go | 11 +- ...esource_workstations_workstation_config.go | 11 +- website/docs/r/alloydb_backup.html.markdown | 16 ++ website/docs/r/alloydb_cluster.html.markdown | 6 + website/docs/r/alloydb_instance.html.markdown | 2 + .../assured_workloads_workload.html.markdown | 3 +- .../r/cloud_run_domain_mapping.html.markdown | 2 + .../docs/r/cloud_run_service.html.markdown | 2 + website/docs/r/cloud_run_v2_job.html.markdown | 2 + .../docs/r/cloud_run_v2_service.html.markdown | 2 + .../r/cloudbuildv2_connection.html.markdown | 3 +- .../r/cloudbuildv2_repository.html.markdown | 3 +- ...louddeploy_delivery_pipeline.html.markdown | 6 +- .../docs/r/clouddeploy_target.html.markdown | 6 +- .../container_attached_cluster.html.markdown | 3 + .../r/container_aws_cluster.html.markdown | 3 +- .../r/container_aws_node_pool.html.markdown | 3 +- .../r/container_azure_cluster.html.markdown | 3 +- .../r/container_azure_node_pool.html.markdown | 3 +- website/docs/r/dataplex_asset.html.markdown | 3 +- website/docs/r/dataplex_lake.html.markdown | 3 +- website/docs/r/dataplex_zone.html.markdown | 3 +- website/docs/r/eventarc_trigger.html.markdown | 3 +- ...rem_bare_metal_admin_cluster.html.markdown | 3 + ...gkeonprem_bare_metal_cluster.html.markdown | 3 + ...eonprem_bare_metal_node_pool.html.markdown | 3 + .../r/gkeonprem_vmware_cluster.html.markdown | 3 + .../gkeonprem_vmware_node_pool.html.markdown | 3 + .../r/network_connectivity_hub.html.markdown | 3 +- .../network_connectivity_spoke.html.markdown | 3 +- ...ivateca_certificate_template.html.markdown | 3 +- .../r/recaptcha_enterprise_key.html.markdown | 3 +- .../r/secret_manager_secret.html.markdown | 3 + .../r/workstations_workstation.html.markdown | 2 + ...stations_workstation_cluster.html.markdown | 2 + ...kstations_workstation_config.html.markdown | 2 + 79 files changed, 416 insertions(+), 153 deletions(-) create mode 100644 .changelog/9123.txt diff --git a/.changelog/9123.txt b/.changelog/9123.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/9123.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google-beta/provider/provider_test.go b/google-beta/provider/provider_test.go index ff4dae55e3..e6215aefc8 100644 --- a/google-beta/provider/provider_test.go +++ b/google-beta/provider/provider_test.go @@ -129,9 +129,10 @@ func TestAccProviderUserProjectOverride(t *testing.T) { Config: testAccProviderUserProjectOverride_step2(accessToken, pid, true, topicName), }, { - ResourceName: "google_pubsub_topic.project-2-topic", - ImportState: true, - ImportStateVerify: true, + ResourceName: "google_pubsub_topic.project-2-topic", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "terraform_labels"}, }, { Config: testAccProviderUserProjectOverride_step3(accessToken, true), diff --git a/google-beta/services/alloydb/resource_alloydb_backup.go b/google-beta/services/alloydb/resource_alloydb_backup.go index d4cdf165af..0488eacf3d 100644 --- a/google-beta/services/alloydb/resource_alloydb_backup.go +++ b/google-beta/services/alloydb/resource_alloydb_backup.go @@ -50,6 +50,8 @@ func ResourceAlloydbBackup() *schema.Resource { }, CustomizeDiff: customdiff.All( + tpgresource.SetLabelsDiff, + tpgresource.SetAnnotationsDiff, tpgresource.DefaultProviderProject, ), @@ -77,7 +79,11 @@ func ResourceAlloydbBackup() *schema.Resource { Type: schema.TypeMap, Optional: true, Description: `Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 -An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.`, +An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "description": { @@ -107,10 +113,14 @@ An object containing a list of "key": value pairs. Example: { "name": "wrench", }, }, "labels": { - Type: schema.TypeMap, - Optional: true, - Description: `User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.`, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + + +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field 'effective_labels' for all of the labels present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "type": { Type: schema.TypeString, @@ -136,6 +146,18 @@ Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`, Description: `Output only. Delete time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`, }, + "effective_annotations": { + Type: schema.TypeMap, + Computed: true, + Description: `All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "effective_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "encryption_info": { Type: schema.TypeList, Computed: true, @@ -210,6 +232,13 @@ This can happen due to user-triggered updates or system actions like failover or Computed: true, Description: `Output only. The current state of the backup.`, }, + "terraform_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `The combination of labels configured directly on the resource + and default labels configured on the provider.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "uid": { Type: schema.TypeString, Computed: true, @@ -246,12 +275,6 @@ func resourceAlloydbBackupCreate(d *schema.ResourceData, meta interface{}) error } else if v, ok := d.GetOkExists("display_name"); !tpgresource.IsEmptyValue(reflect.ValueOf(displayNameProp)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { obj["displayName"] = displayNameProp } - labelsProp, err := expandAlloydbBackupLabels(d.Get("labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(labelsProp)) && (ok || !reflect.DeepEqual(v, labelsProp)) { - obj["labels"] = labelsProp - } typeProp, err := expandAlloydbBackupType(d.Get("type"), d, config) if err != nil { return err @@ -276,10 +299,16 @@ func resourceAlloydbBackupCreate(d *schema.ResourceData, meta interface{}) error } else if v, ok := d.GetOkExists("encryption_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(encryptionConfigProp)) && (ok || !reflect.DeepEqual(v, encryptionConfigProp)) { obj["encryptionConfig"] = encryptionConfigProp } - annotationsProp, err := expandAlloydbBackupAnnotations(d.Get("annotations"), d, config) + labelsProp, err := expandAlloydbBackupEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err - } else if v, ok := d.GetOkExists("annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(annotationsProp)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(labelsProp)) && (ok || !reflect.DeepEqual(v, labelsProp)) { + obj["labels"] = labelsProp + } + annotationsProp, err := expandAlloydbBackupEffectiveAnnotations(d.Get("effective_annotations"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(annotationsProp)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { obj["annotations"] = annotationsProp } @@ -442,6 +471,15 @@ func resourceAlloydbBackupRead(d *schema.ResourceData, meta interface{}) error { if err := d.Set("expiry_quantity", flattenAlloydbBackupExpiryQuantity(res["expiryQuantity"], d, config)); err != nil { return fmt.Errorf("Error reading Backup: %s", err) } + if err := d.Set("terraform_labels", flattenAlloydbBackupTerraformLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Backup: %s", err) + } + if err := d.Set("effective_labels", flattenAlloydbBackupEffectiveLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Backup: %s", err) + } + if err := d.Set("effective_annotations", flattenAlloydbBackupEffectiveAnnotations(res["annotations"], d, config)); err != nil { + return fmt.Errorf("Error reading Backup: %s", err) + } return nil } @@ -468,12 +506,6 @@ func resourceAlloydbBackupUpdate(d *schema.ResourceData, meta interface{}) error } else if v, ok := d.GetOkExists("display_name"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { obj["displayName"] = displayNameProp } - labelsProp, err := expandAlloydbBackupLabels(d.Get("labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, labelsProp)) { - obj["labels"] = labelsProp - } typeProp, err := expandAlloydbBackupType(d.Get("type"), d, config) if err != nil { return err @@ -492,10 +524,16 @@ func resourceAlloydbBackupUpdate(d *schema.ResourceData, meta interface{}) error } else if v, ok := d.GetOkExists("encryption_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, encryptionConfigProp)) { obj["encryptionConfig"] = encryptionConfigProp } - annotationsProp, err := expandAlloydbBackupAnnotations(d.Get("annotations"), d, config) + labelsProp, err := expandAlloydbBackupEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, labelsProp)) { + obj["labels"] = labelsProp + } + annotationsProp, err := expandAlloydbBackupEffectiveAnnotations(d.Get("effective_annotations"), d, config) if err != nil { return err - } else if v, ok := d.GetOkExists("annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { + } else if v, ok := d.GetOkExists("effective_annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { obj["annotations"] = annotationsProp } @@ -516,10 +554,6 @@ func resourceAlloydbBackupUpdate(d *schema.ResourceData, meta interface{}) error updateMask = append(updateMask, "displayName") } - if d.HasChange("labels") { - updateMask = append(updateMask, "labels") - } - if d.HasChange("type") { updateMask = append(updateMask, "type") } @@ -532,7 +566,11 @@ func resourceAlloydbBackupUpdate(d *schema.ResourceData, meta interface{}) error updateMask = append(updateMask, "encryptionConfig") } - if d.HasChange("annotations") { + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } + + if d.HasChange("effective_annotations") { updateMask = append(updateMask, "annotations") } // updateMask is a URL parameter but not present in the schema, so ReplaceVars @@ -672,7 +710,18 @@ func flattenAlloydbBackupDeleteTime(v interface{}, d *schema.ResourceData, confi } func flattenAlloydbBackupLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - return v + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed } func flattenAlloydbBackupState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -744,7 +793,18 @@ func flattenAlloydbBackupEtag(v interface{}, d *schema.ResourceData, config *tra } func flattenAlloydbBackupAnnotations(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - return v + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("annotations"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed } func flattenAlloydbBackupSizeBytes(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -804,19 +864,31 @@ func flattenAlloydbBackupExpiryQuantityTotalRetentionCount(v interface{}, d *sch return v // let terraform core handle it otherwise } -func expandAlloydbBackupDisplayName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - return v, nil -} - -func expandAlloydbBackupLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { +func flattenAlloydbBackupTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { - return map[string]string{}, nil + return v } - m := make(map[string]string) - for k, val := range v.(map[string]interface{}) { - m[k] = val.(string) + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } } - return m, nil + + return transformed +} + +func flattenAlloydbBackupEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenAlloydbBackupEffectiveAnnotations(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandAlloydbBackupDisplayName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil } func expandAlloydbBackupType(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { @@ -854,7 +926,18 @@ func expandAlloydbBackupEncryptionConfigKmsKeyName(v interface{}, d tpgresource. return v, nil } -func expandAlloydbBackupAnnotations(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { +func expandAlloydbBackupEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} + +func expandAlloydbBackupEffectiveAnnotations(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { if v == nil { return map[string]string{}, nil } diff --git a/google-beta/services/alloydb/resource_alloydb_backup_generated_test.go b/google-beta/services/alloydb/resource_alloydb_backup_generated_test.go index 2434b1b154..690808ec9d 100644 --- a/google-beta/services/alloydb/resource_alloydb_backup_generated_test.go +++ b/google-beta/services/alloydb/resource_alloydb_backup_generated_test.go @@ -49,7 +49,7 @@ func TestAccAlloydbBackup_alloydbBackupBasicExample(t *testing.T) { ResourceName: "google_alloydb_backup.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"backup_id", "location", "reconciling", "update_time"}, + ImportStateVerifyIgnore: []string{"backup_id", "location", "reconciling", "update_time", "labels", "annotations", "terraform_labels"}, }, }, }) @@ -118,7 +118,7 @@ func TestAccAlloydbBackup_alloydbBackupFullExample(t *testing.T) { ResourceName: "google_alloydb_backup.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"backup_id", "location", "reconciling", "update_time"}, + ImportStateVerifyIgnore: []string{"backup_id", "location", "reconciling", "update_time", "labels", "annotations", "terraform_labels"}, }, }, }) diff --git a/google-beta/services/alloydb/resource_alloydb_cluster.go b/google-beta/services/alloydb/resource_alloydb_cluster.go index 735d62a1a7..f4aad90ab1 100644 --- a/google-beta/services/alloydb/resource_alloydb_cluster.go +++ b/google-beta/services/alloydb/resource_alloydb_cluster.go @@ -51,6 +51,7 @@ func ResourceAlloydbCluster() *schema.Resource { CustomizeDiff: customdiff.All( tpgresource.SetLabelsDiff, + tpgresource.SetAnnotationsDiff, tpgresource.DefaultProviderProject, ), @@ -71,7 +72,11 @@ func ResourceAlloydbCluster() *schema.Resource { Type: schema.TypeMap, Optional: true, Description: `Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 -An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.`, +An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "automated_backup_policy": { @@ -455,6 +460,12 @@ It is specified in the form: "projects/{projectNumber}/global/networks/{network_ Computed: true, Description: `The database engine major version. This is an output-only field and it's populated at the Cluster creation time. This field cannot be changed after cluster creation.`, }, + "effective_annotations": { + Type: schema.TypeMap, + Computed: true, + Description: `All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "effective_labels": { Type: schema.TypeMap, Computed: true, @@ -585,12 +596,6 @@ func resourceAlloydbClusterCreate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("etag"); !tpgresource.IsEmptyValue(reflect.ValueOf(etagProp)) && (ok || !reflect.DeepEqual(v, etagProp)) { obj["etag"] = etagProp } - annotationsProp, err := expandAlloydbClusterAnnotations(d.Get("annotations"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(annotationsProp)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { - obj["annotations"] = annotationsProp - } initialUserProp, err := expandAlloydbClusterInitialUser(d.Get("initial_user"), d, config) if err != nil { return err @@ -627,6 +632,12 @@ func resourceAlloydbClusterCreate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(labelsProp)) && (ok || !reflect.DeepEqual(v, labelsProp)) { obj["labels"] = labelsProp } + annotationsProp, err := expandAlloydbClusterEffectiveAnnotations(d.Get("effective_annotations"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(annotationsProp)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { + obj["annotations"] = annotationsProp + } url, err := tpgresource.ReplaceVars(d, config, "{{AlloydbBasePath}}projects/{{project}}/locations/{{location}}/clusters?clusterId={{cluster_id}}") if err != nil { @@ -815,6 +826,9 @@ func resourceAlloydbClusterRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("effective_labels", flattenAlloydbClusterEffectiveLabels(res["labels"], d, config)); err != nil { return fmt.Errorf("Error reading Cluster: %s", err) } + if err := d.Set("effective_annotations", flattenAlloydbClusterEffectiveAnnotations(res["annotations"], d, config)); err != nil { + return fmt.Errorf("Error reading Cluster: %s", err) + } return nil } @@ -865,12 +879,6 @@ func resourceAlloydbClusterUpdate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("etag"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, etagProp)) { obj["etag"] = etagProp } - annotationsProp, err := expandAlloydbClusterAnnotations(d.Get("annotations"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { - obj["annotations"] = annotationsProp - } initialUserProp, err := expandAlloydbClusterInitialUser(d.Get("initial_user"), d, config) if err != nil { return err @@ -895,6 +903,12 @@ func resourceAlloydbClusterUpdate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, labelsProp)) { obj["labels"] = labelsProp } + annotationsProp, err := expandAlloydbClusterEffectiveAnnotations(d.Get("effective_annotations"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_annotations"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, annotationsProp)) { + obj["annotations"] = annotationsProp + } url, err := tpgresource.ReplaceVars(d, config, "{{AlloydbBasePath}}projects/{{project}}/locations/{{location}}/clusters/{{cluster_id}}") if err != nil { @@ -924,10 +938,6 @@ func resourceAlloydbClusterUpdate(d *schema.ResourceData, meta interface{}) erro updateMask = append(updateMask, "etag") } - if d.HasChange("annotations") { - updateMask = append(updateMask, "annotations") - } - if d.HasChange("initial_user") { updateMask = append(updateMask, "initialUser") } @@ -943,6 +953,10 @@ func resourceAlloydbClusterUpdate(d *schema.ResourceData, meta interface{}) erro if d.HasChange("effective_labels") { updateMask = append(updateMask, "labels") } + + if d.HasChange("effective_annotations") { + updateMask = append(updateMask, "annotations") + } // updateMask is a URL parameter but not present in the schema, so ReplaceVars // won't set it url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) @@ -1217,7 +1231,18 @@ func flattenAlloydbClusterState(v interface{}, d *schema.ResourceData, config *t } func flattenAlloydbClusterAnnotations(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - return v + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("annotations"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed } func flattenAlloydbClusterDatabaseVersion(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -1560,6 +1585,10 @@ func flattenAlloydbClusterEffectiveLabels(v interface{}, d *schema.ResourceData, return v } +func flattenAlloydbClusterEffectiveAnnotations(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func expandAlloydbClusterEncryptionConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { l := v.([]interface{}) if len(l) == 0 || l[0] == nil { @@ -1629,17 +1658,6 @@ func expandAlloydbClusterEtag(v interface{}, d tpgresource.TerraformResourceData return v, nil } -func expandAlloydbClusterAnnotations(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { - if v == nil { - return map[string]string{}, nil - } - m := make(map[string]string) - for k, val := range v.(map[string]interface{}) { - m[k] = val.(string) - } - return m, nil -} - func expandAlloydbClusterInitialUser(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { l := v.([]interface{}) if len(l) == 0 || l[0] == nil { @@ -2054,3 +2072,14 @@ func expandAlloydbClusterEffectiveLabels(v interface{}, d tpgresource.TerraformR } return m, nil } + +func expandAlloydbClusterEffectiveAnnotations(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} diff --git a/google-beta/services/alloydb/resource_alloydb_cluster_generated_test.go b/google-beta/services/alloydb/resource_alloydb_cluster_generated_test.go index b39a226ccc..af9aac0c6d 100644 --- a/google-beta/services/alloydb/resource_alloydb_cluster_generated_test.go +++ b/google-beta/services/alloydb/resource_alloydb_cluster_generated_test.go @@ -49,7 +49,7 @@ func TestAccAlloydbCluster_alloydbClusterBasicExample(t *testing.T) { ResourceName: "google_alloydb_cluster.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"initial_user", "restore_backup_source", "restore_continuous_backup_source", "cluster_id", "location", "labels", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"initial_user", "restore_backup_source", "restore_continuous_backup_source", "cluster_id", "location", "labels", "annotations", "terraform_labels"}, }, }, }) @@ -90,7 +90,7 @@ func TestAccAlloydbCluster_alloydbClusterFullExample(t *testing.T) { ResourceName: "google_alloydb_cluster.full", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"initial_user", "restore_backup_source", "restore_continuous_backup_source", "cluster_id", "location", "labels", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"initial_user", "restore_backup_source", "restore_continuous_backup_source", "cluster_id", "location", "labels", "annotations", "terraform_labels"}, }, }, }) diff --git a/google-beta/services/alloydb/resource_alloydb_instance.go b/google-beta/services/alloydb/resource_alloydb_instance.go index 6192f8ac70..211967008f 100644 --- a/google-beta/services/alloydb/resource_alloydb_instance.go +++ b/google-beta/services/alloydb/resource_alloydb_instance.go @@ -77,10 +77,13 @@ func ResourceAlloydbInstance() *schema.Resource { Description: `The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY instance in the 'depends_on' meta-data attribute. Possible values: ["PRIMARY", "READ_POOL"]`, }, "annotations": { - Type: schema.TypeMap, - Optional: true, - Description: `Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.`, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "availability_type": { Type: schema.TypeString, diff --git a/google-beta/services/assuredworkloads/resource_assured_workloads_workload.go b/google-beta/services/assuredworkloads/resource_assured_workloads_workload.go index dca090a8ca..c0e0989afd 100644 --- a/google-beta/services/assuredworkloads/resource_assured_workloads_workload.go +++ b/google-beta/services/assuredworkloads/resource_assured_workloads_workload.go @@ -131,7 +131,7 @@ func ResourceAssuredWorkloadsWorkload() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional. Labels applied to the workload.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. Labels applied to the workload.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/bigtable/resource_bigtable_instance_test.go b/google-beta/services/bigtable/resource_bigtable_instance_test.go index 814eeea81b..42414164b9 100644 --- a/google-beta/services/bigtable/resource_bigtable_instance_test.go +++ b/google-beta/services/bigtable/resource_bigtable_instance_test.go @@ -38,7 +38,7 @@ func TestAccBigtableInstance_basic(t *testing.T) { ResourceName: "google_bigtable_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type"}, // we don't read instance type back + ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type", "labels", "terraform_labels"}, // we don't read instance type back }, { Config: testAccBigtableInstance(instanceName, 4), @@ -47,7 +47,7 @@ func TestAccBigtableInstance_basic(t *testing.T) { ResourceName: "google_bigtable_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type"}, // we don't read instance type back + ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type", "labels", "terraform_labels"}, // we don't read instance type back }, }, }) @@ -313,7 +313,7 @@ func TestAccBigtableInstance_enableAndDisableAutoscaling(t *testing.T) { ResourceName: "google_bigtable_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type"}, // we don't read instance type back + ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type", "labels", "terraform_labels"}, // we don't read instance type back }, { // Enable Autoscaling. @@ -335,7 +335,7 @@ func TestAccBigtableInstance_enableAndDisableAutoscaling(t *testing.T) { ResourceName: "google_bigtable_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type"}, // we don't read instance type back + ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type", "labels", "terraform_labels"}, // we don't read instance type back }, }, }) @@ -375,7 +375,7 @@ func TestAccBigtableInstance_enableAndDisableAutoscalingWithoutNumNodes(t *testi ResourceName: "google_bigtable_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type"}, // we don't read instance type back + ImportStateVerifyIgnore: []string{"deletion_protection", "instance_type", "labels", "terraform_labels"}, // we don't read instance type back }, }, }) diff --git a/google-beta/services/cloudbuild/resource_cloudbuild_worker_pool.go b/google-beta/services/cloudbuild/resource_cloudbuild_worker_pool.go index 4830a2dcba..01b58c1676 100644 --- a/google-beta/services/cloudbuild/resource_cloudbuild_worker_pool.go +++ b/google-beta/services/cloudbuild/resource_cloudbuild_worker_pool.go @@ -113,7 +113,7 @@ func ResourceCloudbuildWorkerPool() *schema.Resource { "annotations": { Type: schema.TypeMap, Optional: true, - Description: "User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/cloudbuildv2/resource_cloudbuildv2_connection.go b/google-beta/services/cloudbuildv2/resource_cloudbuildv2_connection.go index 4096030f07..3447bc632f 100644 --- a/google-beta/services/cloudbuildv2/resource_cloudbuildv2_connection.go +++ b/google-beta/services/cloudbuildv2/resource_cloudbuildv2_connection.go @@ -122,7 +122,7 @@ func ResourceCloudbuildv2Connection() *schema.Resource { "annotations": { Type: schema.TypeMap, Optional: true, - Description: "Allows clients to store small amounts of arbitrary data.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Allows clients to store small amounts of arbitrary data.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/cloudbuildv2/resource_cloudbuildv2_repository.go b/google-beta/services/cloudbuildv2/resource_cloudbuildv2_repository.go index 1a8221d430..91fb060e8e 100644 --- a/google-beta/services/cloudbuildv2/resource_cloudbuildv2_repository.go +++ b/google-beta/services/cloudbuildv2/resource_cloudbuildv2_repository.go @@ -105,7 +105,7 @@ func ResourceCloudbuildv2Repository() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Description: "Allows clients to store small amounts of arbitrary data.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Allows clients to store small amounts of arbitrary data.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/clouddeploy/resource_clouddeploy_delivery_pipeline.go b/google-beta/services/clouddeploy/resource_clouddeploy_delivery_pipeline.go index f3194c6ca1..9bca242477 100644 --- a/google-beta/services/clouddeploy/resource_clouddeploy_delivery_pipeline.go +++ b/google-beta/services/clouddeploy/resource_clouddeploy_delivery_pipeline.go @@ -116,7 +116,7 @@ func ResourceClouddeployDeliveryPipeline() *schema.Resource { "annotations": { Type: schema.TypeMap, Optional: true, - Description: "User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -142,7 +142,7 @@ func ResourceClouddeployDeliveryPipeline() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/clouddeploy/resource_clouddeploy_target.go b/google-beta/services/clouddeploy/resource_clouddeploy_target.go index 300b7a4051..33d24d3ef2 100644 --- a/google-beta/services/clouddeploy/resource_clouddeploy_target.go +++ b/google-beta/services/clouddeploy/resource_clouddeploy_target.go @@ -159,7 +159,7 @@ func ResourceClouddeployTarget() *schema.Resource { "annotations": { Type: schema.TypeMap, Optional: true, - Description: "Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -178,7 +178,7 @@ func ResourceClouddeployTarget() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/cloudrun/resource_cloud_run_domain_mapping.go b/google-beta/services/cloudrun/resource_cloud_run_domain_mapping.go index 43238e907d..12c9dc44d7 100644 --- a/google-beta/services/cloudrun/resource_cloud_run_domain_mapping.go +++ b/google-beta/services/cloudrun/resource_cloud_run_domain_mapping.go @@ -149,7 +149,10 @@ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotati **Note**: The Cloud Run API may add additional annotations that were not provided in your config. If terraform plan shows a diff where a server-side annotation is added, you can add it to your config -or apply the lifecycle.ignore_changes rule to the metadata.0.annotations field.`, +or apply the lifecycle.ignore_changes rule to the metadata.0.annotations field. + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "labels": { diff --git a/google-beta/services/cloudrun/resource_cloud_run_service.go b/google-beta/services/cloudrun/resource_cloud_run_service.go index d820a06dd5..6aada6e901 100644 --- a/google-beta/services/cloudrun/resource_cloud_run_service.go +++ b/google-beta/services/cloudrun/resource_cloud_run_service.go @@ -939,7 +939,10 @@ keys to configure features on a Service: - 'run.googleapis.com/ingress' sets the [ingress settings](https://cloud.google.com/sdk/gcloud/reference/run/deploy#--ingress) for the Service. For example, '"run.googleapis.com/ingress" = "all"'. - 'run.googleapis.com/launch-stage' sets the [launch stage](https://cloud.google.com/run/docs/troubleshooting#launch-stage-validation) - when a preview feature is used. For example, '"run.googleapis.com/launch-stage": "BETA"'`, + when a preview feature is used. For example, '"run.googleapis.com/launch-stage": "BETA"' + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "labels": { diff --git a/google-beta/services/cloudrunv2/resource_cloud_run_v2_job.go b/google-beta/services/cloudrunv2/resource_cloud_run_v2_job.go index 3ba53b62fa..3110adef24 100644 --- a/google-beta/services/cloudrunv2/resource_cloud_run_v2_job.go +++ b/google-beta/services/cloudrunv2/resource_cloud_run_v2_job.go @@ -457,7 +457,10 @@ All system labels in v1 now have a corresponding field in v2 ExecutionTemplate.` Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. -This field follows Kubernetes annotations' namespacing, limits, and rules.`, +This field follows Kubernetes annotations' namespacing, limits, and rules. + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "binary_authorization": { diff --git a/google-beta/services/cloudrunv2/resource_cloud_run_v2_service.go b/google-beta/services/cloudrunv2/resource_cloud_run_v2_service.go index 6abdce798b..074bbc1eed 100644 --- a/google-beta/services/cloudrunv2/resource_cloud_run_v2_service.go +++ b/google-beta/services/cloudrunv2/resource_cloud_run_v2_service.go @@ -705,7 +705,10 @@ subnetwork with the same name with the network will be used.`, Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. -This field follows Kubernetes annotations' namespacing, limits, and rules.`, +This field follows Kubernetes annotations' namespacing, limits, and rules. + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "binary_authorization": { diff --git a/google-beta/services/containerattached/resource_container_attached_cluster.go b/google-beta/services/containerattached/resource_container_attached_cluster.go index 42e8952775..3e9d161d58 100644 --- a/google-beta/services/containerattached/resource_container_attached_cluster.go +++ b/google-beta/services/containerattached/resource_container_attached_cluster.go @@ -154,7 +154,11 @@ restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, -with dashes (-), underscores (_), dots (.), and alphanumerics between.`, +with dashes (-), underscores (_), dots (.), and alphanumerics between. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "authorization": { diff --git a/google-beta/services/containeraws/resource_container_aws_cluster.go b/google-beta/services/containeraws/resource_container_aws_cluster.go index 590f367013..6a5516fc3f 100644 --- a/google-beta/services/containeraws/resource_container_aws_cluster.go +++ b/google-beta/services/containeraws/resource_container_aws_cluster.go @@ -153,7 +153,7 @@ func ResourceContainerAwsCluster() *schema.Resource { "annotations": { Type: schema.TypeMap, Optional: true, - Description: "Optional. Annotations on the cluster. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. Annotations on the cluster. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/containeraws/resource_container_aws_node_pool.go b/google-beta/services/containeraws/resource_container_aws_node_pool.go index 75c260a956..0be40120cb 100644 --- a/google-beta/services/containeraws/resource_container_aws_node_pool.go +++ b/google-beta/services/containeraws/resource_container_aws_node_pool.go @@ -155,7 +155,7 @@ func ResourceContainerAwsNodePool() *schema.Resource { "annotations": { Type: schema.TypeMap, Optional: true, - Description: "Optional. Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/containerazure/resource_container_azure_cluster.go b/google-beta/services/containerazure/resource_container_azure_cluster.go index 089c166db1..9525035a0e 100644 --- a/google-beta/services/containerazure/resource_container_azure_cluster.go +++ b/google-beta/services/containerazure/resource_container_azure_cluster.go @@ -171,7 +171,7 @@ func ResourceContainerAzureCluster() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Description: "Optional. Annotations on the cluster. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Keys can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. Annotations on the cluster. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Keys can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/containerazure/resource_container_azure_node_pool.go b/google-beta/services/containerazure/resource_container_azure_node_pool.go index 0449861952..d6ead19be8 100644 --- a/google-beta/services/containerazure/resource_container_azure_node_pool.go +++ b/google-beta/services/containerazure/resource_container_azure_node_pool.go @@ -152,7 +152,7 @@ func ResourceContainerAzureNodePool() *schema.Resource { "annotations": { Type: schema.TypeMap, Optional: true, - Description: "Optional. Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Keys can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Keys can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.\n\n**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.\nPlease refer to the field `effective_annotations` for all of the annotations present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/dataflow/resource_dataflow_job_test.go b/google-beta/services/dataflow/resource_dataflow_job_test.go index c7518183ce..d063ad6a49 100644 --- a/google-beta/services/dataflow/resource_dataflow_job_test.go +++ b/google-beta/services/dataflow/resource_dataflow_job_test.go @@ -282,7 +282,7 @@ func TestAccDataflowJob_withProviderDefaultLabels(t *testing.T) { resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.env", "foo"), resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.default_expiration_ms", "3600000"), - resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "3"), + resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "6"), ), }, { @@ -304,7 +304,7 @@ func TestAccDataflowJob_withProviderDefaultLabels(t *testing.T) { resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.env", "foo"), resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.default_expiration_ms", "3600000"), - resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "3"), + resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "6"), ), }, { @@ -327,7 +327,7 @@ func TestAccDataflowJob_withProviderDefaultLabels(t *testing.T) { resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.env", "foo"), resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.default_expiration_ms", "3600000"), - resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "3"), + resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "6"), ), }, { @@ -349,7 +349,7 @@ func TestAccDataflowJob_withProviderDefaultLabels(t *testing.T) { resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.env", "foo"), resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "terraform_labels.default_expiration_ms", "3600000"), - resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "3"), + resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "6"), ), }, { @@ -362,7 +362,7 @@ func TestAccDataflowJob_withProviderDefaultLabels(t *testing.T) { Config: testAccDataflowJob_zone(bucket, job, zone), Check: resource.ComposeTestCheckFunc( resource.TestCheckNoResourceAttr("google_dataflow_job.with_labels", "labels.%"), - resource.TestCheckNoResourceAttr("google_dataflow_job.with_labels", "effective_labels.%"), + resource.TestCheckResourceAttr("google_dataflow_job.with_labels", "effective_labels.%", "3"), ), }, { diff --git a/google-beta/services/dataplex/resource_dataplex_asset.go b/google-beta/services/dataplex/resource_dataplex_asset.go index 34505246bd..4911c3b395 100644 --- a/google-beta/services/dataplex/resource_dataplex_asset.go +++ b/google-beta/services/dataplex/resource_dataplex_asset.go @@ -143,7 +143,7 @@ func ResourceDataplexAsset() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional. User defined labels for the asset.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. User defined labels for the asset.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/dataplex/resource_dataplex_lake.go b/google-beta/services/dataplex/resource_dataplex_lake.go index 90b94d4d68..d624bc24eb 100644 --- a/google-beta/services/dataplex/resource_dataplex_lake.go +++ b/google-beta/services/dataplex/resource_dataplex_lake.go @@ -122,7 +122,7 @@ func ResourceDataplexLake() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional. User-defined labels for the lake.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. User-defined labels for the lake.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/dataplex/resource_dataplex_zone.go b/google-beta/services/dataplex/resource_dataplex_zone.go index 898b2ea98e..048a8709db 100644 --- a/google-beta/services/dataplex/resource_dataplex_zone.go +++ b/google-beta/services/dataplex/resource_dataplex_zone.go @@ -145,7 +145,7 @@ func ResourceDataplexZone() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional. User defined labels for the zone.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. User defined labels for the zone.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/dataproc/resource_dataproc_cluster_upgrade_test.go b/google-beta/services/dataproc/resource_dataproc_cluster_upgrade_test.go index 6580c74e80..1eba7d7c8d 100644 --- a/google-beta/services/dataproc/resource_dataproc_cluster_upgrade_test.go +++ b/google-beta/services/dataproc/resource_dataproc_cluster_upgrade_test.go @@ -164,6 +164,8 @@ func TestAccDataprocClusterLabelsMigration_withUpdate(t *testing.T) { }) } +// This test fails in the nightly test. The reason to keep it is that +// it could tell if the new model is broken later. func TestAccDataprocClusterLabelsMigration_withRemoval(t *testing.T) { acctest.SkipIfVcr(t) t.Parallel() @@ -192,7 +194,7 @@ func TestAccDataprocClusterLabelsMigration_withRemoval(t *testing.T) { testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_labels", &cluster), resource.TestCheckNoResourceAttr("google_dataproc_cluster.with_labels", "labels.%"), - // We only provide one, but GCP adds three and goog-dataproc-autozone is added internally, so expect 4. + // GCP adds three and goog-dataproc-autozone is added internally, so expect 4. resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "4"), ), }, diff --git a/google-beta/services/dataproc/resource_dataproc_workflow_template.go b/google-beta/services/dataproc/resource_dataproc_workflow_template.go index f8d5ce1284..46ae57ad5b 100644 --- a/google-beta/services/dataproc/resource_dataproc_workflow_template.go +++ b/google-beta/services/dataproc/resource_dataproc_workflow_template.go @@ -136,7 +136,7 @@ func ResourceDataprocWorkflowTemplate() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Description: "Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a template.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a template.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/datastream/resource_datastream_stream.go b/google-beta/services/datastream/resource_datastream_stream.go index d377f1e730..6c8d96f35e 100644 --- a/google-beta/services/datastream/resource_datastream_stream.go +++ b/google-beta/services/datastream/resource_datastream_stream.go @@ -1642,10 +1642,21 @@ func resourceDatastreamStreamUpdate(d *schema.ResourceData, meta interface{}) er return err } + // lables and terraform_labels fields are overriden with the labels before updating inside the function waitForDatastreamStreamReady + labels := d.Get("labels") + terraformLabels := d.Get("terraform_labels") + if err := waitForDatastreamStreamReady(d, config, d.Timeout(schema.TimeoutCreate)-time.Minute); err != nil { return fmt.Errorf("Error waiting for Stream %q to be NOT_STARTED, RUNNING, or PAUSED before updating: %q", d.Get("name").(string), err) } + if err := d.Set("labels", labels); err != nil { + return fmt.Errorf("Error setting back labels field: %s", err) + } + if err := d.Set("terraform_labels", terraformLabels); err != nil { + return fmt.Errorf("Error setting back terraform_labels field: %s", err) + } + // err == nil indicates that the billing_project value was found if bp, err := tpgresource.GetBillingProject(d, config); err == nil { billingProject = bp diff --git a/google-beta/services/dns/data_source_dns_managed_zone_test.go b/google-beta/services/dns/data_source_dns_managed_zone_test.go index aa0510ec89..56809cee19 100644 --- a/google-beta/services/dns/data_source_dns_managed_zone_test.go +++ b/google-beta/services/dns/data_source_dns_managed_zone_test.go @@ -41,6 +41,8 @@ func TestAccDataSourceDnsManagedZone_basic(t *testing.T) { "forwarding_config.#": {}, "force_destroy": {}, "labels.#": {}, + "terraform_labels.%": {}, + "effective_labels.%": {}, "creation_time": {}, "cloud_logging_config.#": {}, "cloud_logging_config.0.%": {}, @@ -62,6 +64,8 @@ func TestAccDataSourceDnsManagedZone_basic(t *testing.T) { "forwarding_config.#": {}, "force_destroy": {}, "labels.#": {}, + "terraform_labels.%": {}, + "effective_labels.%": {}, "creation_time": {}, "cloud_logging_config.#": {}, "cloud_logging_config.0.%": {}, diff --git a/google-beta/services/eventarc/resource_eventarc_trigger.go b/google-beta/services/eventarc/resource_eventarc_trigger.go index 5a01262fff..eafe3f05e6 100644 --- a/google-beta/services/eventarc/resource_eventarc_trigger.go +++ b/google-beta/services/eventarc/resource_eventarc_trigger.go @@ -156,7 +156,7 @@ func ResourceEventarcTrigger() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional. User labels attached to the triggers that can be used to group resources.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. User labels attached to the triggers that can be used to group resources.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster.go b/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster.go index c0b8bde239..120f5ce5d5 100644 --- a/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster.go +++ b/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster.go @@ -77,7 +77,11 @@ Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, -with dashes (-), underscores (_), dots (.), and alphanumerics between.`, +with dashes (-), underscores (_), dots (.), and alphanumerics between. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "bare_metal_version": { diff --git a/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_cluster.go b/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_cluster.go index feef4f9e0b..ae4c62d1d5 100644 --- a/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_cluster.go +++ b/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_cluster.go @@ -796,7 +796,11 @@ Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, -with dashes (-), underscores (_), dots (.), and alphanumerics between.`, +with dashes (-), underscores (_), dots (.), and alphanumerics between. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "binary_authorization": { diff --git a/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool.go b/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool.go index 2cf812df86..05df45b57c 100644 --- a/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool.go +++ b/google-beta/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool.go @@ -172,7 +172,11 @@ Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, -with dashes (-), underscores (_), dots (.), and alphanumerics between.`, +with dashes (-), underscores (_), dots (.), and alphanumerics between. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "display_name": { diff --git a/google-beta/services/gkeonprem/resource_gkeonprem_vmware_cluster.go b/google-beta/services/gkeonprem/resource_gkeonprem_vmware_cluster.go index 1c2588a238..d3ecc4d66d 100644 --- a/google-beta/services/gkeonprem/resource_gkeonprem_vmware_cluster.go +++ b/google-beta/services/gkeonprem/resource_gkeonprem_vmware_cluster.go @@ -157,7 +157,11 @@ Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, -with dashes (-), underscores (_), dots (.), and alphanumerics between.`, +with dashes (-), underscores (_), dots (.), and alphanumerics between. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "anti_affinity_groups": { diff --git a/google-beta/services/gkeonprem/resource_gkeonprem_vmware_node_pool.go b/google-beta/services/gkeonprem/resource_gkeonprem_vmware_node_pool.go index fef6fdc684..c5183caa95 100644 --- a/google-beta/services/gkeonprem/resource_gkeonprem_vmware_node_pool.go +++ b/google-beta/services/gkeonprem/resource_gkeonprem_vmware_node_pool.go @@ -203,7 +203,11 @@ Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, -with dashes (-), underscores (_), dots (.), and alphanumerics between.`, +with dashes (-), underscores (_), dots (.), and alphanumerics between. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "display_name": { diff --git a/google-beta/services/networkconnectivity/resource_network_connectivity_hub.go b/google-beta/services/networkconnectivity/resource_network_connectivity_hub.go index 296999f112..e5c364f059 100644 --- a/google-beta/services/networkconnectivity/resource_network_connectivity_hub.go +++ b/google-beta/services/networkconnectivity/resource_network_connectivity_hub.go @@ -94,7 +94,7 @@ func ResourceNetworkConnectivityHub() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/networkconnectivity/resource_network_connectivity_spoke.go b/google-beta/services/networkconnectivity/resource_network_connectivity_spoke.go index 9876d1328e..2178cf29a4 100644 --- a/google-beta/services/networkconnectivity/resource_network_connectivity_spoke.go +++ b/google-beta/services/networkconnectivity/resource_network_connectivity_spoke.go @@ -149,7 +149,7 @@ func ResourceNetworkConnectivitySpoke() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/privateca/resource_privateca_certificate_template.go b/google-beta/services/privateca/resource_privateca_certificate_template.go index 72bdd1d54d..c9b0dcb7f6 100644 --- a/google-beta/services/privateca/resource_privateca_certificate_template.go +++ b/google-beta/services/privateca/resource_privateca_certificate_template.go @@ -125,7 +125,7 @@ func ResourcePrivatecaCertificateTemplate() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "Optional. Labels with user-defined metadata.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "Optional. Labels with user-defined metadata.\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/recaptchaenterprise/resource_recaptcha_enterprise_key.go b/google-beta/services/recaptchaenterprise/resource_recaptcha_enterprise_key.go index 2df263eafa..f298487d5a 100644 --- a/google-beta/services/recaptchaenterprise/resource_recaptcha_enterprise_key.go +++ b/google-beta/services/recaptchaenterprise/resource_recaptcha_enterprise_key.go @@ -123,7 +123,7 @@ func ResourceRecaptchaEnterpriseKey() *schema.Resource { "labels": { Type: schema.TypeMap, Optional: true, - Description: "See [Creating and managing labels](https://cloud.google.com/recaptcha-enterprise/docs/labels).\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.", + Description: "See [Creating and managing labels](https://cloud.google.com/recaptcha-enterprise/docs/labels).\n\n**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.\nPlease refer to the field `effective_labels` for all of the labels present on the resource.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/services/secretmanager/resource_secret_manager_secret.go b/google-beta/services/secretmanager/resource_secret_manager_secret.go index 8ef93da8b9..052e5fa8a9 100644 --- a/google-beta/services/secretmanager/resource_secret_manager_secret.go +++ b/google-beta/services/secretmanager/resource_secret_manager_secret.go @@ -190,7 +190,11 @@ symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: -{ "name": "wrench", "mass": "1.3kg", "count": "3" }.`, +{ "name": "wrench", "mass": "1.3kg", "count": "3" }. + + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "expire_time": { diff --git a/google-beta/services/workstations/resource_workstations_workstation.go b/google-beta/services/workstations/resource_workstations_workstation.go index 8fda2f3c75..8cd152cc16 100644 --- a/google-beta/services/workstations/resource_workstations_workstation.go +++ b/google-beta/services/workstations/resource_workstations_workstation.go @@ -80,10 +80,13 @@ func ResourceWorkstationsWorkstation() *schema.Resource { Description: `ID to use for the workstation.`, }, "annotations": { - Type: schema.TypeMap, - Optional: true, - Description: `Client-specified annotations. This is distinct from labels.`, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Client-specified annotations. This is distinct from labels. + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "display_name": { Type: schema.TypeString, diff --git a/google-beta/services/workstations/resource_workstations_workstation_cluster.go b/google-beta/services/workstations/resource_workstations_workstation_cluster.go index 0a551b69e0..3e8effb8d9 100644 --- a/google-beta/services/workstations/resource_workstations_workstation_cluster.go +++ b/google-beta/services/workstations/resource_workstations_workstation_cluster.go @@ -76,10 +76,13 @@ Must be part of the subnetwork specified for this cluster.`, Description: `ID to use for the workstation cluster.`, }, "annotations": { - Type: schema.TypeMap, - Optional: true, - Description: `Client-specified annotations. This is distinct from labels.`, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Client-specified annotations. This is distinct from labels. + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "display_name": { Type: schema.TypeString, diff --git a/google-beta/services/workstations/resource_workstations_workstation_config.go b/google-beta/services/workstations/resource_workstations_workstation_config.go index dc33a3333b..1ce095fa6d 100644 --- a/google-beta/services/workstations/resource_workstations_workstation_config.go +++ b/google-beta/services/workstations/resource_workstations_workstation_config.go @@ -75,10 +75,13 @@ func ResourceWorkstationsWorkstationConfig() *schema.Resource { Description: `The ID to be assigned to the workstation cluster config.`, }, "annotations": { - Type: schema.TypeMap, - Optional: true, - Description: `Client-specified annotations. This is distinct from labels.`, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeMap, + Optional: true, + Description: `Client-specified annotations. This is distinct from labels. + +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field 'effective_annotations' for all of the annotations present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, }, "container": { Type: schema.TypeList, diff --git a/website/docs/r/alloydb_backup.html.markdown b/website/docs/r/alloydb_backup.html.markdown index 21c682fb52..3ee8678260 100644 --- a/website/docs/r/alloydb_backup.html.markdown +++ b/website/docs/r/alloydb_backup.html.markdown @@ -161,6 +161,9 @@ The following arguments are supported: (Optional) User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + * `type` - (Optional) The backup type, which suggests the trigger for the backup. @@ -180,6 +183,9 @@ The following arguments are supported: Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `project` - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used. @@ -243,6 +249,16 @@ In addition to the arguments listed above, the following computed attributes are Once the expiry quantity is over retention, the backup is eligible to be garbage collected. Structure is [documented below](#nested_expiry_quantity). +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + +* `effective_annotations` - + All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. + The `encryption_info` block contains: diff --git a/website/docs/r/alloydb_cluster.html.markdown b/website/docs/r/alloydb_cluster.html.markdown index bf3a450eaf..6efb1608d3 100644 --- a/website/docs/r/alloydb_cluster.html.markdown +++ b/website/docs/r/alloydb_cluster.html.markdown @@ -241,6 +241,9 @@ The following arguments are supported: Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `initial_user` - (Optional) Initial user to setup during cluster creation. @@ -476,6 +479,9 @@ In addition to the arguments listed above, the following computed attributes are * `effective_labels` - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. +* `effective_annotations` - + All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. + The `encryption_info` block contains: diff --git a/website/docs/r/alloydb_instance.html.markdown b/website/docs/r/alloydb_instance.html.markdown index e5bb5c3ccd..75cd5f2827 100644 --- a/website/docs/r/alloydb_instance.html.markdown +++ b/website/docs/r/alloydb_instance.html.markdown @@ -112,6 +112,8 @@ The following arguments are supported: * `annotations` - (Optional) Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `display_name` - (Optional) diff --git a/website/docs/r/assured_workloads_workload.html.markdown b/website/docs/r/assured_workloads_workload.html.markdown index 7cbaf1cf70..d93ec1cf00 100644 --- a/website/docs/r/assured_workloads_workload.html.markdown +++ b/website/docs/r/assured_workloads_workload.html.markdown @@ -96,7 +96,8 @@ The following arguments are supported: (Optional) Optional. Labels applied to the workload. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `provisioned_resources_parent` - (Optional) diff --git a/website/docs/r/cloud_run_domain_mapping.html.markdown b/website/docs/r/cloud_run_domain_mapping.html.markdown index d8be9d2c37..a18c74a0dd 100644 --- a/website/docs/r/cloud_run_domain_mapping.html.markdown +++ b/website/docs/r/cloud_run_domain_mapping.html.markdown @@ -163,6 +163,8 @@ The following arguments are supported: **Note**: The Cloud Run API may add additional annotations that were not provided in your config. If terraform plan shows a diff where a server-side annotation is added, you can add it to your config or apply the lifecycle.ignore_changes rule to the metadata.0.annotations field. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `terraform_labels` - (Output) diff --git a/website/docs/r/cloud_run_service.html.markdown b/website/docs/r/cloud_run_service.html.markdown index cc16e78856..e0f1367960 100644 --- a/website/docs/r/cloud_run_service.html.markdown +++ b/website/docs/r/cloud_run_service.html.markdown @@ -969,6 +969,8 @@ this field is set to false, the revision name will still autogenerate.) for the Service. For example, `"run.googleapis.com/ingress" = "all"`. - `run.googleapis.com/launch-stage` sets the [launch stage](https://cloud.google.com/run/docs/troubleshooting#launch-stage-validation) when a preview feature is used. For example, `"run.googleapis.com/launch-stage": "BETA"` + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `terraform_labels` - (Output) diff --git a/website/docs/r/cloud_run_v2_job.html.markdown b/website/docs/r/cloud_run_v2_job.html.markdown index 53b4535b5a..11b7d8e395 100644 --- a/website/docs/r/cloud_run_v2_job.html.markdown +++ b/website/docs/r/cloud_run_v2_job.html.markdown @@ -656,6 +656,8 @@ The following arguments are supported: Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes annotations' namespacing, limits, and rules. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `client` - (Optional) diff --git a/website/docs/r/cloud_run_v2_service.html.markdown b/website/docs/r/cloud_run_v2_service.html.markdown index 8ab1c3029e..34af6eb102 100644 --- a/website/docs/r/cloud_run_v2_service.html.markdown +++ b/website/docs/r/cloud_run_v2_service.html.markdown @@ -848,6 +848,8 @@ The following arguments are supported: Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `client` - (Optional) diff --git a/website/docs/r/cloudbuildv2_connection.html.markdown b/website/docs/r/cloudbuildv2_connection.html.markdown index f4b59b6180..52217ac555 100644 --- a/website/docs/r/cloudbuildv2_connection.html.markdown +++ b/website/docs/r/cloudbuildv2_connection.html.markdown @@ -169,7 +169,8 @@ The `read_authorizer_credential` block supports: (Optional) Allows clients to store small amounts of arbitrary data. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `disabled` - (Optional) diff --git a/website/docs/r/cloudbuildv2_repository.html.markdown b/website/docs/r/cloudbuildv2_repository.html.markdown index b08504b7d6..f2fd3eaa58 100644 --- a/website/docs/r/cloudbuildv2_repository.html.markdown +++ b/website/docs/r/cloudbuildv2_repository.html.markdown @@ -169,7 +169,8 @@ The following arguments are supported: (Optional) Allows clients to store small amounts of arbitrary data. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `location` - (Optional) diff --git a/website/docs/r/clouddeploy_delivery_pipeline.html.markdown b/website/docs/r/clouddeploy_delivery_pipeline.html.markdown index 51c92b5446..b3d619891b 100644 --- a/website/docs/r/clouddeploy_delivery_pipeline.html.markdown +++ b/website/docs/r/clouddeploy_delivery_pipeline.html.markdown @@ -289,7 +289,8 @@ The `phase_configs` block supports: (Optional) User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `description` - (Optional) @@ -299,7 +300,8 @@ The `phase_configs` block supports: (Optional) Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `project` - (Optional) diff --git a/website/docs/r/clouddeploy_target.html.markdown b/website/docs/r/clouddeploy_target.html.markdown index d0ccd07645..ea4aeb1cab 100644 --- a/website/docs/r/clouddeploy_target.html.markdown +++ b/website/docs/r/clouddeploy_target.html.markdown @@ -150,7 +150,8 @@ The following arguments are supported: (Optional) Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `anthos_cluster` - (Optional) @@ -176,7 +177,8 @@ The following arguments are supported: (Optional) Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `multi_target` - (Optional) diff --git a/website/docs/r/container_attached_cluster.html.markdown b/website/docs/r/container_attached_cluster.html.markdown index 7a62c9cfb1..fc059c3864 100644 --- a/website/docs/r/container_attached_cluster.html.markdown +++ b/website/docs/r/container_attached_cluster.html.markdown @@ -228,6 +228,9 @@ The following arguments are supported: Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `logging_config` - (Optional) Logging configuration. diff --git a/website/docs/r/container_aws_cluster.html.markdown b/website/docs/r/container_aws_cluster.html.markdown index 8495155891..7b8f63a7bd 100644 --- a/website/docs/r/container_aws_cluster.html.markdown +++ b/website/docs/r/container_aws_cluster.html.markdown @@ -463,7 +463,8 @@ The `networking` block supports: (Optional) Optional. Annotations on the cluster. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `binary_authorization` - (Optional) diff --git a/website/docs/r/container_aws_node_pool.html.markdown b/website/docs/r/container_aws_node_pool.html.markdown index 0ceba8ab2f..bad12de6cf 100644 --- a/website/docs/r/container_aws_node_pool.html.markdown +++ b/website/docs/r/container_aws_node_pool.html.markdown @@ -630,7 +630,8 @@ The `max_pods_constraint` block supports: (Optional) Optional. Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `management` - (Optional) diff --git a/website/docs/r/container_azure_cluster.html.markdown b/website/docs/r/container_azure_cluster.html.markdown index 8e5a464d34..7ee41ae050 100644 --- a/website/docs/r/container_azure_cluster.html.markdown +++ b/website/docs/r/container_azure_cluster.html.markdown @@ -270,7 +270,8 @@ The `networking` block supports: (Optional) Optional. Annotations on the cluster. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Keys can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `azure_services_authentication` - (Optional) diff --git a/website/docs/r/container_azure_node_pool.html.markdown b/website/docs/r/container_azure_node_pool.html.markdown index 0b4046855a..a9f421aa5d 100644 --- a/website/docs/r/container_azure_node_pool.html.markdown +++ b/website/docs/r/container_azure_node_pool.html.markdown @@ -221,7 +221,8 @@ The `max_pods_constraint` block supports: (Optional) Optional. Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Keys can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. +Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `azure_availability_zone` - (Optional) diff --git a/website/docs/r/dataplex_asset.html.markdown b/website/docs/r/dataplex_asset.html.markdown index 6beda74fdd..881aad6f2e 100644 --- a/website/docs/r/dataplex_asset.html.markdown +++ b/website/docs/r/dataplex_asset.html.markdown @@ -176,7 +176,8 @@ The `resource_spec` block supports: (Optional) Optional. User defined labels for the asset. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `project` - (Optional) diff --git a/website/docs/r/dataplex_lake.html.markdown b/website/docs/r/dataplex_lake.html.markdown index f335e8d803..5d32a4ae69 100644 --- a/website/docs/r/dataplex_lake.html.markdown +++ b/website/docs/r/dataplex_lake.html.markdown @@ -68,7 +68,8 @@ The following arguments are supported: (Optional) Optional. User-defined labels for the lake. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `metastore` - (Optional) diff --git a/website/docs/r/dataplex_zone.html.markdown b/website/docs/r/dataplex_zone.html.markdown index ceb36b0eac..30d7587af7 100644 --- a/website/docs/r/dataplex_zone.html.markdown +++ b/website/docs/r/dataplex_zone.html.markdown @@ -136,7 +136,8 @@ The `resource_spec` block supports: (Optional) Optional. User defined labels for the zone. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `project` - (Optional) diff --git a/website/docs/r/eventarc_trigger.html.markdown b/website/docs/r/eventarc_trigger.html.markdown index 0745382411..0ad6679a24 100644 --- a/website/docs/r/eventarc_trigger.html.markdown +++ b/website/docs/r/eventarc_trigger.html.markdown @@ -143,7 +143,8 @@ The `matching_criteria` block supports: (Optional) Optional. User labels attached to the triggers that can be used to group resources. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `project` - (Optional) diff --git a/website/docs/r/gkeonprem_bare_metal_admin_cluster.html.markdown b/website/docs/r/gkeonprem_bare_metal_admin_cluster.html.markdown index 206893d011..b29da8ddcb 100644 --- a/website/docs/r/gkeonprem_bare_metal_admin_cluster.html.markdown +++ b/website/docs/r/gkeonprem_bare_metal_admin_cluster.html.markdown @@ -223,6 +223,9 @@ The following arguments are supported: Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `network_config` - (Optional) Network configuration. diff --git a/website/docs/r/gkeonprem_bare_metal_cluster.html.markdown b/website/docs/r/gkeonprem_bare_metal_cluster.html.markdown index 6443c8ae51..6afc1bc5f1 100644 --- a/website/docs/r/gkeonprem_bare_metal_cluster.html.markdown +++ b/website/docs/r/gkeonprem_bare_metal_cluster.html.markdown @@ -897,6 +897,9 @@ The following arguments are supported: Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `proxy` - (Optional) Specifies the cluster proxy configuration. diff --git a/website/docs/r/gkeonprem_bare_metal_node_pool.html.markdown b/website/docs/r/gkeonprem_bare_metal_node_pool.html.markdown index 457db8dcdf..dd4797db4e 100644 --- a/website/docs/r/gkeonprem_bare_metal_node_pool.html.markdown +++ b/website/docs/r/gkeonprem_bare_metal_node_pool.html.markdown @@ -317,6 +317,9 @@ The following arguments are supported: Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `project` - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used. diff --git a/website/docs/r/gkeonprem_vmware_cluster.html.markdown b/website/docs/r/gkeonprem_vmware_cluster.html.markdown index dc1b3701b7..dc5ec0349f 100644 --- a/website/docs/r/gkeonprem_vmware_cluster.html.markdown +++ b/website/docs/r/gkeonprem_vmware_cluster.html.markdown @@ -322,6 +322,9 @@ The following arguments are supported: Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `anti_affinity_groups` - (Optional) AAGConfig specifies whether to spread VMware User Cluster nodes across at diff --git a/website/docs/r/gkeonprem_vmware_node_pool.html.markdown b/website/docs/r/gkeonprem_vmware_node_pool.html.markdown index e2ac709bbc..e7b041bf4a 100644 --- a/website/docs/r/gkeonprem_vmware_node_pool.html.markdown +++ b/website/docs/r/gkeonprem_vmware_node_pool.html.markdown @@ -285,6 +285,9 @@ The following arguments are supported: Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `node_pool_autoscaling` - (Optional) Node Pool autoscaling config for the node pool. diff --git a/website/docs/r/network_connectivity_hub.html.markdown b/website/docs/r/network_connectivity_hub.html.markdown index 2b71a3bdc9..8ecabdc484 100644 --- a/website/docs/r/network_connectivity_hub.html.markdown +++ b/website/docs/r/network_connectivity_hub.html.markdown @@ -58,7 +58,8 @@ The following arguments are supported: (Optional) Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `project` - (Optional) diff --git a/website/docs/r/network_connectivity_spoke.html.markdown b/website/docs/r/network_connectivity_spoke.html.markdown index dced96fae8..7e35eacffe 100644 --- a/website/docs/r/network_connectivity_spoke.html.markdown +++ b/website/docs/r/network_connectivity_spoke.html.markdown @@ -155,7 +155,8 @@ The `instances` block supports: (Optional) Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `linked_interconnect_attachments` - (Optional) diff --git a/website/docs/r/privateca_certificate_template.html.markdown b/website/docs/r/privateca_certificate_template.html.markdown index 6c223cc121..f05abe79ab 100644 --- a/website/docs/r/privateca_certificate_template.html.markdown +++ b/website/docs/r/privateca_certificate_template.html.markdown @@ -146,7 +146,8 @@ The `object_id` block supports: (Optional) Optional. Labels with user-defined metadata. -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `passthrough_extensions` - (Optional) diff --git a/website/docs/r/recaptcha_enterprise_key.html.markdown b/website/docs/r/recaptcha_enterprise_key.html.markdown index 71091af150..762c8f7c46 100644 --- a/website/docs/r/recaptcha_enterprise_key.html.markdown +++ b/website/docs/r/recaptcha_enterprise_key.html.markdown @@ -163,7 +163,8 @@ The following arguments are supported: (Optional) See [Creating and managing labels](https://cloud.google.com/recaptcha-enterprise/docs/labels). -**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field `effective_labels` for all of the labels present on the resource. * `project` - (Optional) diff --git a/website/docs/r/secret_manager_secret.html.markdown b/website/docs/r/secret_manager_secret.html.markdown index 727bf2c2d6..797c441975 100644 --- a/website/docs/r/secret_manager_secret.html.markdown +++ b/website/docs/r/secret_manager_secret.html.markdown @@ -216,6 +216,9 @@ The following arguments are supported: An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. + * `version_aliases` - (Optional) Mapping from version alias to version name. diff --git a/website/docs/r/workstations_workstation.html.markdown b/website/docs/r/workstations_workstation.html.markdown index c654549a63..47aa76c5b9 100644 --- a/website/docs/r/workstations_workstation.html.markdown +++ b/website/docs/r/workstations_workstation.html.markdown @@ -143,6 +143,8 @@ The following arguments are supported: * `annotations` - (Optional) Client-specified annotations. This is distinct from labels. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `env` - (Optional) diff --git a/website/docs/r/workstations_workstation_cluster.html.markdown b/website/docs/r/workstations_workstation_cluster.html.markdown index 4ea79bdec6..0228c114f3 100644 --- a/website/docs/r/workstations_workstation_cluster.html.markdown +++ b/website/docs/r/workstations_workstation_cluster.html.markdown @@ -157,6 +157,8 @@ The following arguments are supported: * `annotations` - (Optional) Client-specified annotations. This is distinct from labels. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `private_cluster_config` - (Optional) diff --git a/website/docs/r/workstations_workstation_config.html.markdown b/website/docs/r/workstations_workstation_config.html.markdown index d5321de212..4ab2981d23 100644 --- a/website/docs/r/workstations_workstation_config.html.markdown +++ b/website/docs/r/workstations_workstation_config.html.markdown @@ -528,6 +528,8 @@ The following arguments are supported: * `annotations` - (Optional) Client-specified annotations. This is distinct from labels. + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. + Please refer to the field `effective_annotations` for all of the annotations present on the resource. * `idle_timeout` - (Optional)