From 0b912da38c67d01228d94a69bf218cb366144e62 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 5 Sep 2017 07:47:55 +0100 Subject: [PATCH] Remove 'id' fields from schemas --- google/resource_compute_ssl_certificate.go | 7 ------- google/resource_compute_target_http_proxy.go | 7 ------- google/resource_compute_target_https_proxy.go | 7 ------- google/resource_compute_url_map.go | 7 ------- google/resource_google_project.go | 6 ------ 5 files changed, 34 deletions(-) diff --git a/google/resource_compute_ssl_certificate.go b/google/resource_compute_ssl_certificate.go index ead49a7d333..b54b8c97f88 100644 --- a/google/resource_compute_ssl_certificate.go +++ b/google/resource_compute_ssl_certificate.go @@ -2,7 +2,6 @@ package google import ( "fmt" - "strconv" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -61,11 +60,6 @@ func resourceComputeSslCertificate() *schema.Resource { ForceNew: true, }, - "id": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - "project": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -140,7 +134,6 @@ func resourceComputeSslCertificateRead(d *schema.ResourceData, meta interface{}) } d.Set("self_link", cert.SelfLink) - d.Set("id", strconv.FormatUint(cert.Id, 10)) return nil } diff --git a/google/resource_compute_target_http_proxy.go b/google/resource_compute_target_http_proxy.go index 26cebc7c2a7..b577fb64c63 100644 --- a/google/resource_compute_target_http_proxy.go +++ b/google/resource_compute_target_http_proxy.go @@ -3,7 +3,6 @@ package google import ( "fmt" "log" - "strconv" "github.com/hashicorp/terraform/helper/schema" "google.golang.org/api/compute/v1" @@ -34,11 +33,6 @@ func resourceComputeTargetHttpProxy() *schema.Resource { ForceNew: true, }, - "id": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - "project": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -134,7 +128,6 @@ func resourceComputeTargetHttpProxyRead(d *schema.ResourceData, meta interface{} } d.Set("self_link", proxy.SelfLink) - d.Set("id", strconv.FormatUint(proxy.Id, 10)) return nil } diff --git a/google/resource_compute_target_https_proxy.go b/google/resource_compute_target_https_proxy.go index c56c7c37d96..7746d29f2d2 100644 --- a/google/resource_compute_target_https_proxy.go +++ b/google/resource_compute_target_https_proxy.go @@ -3,7 +3,6 @@ package google import ( "fmt" "log" - "strconv" "github.com/hashicorp/terraform/helper/schema" "google.golang.org/api/compute/v1" @@ -55,11 +54,6 @@ func resourceComputeTargetHttpsProxy() *schema.Resource { Computed: true, }, - "id": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - "project": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -178,7 +172,6 @@ func resourceComputeTargetHttpsProxyRead(d *schema.ResourceData, meta interface{ d.Set("ssl_certificates", proxy.SslCertificates) d.Set("self_link", proxy.SelfLink) - d.Set("id", strconv.FormatUint(proxy.Id, 10)) return nil } diff --git a/google/resource_compute_url_map.go b/google/resource_compute_url_map.go index 6a53fe6845e..e74cc5f445f 100644 --- a/google/resource_compute_url_map.go +++ b/google/resource_compute_url_map.go @@ -2,7 +2,6 @@ package google import ( "fmt" - "strconv" "github.com/hashicorp/terraform/helper/schema" "google.golang.org/api/compute/v1" @@ -63,11 +62,6 @@ func resourceComputeUrlMap() *schema.Resource { }, }, - "id": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - "path_matcher": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -315,7 +309,6 @@ func resourceComputeUrlMapRead(d *schema.ResourceData, meta interface{}) error { d.SetId(name) d.Set("self_link", urlMap.SelfLink) - d.Set("id", strconv.FormatUint(urlMap.Id, 10)) d.Set("fingerprint", urlMap.Fingerprint) hostRuleMap := make(map[string]*compute.HostRule) diff --git a/google/resource_google_project.go b/google/resource_google_project.go index 5b6efbce433..0bbc7107ed5 100644 --- a/google/resource_google_project.go +++ b/google/resource_google_project.go @@ -30,12 +30,6 @@ func resourceGoogleProject() *schema.Resource { MigrateState: resourceGoogleProjectMigrateState, Schema: map[string]*schema.Schema{ - "id": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - Removed: "The id field has been removed. Use project_id instead.", - }, "project_id": &schema.Schema{ Type: schema.TypeString, Required: true,