Make it allowable to add 'network_interface' as workaround for element function (#2018)

Make it allowable to add 'network_interface', 'boot_disk', 'machine_type' as workaround for element function.
This commit is contained in:
Nathan McKinley 2018-09-20 16:49:48 -07:00 committed by GitHub
parent b8cbf46367
commit bfb1feb4cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,10 @@ func computeInstanceFromTemplateSchema() map[string]*schema.Schema {
s := resourceComputeInstance().Schema
for _, field := range []string{"boot_disk", "machine_type", "network_interface"} {
// The user can set these fields as an override, but doesn't need to -
// the template values will be used if they're unset.
s[field].Required = false
s[field].Optional = true
}
// Remove deprecated/removed fields that are never d.Set. We can't