Add tests and documentation for subnetwork attribute
This commit is contained in:
parent
942aaa7a85
commit
daf57c7632
|
@ -168,6 +168,13 @@ func TestImageName(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRegion(t *testing.T) {
|
||||||
|
c, _, _ := NewConfig(testConfig(t))
|
||||||
|
if c.Region != "us-east1" {
|
||||||
|
t.Fatalf("Region should be 'us-east1' given Zone of 'us-east1-a', but is %s", c.Region)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Helper stuff below
|
// Helper stuff below
|
||||||
|
|
||||||
func testConfig(t *testing.T) map[string]interface{} {
|
func testConfig(t *testing.T) map[string]interface{} {
|
||||||
|
@ -175,7 +182,7 @@ func testConfig(t *testing.T) map[string]interface{} {
|
||||||
"account_file": testAccountFile(t),
|
"account_file": testAccountFile(t),
|
||||||
"project_id": "hashicorp",
|
"project_id": "hashicorp",
|
||||||
"source_image": "foo",
|
"source_image": "foo",
|
||||||
"zone": "us-east-1a",
|
"zone": "us-east1-a",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,10 @@ builder.
|
||||||
- `state_timeout` (string) - The time to wait for instance state changes.
|
- `state_timeout` (string) - The time to wait for instance state changes.
|
||||||
Defaults to `"5m"`.
|
Defaults to `"5m"`.
|
||||||
|
|
||||||
|
- `subnetwork` (string) - The Google Compute subnetwork to use for the launced
|
||||||
|
instance. Only required if the `network` has been created with custom
|
||||||
|
subnetting.
|
||||||
|
|
||||||
- `tags` (array of strings)
|
- `tags` (array of strings)
|
||||||
|
|
||||||
- `use_internal_ip` (boolean) - If true, use the instance's internal IP
|
- `use_internal_ip` (boolean) - If true, use the instance's internal IP
|
||||||
|
|
Loading…
Reference in New Issue