provider/aws: Align field names with conventions (lowercase+underscore)

This commit is contained in:
Radek Simko 2017-04-06 10:36:52 +01:00
parent 668a09aa00
commit caa82d70ca
No known key found for this signature in database
GPG Key ID: 6823F3DCCE01BB19
3 changed files with 14 additions and 14 deletions

View File

@ -30,13 +30,13 @@ func resourceAwsIamOpenIDConnectProvider() *schema.Resource {
ValidateFunc: validateOpenIdURL,
DiffSuppressFunc: suppressOpenIdURL,
},
"client-id-list": &schema.Schema{
"client_id_list": &schema.Schema{
Elem: &schema.Schema{Type: schema.TypeString},
Type: schema.TypeList,
Required: true,
ForceNew: true,
},
"thumbprint-list": &schema.Schema{
"thumbprint_list": &schema.Schema{
Elem: &schema.Schema{Type: schema.TypeString},
Type: schema.TypeList,
Required: true,
@ -58,8 +58,8 @@ func resourceAwsIamOpenIDConnectProviderCreate(d *schema.ResourceData, meta inte
input := &iam.CreateOpenIDConnectProviderInput{
Url: aws.String(d.Get("url").(string)),
ClientIDList: aws.StringSlice(stringListToStringSlice(d.Get("client-id-list").([]interface{}))),
ThumbprintList: aws.StringSlice(stringListToStringSlice(d.Get("thumbprint-list").([]interface{}))),
ClientIDList: aws.StringSlice(stringListToStringSlice(d.Get("client_id_list").([]interface{}))),
ThumbprintList: aws.StringSlice(stringListToStringSlice(d.Get("thumbprint_list").([]interface{}))),
}
out, err := iamconn.CreateOpenIDConnectProvider(input)
@ -84,9 +84,9 @@ func resourceAwsIamOpenIDConnectProviderRead(d *schema.ResourceData, meta interf
}
d.Set("arn", d.Id())
d.Set("url", *out.Url)
d.Set("client-id-list", out.ClientIDList)
d.Set("thumbprint-list", out.ThumbprintList)
d.Set("url", out.Url)
d.Set("client_id_list", out.ClientIDList)
d.Set("thumbprint_list", out.ThumbprintList)
return nil
}
@ -94,7 +94,7 @@ func resourceAwsIamOpenIDConnectProviderRead(d *schema.ResourceData, meta interf
func resourceAwsIamOpenIDConnectProviderUpdate(d *schema.ResourceData, meta interface{}) error {
iamconn := meta.(*AWSClient).iamconn
if d.HasChange("thumbprint-list") {
if d.HasChange("thumbprint_list") {
input := &iam.UpdateOpenIDConnectProviderThumbprintInput{
OpenIDConnectProviderArn: aws.String(d.Id()),
}

View File

@ -82,9 +82,9 @@ func testAccCheckIAMOpenIDConnectProvider(id string) resource.TestCheckFunc {
const testAccIAMOpenIDConnectProviderConfig = `
resource "aws_iam_openid_connect_provider" "goog" {
url="https://accounts.google.com"
client-id-list = [
client_id_list = [
"266362248691-re108qaeld573ia0l6clj2i5ac7r7291.apps.googleusercontent.com"
]
thumbprint-list = []
thumbprint_list = []
}
`

View File

@ -15,10 +15,10 @@ Provides an IAM OpenID Connect provider.
```
resource "aws_iam_openid_connect_provider" "default" {
url = "https://accounts.google.com"
client-id-list = [
client_id_list = [
"266362248691-342342xasdasdasda-apps.googleusercontent.com"
]
thumbprint-list = []
thumbprint_list = []
}
```
@ -27,8 +27,8 @@ resource "aws_iam_openid_connect_provider" "default" {
The following arguments are supported:
* `url` - (Required) The URL of the identity provider. Corresponds to the _iss_ claim.
* `client-id-list` - (Required) A list of client IDs (also known as audiences). When a mobile or web app registers with an OpenID Connect provider, they establish a value that identifies the application. (This is the value that's sent as the client_id parameter on OAuth requests.)
* `thumbprint-list` - (Required) A list of server certificate thumbprints for the OpenID Connect (OIDC) identity provider's server certificate(s).
* `client_id_list` - (Required) A list of client IDs (also known as audiences). When a mobile or web app registers with an OpenID Connect provider, they establish a value that identifies the application. (This is the value that's sent as the client_id parameter on OAuth requests.)
* `thumbprint_list` - (Required) A list of server certificate thumbprints for the OpenID Connect (OIDC) identity provider's server certificate(s).
## Attributes Reference