|
|
|
|
@ -17,7 +17,7 @@ func Provider() terraform.ResourceProvider {
|
|
|
|
|
"user_name": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
DefaultFunc: schema.EnvDefaultFunc("OS_USERNAME", nil),
|
|
|
|
|
DefaultFunc: schema.EnvDefaultFunc("OS_USERNAME", ""),
|
|
|
|
|
},
|
|
|
|
|
"user_id": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
@ -37,13 +37,18 @@ func Provider() terraform.ResourceProvider {
|
|
|
|
|
"password": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
DefaultFunc: schema.EnvDefaultFunc("OS_PASSWORD", nil),
|
|
|
|
|
DefaultFunc: schema.EnvDefaultFunc("OS_PASSWORD", ""),
|
|
|
|
|
},
|
|
|
|
|
"api_key": &schema.Schema{
|
|
|
|
|
"token": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
DefaultFunc: schema.EnvDefaultFunc("OS_AUTH_TOKEN", ""),
|
|
|
|
|
},
|
|
|
|
|
"api_key": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
DefaultFunc: schema.EnvDefaultFunc("OS_API_KEY", ""),
|
|
|
|
|
},
|
|
|
|
|
"domain_id": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
@ -104,6 +109,7 @@ func configureProvider(d *schema.ResourceData) (interface{}, error) {
|
|
|
|
|
Username: d.Get("user_name").(string),
|
|
|
|
|
UserID: d.Get("user_id").(string),
|
|
|
|
|
Password: d.Get("password").(string),
|
|
|
|
|
Token: d.Get("token").(string),
|
|
|
|
|
APIKey: d.Get("api_key").(string),
|
|
|
|
|
TenantID: d.Get("tenant_id").(string),
|
|
|
|
|
TenantName: d.Get("tenant_name").(string),
|
|
|
|
|
|