Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make auth_url optional #328

Merged
merged 1 commit into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions huaweicloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ func Provider() terraform.ResourceProvider {
},

"auth_url": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("OS_AUTH_URL", ""),
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc(
"OS_AUTH_URL", "https://iam.myhuaweicloud.com:443/v3"),
Description: descriptions["auth_url"],
},

Expand Down
12 changes: 2 additions & 10 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ provider "huaweicloud" {
domain_name = "${var.domain_name}"
tenant_name = "${var.tenant_name}"
region = "${var.region}"
auth_url = "https://iam.myhwclouds.com:443/v3"
}

# Create a web server
Expand All @@ -51,7 +50,6 @@ provider "huaweicloud" {
domain_name = "${var.domain_name}"
tenant_name = "${var.tenant_name}"
region = "${var.region}"
auth_url = "https://iam.myhwclouds.com:443/v3"
}
```

Expand All @@ -64,7 +62,6 @@ provider "huaweicloud" {
domain_name = "${var.domain_name}"
tenant_name = "${var.tenant_name}"
region = "${var.region}"
auth_url = "https://iam.myhwclouds.com:443/v3"
}
```

Expand All @@ -76,7 +73,6 @@ provider "huaweicloud" {
domain_name = "${var.domain_name}"
tenant_name = "${var.tenant_name}"
region = "${var.region}"
auth_url = "https://iam.myhwclouds.com:443/v3"
}
```

Expand All @@ -93,7 +89,6 @@ provider "huaweicloud" {
password = "${var.password}"
domain_name = "${var.domain_name}"
region = "${var.region}"
auth_url = "https://iam.myhwclouds.com:443/v3"
}
```

Expand All @@ -108,7 +103,6 @@ provider "huaweicloud" {
secret_key = "${var.secret_key}"
domain_name = "${var.domain_name}"
region = "${var.region}"
auth_url = "https://iam.myhwclouds.com:443/v3"
}
```

Expand All @@ -121,7 +115,6 @@ provider "huaweicloud" {
delegated_project = "${var.delegated_project}"
token = "${var.token}"
region = "${var.region}"
auth_url = "https://iam.myhwclouds.com:443/v3"
}
```
```token``` specified is not the normal token, but must have the authority of 'Agent Operator'
Expand All @@ -136,9 +129,8 @@ The following arguments are supported:
* `secret_key` - (Optional) The secret key of the HuaweiCloud to use.
If omitted, the `OS_SECRET_KEY` environment variable is used.

* `auth_url` - (Required) The Identity authentication URL. If omitted, the
`OS_AUTH_URL` environment variable is used. To find the auth_url, you can
refer to [Regions and Endpoints](https://developer.huaweicloud.com/en-us/endpoint)
* `auth_url` - (Optional, Required before 1.14.0) The Identity authentication URL. If omitted, the
`OS_AUTH_URL` environment variable is used. This is not required if you use Huawei Cloud.

* `region` - (Optional) The region of the HuaweiCloud to use. If omitted,
the `OS_REGION_NAME` environment variable is used. If `OS_REGION_NAME` is
Expand Down