From 77e87d0f9b621ecefb2f532b7a030fa334d4f1cf Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 10 Dec 2018 09:39:09 -0800 Subject: [PATCH] Remove google_compute_instance*.address (#2595) /cc @rileykarson --- google/resource_compute_instance.go | 16 ++++++++-------- google/resource_compute_instance_template.go | 16 +++++++--------- .../r/compute_instance_template.html.markdown | 4 ---- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/google/resource_compute_instance.go b/google/resource_compute_instance.go index 037515e780b..39c6a00550b 100644 --- a/google/resource_compute_instance.go +++ b/google/resource_compute_instance.go @@ -167,14 +167,6 @@ func resourceComputeInstance() *schema.Resource { Computed: true, }, - "address": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - Removed: "Please use network_ip", - }, - "network_ip": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -231,6 +223,14 @@ func resourceComputeInstance() *schema.Resource { }, }, }, + + "address": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + Removed: "Please use network_ip", + }, }, }, }, diff --git a/google/resource_compute_instance_template.go b/google/resource_compute_instance_template.go index 979172acf21..35fae36543a 100644 --- a/google/resource_compute_instance_template.go +++ b/google/resource_compute_instance_template.go @@ -215,17 +215,8 @@ func resourceComputeInstanceTemplate() *schema.Resource { DiffSuppressFunc: compareSelfLinkOrResourceName, }, - "address": &schema.Schema{ - Type: schema.TypeString, - Computed: true, // Computed because it is set if network_ip is set. - Optional: true, - ForceNew: true, - Deprecated: "Please use network_ip", - }, - "network_ip": &schema.Schema{ Type: schema.TypeString, - Computed: true, // Computed because it is set if address is set. Optional: true, ForceNew: true, }, @@ -292,6 +283,13 @@ func resourceComputeInstanceTemplate() *schema.Resource { }, }, }, + + "address": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + Optional: true, + Removed: "Please use network_ip", + }, }, }, }, diff --git a/website/docs/r/compute_instance_template.html.markdown b/website/docs/r/compute_instance_template.html.markdown index e82dae7defa..db6fe328c96 100644 --- a/website/docs/r/compute_instance_template.html.markdown +++ b/website/docs/r/compute_instance_template.html.markdown @@ -313,10 +313,6 @@ The `network_interface` block supports: * `subnetwork_project` - (Optional) The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used. -* `address` - (Optional, Deprecated) The private IP address to assign to the instance. If - empty, the address will be automatically assigned. This attribute has been deprecated. - Use `network_interface.network_ip` instead. - * `network_ip` - (Optional) The private IP address to assign to the instance. If empty, the address will be automatically assigned.