Skip to content

Commit

Permalink
Remove google_compute_instance*.address
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson authored and modular-magician committed Dec 10, 2018
1 parent f1676a1 commit df52c32
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
16 changes: 8 additions & 8 deletions google/resource_compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
},
},
},
},
Expand Down
16 changes: 7 additions & 9 deletions google/resource_compute_instance_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -292,6 +283,13 @@ func resourceComputeInstanceTemplate() *schema.Resource {
},
},
},

"address": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Optional: true,
Removed: "Please use network_ip",
},
},
},
},
Expand Down
4 changes: 0 additions & 4 deletions website/docs/r/compute_instance_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit df52c32

Please sign in to comment.