make provider-wide region optional (#916)

This commit is contained in:
Dana Hoffman 2018-01-03 14:09:46 -08:00 committed by GitHub
parent 437b1beb2e
commit 5bf56797f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ func Provider() terraform.ResourceProvider {
"region": &schema.Schema{ "region": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Optional: true,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{ DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_REGION", "GOOGLE_REGION",
"GCLOUD_REGION", "GCLOUD_REGION",

View File

@ -68,7 +68,7 @@ The following keys can be used to configure the provider.
* `GCLOUD_PROJECT` * `GCLOUD_PROJECT`
* `CLOUDSDK_CORE_PROJECT` * `CLOUDSDK_CORE_PROJECT`
* `region` - (Required) The region to operate under, if not specified by a given resource. * `region` - (Optional) The region to operate under, if not specified by a given resource.
This can also be specified using any of the following environment variables (listed in order of This can also be specified using any of the following environment variables (listed in order of
precedence): precedence):