diff --git a/google/data_source_google_container_engine_versions.go b/google/data_source_google_container_engine_versions.go index 3ba9217f13c..fcf7bfb36d9 100644 --- a/google/data_source_google_container_engine_versions.go +++ b/google/data_source_google_container_engine_versions.go @@ -28,11 +28,13 @@ func dataSourceGoogleContainerEngineVersions() *schema.Resource { Type: schema.TypeString, Optional: true, Removed: "Use location instead", + Computed: true, }, "region": { Type: schema.TypeString, Optional: true, Removed: "Use location instead", + Computed: true, }, "default_cluster_version": { Type: schema.TypeString, diff --git a/google/node_config.go b/google/node_config.go index 2e5bb9c25ee..bf2579f4728 100644 --- a/google/node_config.go +++ b/google/node_config.go @@ -202,6 +202,7 @@ var schemaNodeConfig = &schema.Schema{ "workload_metadata_config": { Removed: "This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/guides/provider_versions.html for more details.", + Computed: true, Type: schema.TypeList, Optional: true, ForceNew: true, @@ -220,6 +221,7 @@ var schemaNodeConfig = &schema.Schema{ "sandbox_config": { Removed: "This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/guides/provider_versions.html for more details.", + Computed: true, Type: schema.TypeList, Optional: true, ForceNew: true, diff --git a/google/resource_compute_forwarding_rule.go b/google/resource_compute_forwarding_rule.go index fbd5fce82d4..644bbf23af7 100644 --- a/google/resource_compute_forwarding_rule.go +++ b/google/resource_compute_forwarding_rule.go @@ -268,6 +268,7 @@ This field is only used for INTERNAL load balancing.`, Type: schema.TypeString, Optional: true, Removed: "ipVersion is not used for regional forwarding rules. Please remove this field if you are using it.", + Computed: true, }, "project": { Type: schema.TypeString, diff --git a/google/resource_compute_instance_group_manager.go b/google/resource_compute_instance_group_manager.go index a7ee7081dab..42f21d003d0 100644 --- a/google/resource_compute_instance_group_manager.go +++ b/google/resource_compute_instance_group_manager.go @@ -37,11 +37,10 @@ func resourceComputeInstanceGroupManager() *schema.Resource { }, "instance_template": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Removed: "This field has been replaced by `version.instance_template`", - DiffSuppressFunc: compareSelfLinkRelativePaths, + Type: schema.TypeString, + Optional: true, + Computed: true, + Removed: "This field has been replaced by `version.instance_template`", }, "version": { diff --git a/google/resource_compute_network_peering.go b/google/resource_compute_network_peering.go index a4e988ddfcf..9f533a296f4 100644 --- a/google/resource_compute_network_peering.go +++ b/google/resource_compute_network_peering.go @@ -61,7 +61,7 @@ func resourceComputeNetworkPeering() *schema.Resource { Type: schema.TypeBool, Optional: true, Removed: "auto_create_routes has been removed because it's redundant and not user-configurable. It can safely be removed from your config", - ForceNew: true, + Computed: true, }, }, } diff --git a/google/resource_compute_region_instance_group_manager.go b/google/resource_compute_region_instance_group_manager.go index 3efe09b4897..59c9a271eb1 100644 --- a/google/resource_compute_region_instance_group_manager.go +++ b/google/resource_compute_region_instance_group_manager.go @@ -143,6 +143,7 @@ func resourceComputeRegionInstanceGroupManager() *schema.Resource { Type: schema.TypeString, Removed: "This field is removed.", Optional: true, + Computed: true, }, "target_pools": { diff --git a/google/resource_container_cluster.go b/google/resource_container_cluster.go index 2e36258d9ab..965f030f1d6 100644 --- a/google/resource_container_cluster.go +++ b/google/resource_container_cluster.go @@ -125,12 +125,14 @@ func resourceContainerCluster() *schema.Resource { Type: schema.TypeString, Optional: true, Removed: "Use location instead", + Computed: true, }, "zone": { Type: schema.TypeString, Optional: true, Removed: "Use location instead", + Computed: true, }, "node_locations": { @@ -144,6 +146,7 @@ func resourceContainerCluster() *schema.Resource { Type: schema.TypeSet, Optional: true, Removed: "Use node_locations instead", + Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -188,6 +191,7 @@ func resourceContainerCluster() *schema.Resource { Type: schema.TypeList, Optional: true, Removed: "The Kubernetes Dashboard addon is removed for clusters on GKE.", + Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -517,6 +521,7 @@ func resourceContainerCluster() *schema.Resource { "pod_security_policy_config": { // Remove return nil from expand when this is removed for good. Removed: "This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/guides/provider_versions.html for more details.", + Computed: true, Type: schema.TypeList, Optional: true, MaxItems: 1, @@ -717,6 +722,7 @@ func resourceContainerCluster() *schema.Resource { Type: schema.TypeBool, Optional: true, Removed: "This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/guides/provider_versions.html for more details.", + Computed: true, }, }, } diff --git a/google/resource_container_node_pool.go b/google/resource_container_node_pool.go index 30a9a7fe4e5..807a904185f 100644 --- a/google/resource_container_node_pool.go +++ b/google/resource_container_node_pool.go @@ -56,11 +56,13 @@ func resourceContainerNodePool() *schema.Resource { Type: schema.TypeString, Optional: true, Removed: "use location instead", + Computed: true, }, "region": { Type: schema.TypeString, Optional: true, Removed: "use location instead", + Computed: true, }, "location": { Type: schema.TypeString, diff --git a/google/resource_google_service_account_key.go b/google/resource_google_service_account_key.go index 6cd114e72f7..0623cb9c542 100644 --- a/google/resource_google_service_account_key.go +++ b/google/resource_google_service_account_key.go @@ -32,8 +32,8 @@ func resourceGoogleServiceAccountKey() *schema.Resource { "pgp_key": { Type: schema.TypeString, Optional: true, - ForceNew: true, Removed: "The pgp_key field has been removed. See https://www.terraform.io/docs/extend/best-practices/sensitive-state.html for more information.", + Computed: true, }, "private_key_type": { Type: schema.TypeString, diff --git a/google/resource_monitoring_alert_policy.go b/google/resource_monitoring_alert_policy.go index 3d509348566..3458e08a87d 100644 --- a/google/resource_monitoring_alert_policy.go +++ b/google/resource_monitoring_alert_policy.go @@ -708,7 +708,8 @@ Its syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Removed: "labels is removed as it was never used. See user_labels for the correct field", + Removed: "labels is removed as it was never used. See user_labels for the correct field", + Computed: true, }, "project": { Type: schema.TypeString, diff --git a/google/resource_monitoring_uptime_check_config.go b/google/resource_monitoring_uptime_check_config.go index da3ea44daa2..2075f484a0e 100644 --- a/google/resource_monitoring_uptime_check_config.go +++ b/google/resource_monitoring_uptime_check_config.go @@ -237,37 +237,44 @@ func resourceMonitoringUptimeCheckConfig() *schema.Resource { Type: schema.TypeBool, Optional: true, Removed: "This field never worked, and will be removed in 3.0.0.", + Computed: true, }, "internal_checkers": { Type: schema.TypeList, Optional: true, Removed: "This field never worked, and will be removed in 3.0.0.", + Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "display_name": { Type: schema.TypeString, Optional: true, Removed: "This field never worked, and will be removed in 3.0.0.", + Computed: true, }, "gcp_zone": { Type: schema.TypeString, Optional: true, Removed: "This field never worked, and will be removed in 3.0.0.", + Computed: true, }, "name": { Type: schema.TypeString, Optional: true, Removed: "This field never worked, and will be removed in 3.0.0.", + Computed: true, }, "network": { Type: schema.TypeString, Optional: true, Removed: "This field never worked, and will be removed in 3.0.0.", + Computed: true, }, "peer_project_id": { Type: schema.TypeString, Optional: true, Removed: "This field never worked, and will be removed in 3.0.0.", + Computed: true, }, }, }, diff --git a/google/resource_storage_bucket.go b/google/resource_storage_bucket.go index a9b908897d2..f2331af374f 100644 --- a/google/resource_storage_bucket.go +++ b/google/resource_storage_bucket.go @@ -151,6 +151,7 @@ func resourceStorageBucket() *schema.Resource { Type: schema.TypeBool, Optional: true, Removed: "Please use `with_state` instead", + Computed: true, }, "with_state": { Type: schema.TypeString,