Skip to content

Commit

Permalink
fix(tfv): Fix missing zone in compute instance (#7466)
Browse files Browse the repository at this point in the history
* fix(tfv): Fix missing zone in compute instance

* fix testfile

* fix instance testdata

* fix example_compute_instance
  • Loading branch information
iyabchen authored Mar 22, 2023
1 parent c59cbca commit 2fbe9b8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions mmv1/third_party/validator/compute_instance.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func expandComputeInstance(project string, d TerraformResourceData, config *Conf
MachineType: machineTypeUrl,
Metadata: metadata,
Name: d.Get("name").(string),
Zone: d.Get("zone").(string),
NetworkInterfaces: networkInterfaces,
Tags: resourceInstanceTags(d),
Labels: expandLabels(d),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"bar",
"foo"
]
}
},
"zone": "us-central1-a"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"bar",
"foo"
]
}
},
"zone": "us-central1-a"
}
},
"iam_policy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"bar",
"foo"
]
}
},
"zone": "us-central1-a"
}
},
"iam_policy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"bar",
"foo"
]
}
},
"zone": "us-central1-a"
}
},
"iam_policy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
"bar",
"foo"
]
}
},
"zone": "us-central1-a"
}
}
},
Expand All @@ -157,7 +158,7 @@
"boot": true,
"diskEncryptionKey": {
"kmsKeyName": "test-kms_key_self_link"
},
},
"mode": "READ_WRITE"
}
],
Expand All @@ -172,7 +173,8 @@
"scheduling": {
"automaticRestart": true
},
"tags": {}
"tags": {},
"zone": "us-central1-a"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion mmv1/third_party/validator/tests/data/instance.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"bar",
"foo"
]
}
},
"zone": "us-central1-a"
}
}
}
Expand Down

0 comments on commit 2fbe9b8

Please sign in to comment.