provider/openstack: Add Support for Domain environment variables

This commit adds the ability to specify the Domain ID and Domain Name
by OS_DOMAIN_ID and OS_DOMAIN_NAME respectively.
This commit is contained in:
Joe Topjian 2016-02-27 04:34:17 +00:00
parent 93b552a58c
commit 8d00ee3836
2 changed files with 10 additions and 8 deletions

View File

@ -49,12 +49,12 @@ func Provider() terraform.ResourceProvider {
"domain_id": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Default: "",
DefaultFunc: envDefaultFuncAllowMissing("OS_DOMAIN_ID"),
},
"domain_name": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Default: "",
DefaultFunc: envDefaultFuncAllowMissing("OS_DOMAIN_NAME"),
},
"insecure": &schema.Schema{
Type: schema.TypeBool,

View File

@ -48,9 +48,11 @@ The following arguments are supported:
* `api_key` - (Optional; Required if not using `password`)
* `domain_id` - (Optional)
* `domain_id` - (Optional) If omitted, the `OS_DOMAIN_ID` environment
variable is used.
* `domain_name` - (Optional)
* `domain_name` - (Optional) If omitted, the `OS_DOMAIN_NAME`
environment variable is used.
* `tenant_id` - (Optional)