Skip to content

Commit

Permalink
Add missing fields to instance template's network_interfaces sc… (#3197
Browse files Browse the repository at this point in the history
…) (#5812)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored and rileykarson committed Mar 9, 2020
1 parent 273f2b0 commit b54f16c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .changelog/3197.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
8 changes: 4 additions & 4 deletions google/resource_compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ func resourceComputeInstance() *schema.Resource {
ForceNew: true,
},

"name": {
"network_ip": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},

"network_ip": {
"name": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},

Expand Down
26 changes: 18 additions & 8 deletions google/resource_compute_instance_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,6 @@ func resourceComputeInstanceTemplate() *schema.Resource {
DiffSuppressFunc: compareSelfLinkOrResourceName,
},

"network_ip": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},

"subnetwork": {
Type: schema.TypeString,
Optional: true,
Expand All @@ -252,6 +246,17 @@ func resourceComputeInstanceTemplate() *schema.Resource {
Computed: true,
},

"network_ip": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},

"name": {
Type: schema.TypeString,
Computed: true,
},

"access_config": {
Type: schema.TypeList,
Optional: true,
Expand All @@ -270,10 +275,15 @@ func resourceComputeInstanceTemplate() *schema.Resource {
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD"}, false),
},
"assigned_nat_ip": {
"assigned_nat_ip":{
Type: schema.TypeString,
Computed: true,
Removed: "Use network_interface.access_config.nat_ip instead.",
},
// Possibly configurable- this was added so we don't break if it's inadvertently set
"public_ptr_domain_name": {
Type: schema.TypeString,
Computed: true,
Removed: "Use network_interface.access_config.nat_ip instead.",
},
},
},
Expand Down

0 comments on commit b54f16c

Please sign in to comment.