provider/aws: Clean up AWS provider schema defns

Remove unnecessary &schema.Schema from the AWS provider schema
definition.
This commit is contained in:
James Nugent 2016-09-02 10:29:59 -07:00
parent 767914bbdc
commit d444d122bf
1 changed files with 21 additions and 21 deletions

View File

@ -18,42 +18,42 @@ func Provider() terraform.ResourceProvider {
// The actual provider // The actual provider
return &schema.Provider{ return &schema.Provider{
Schema: map[string]*schema.Schema{ Schema: map[string]*schema.Schema{
"access_key": &schema.Schema{ "access_key": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["access_key"], Description: descriptions["access_key"],
}, },
"secret_key": &schema.Schema{ "secret_key": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["secret_key"], Description: descriptions["secret_key"],
}, },
"profile": &schema.Schema{ "profile": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["profile"], Description: descriptions["profile"],
}, },
"shared_credentials_file": &schema.Schema{ "shared_credentials_file": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["shared_credentials_file"], Description: descriptions["shared_credentials_file"],
}, },
"token": &schema.Schema{ "token": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["token"], Description: descriptions["token"],
}, },
"region": &schema.Schema{ "region": {
Type: schema.TypeString, Type: schema.TypeString,
Required: true, Required: true,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{ DefaultFunc: schema.MultiEnvDefaultFunc([]string{
@ -64,21 +64,21 @@ func Provider() terraform.ResourceProvider {
InputDefault: "us-east-1", InputDefault: "us-east-1",
}, },
"role_arn": &schema.Schema{ "role_arn": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["role_arn"], Description: descriptions["role_arn"],
}, },
"max_retries": &schema.Schema{ "max_retries": {
Type: schema.TypeInt, Type: schema.TypeInt,
Optional: true, Optional: true,
Default: 11, Default: 11,
Description: descriptions["max_retries"], Description: descriptions["max_retries"],
}, },
"allowed_account_ids": &schema.Schema{ "allowed_account_ids": {
Type: schema.TypeSet, Type: schema.TypeSet,
Elem: &schema.Schema{Type: schema.TypeString}, Elem: &schema.Schema{Type: schema.TypeString},
Optional: true, Optional: true,
@ -86,7 +86,7 @@ func Provider() terraform.ResourceProvider {
Set: schema.HashString, Set: schema.HashString,
}, },
"forbidden_account_ids": &schema.Schema{ "forbidden_account_ids": {
Type: schema.TypeSet, Type: schema.TypeSet,
Elem: &schema.Schema{Type: schema.TypeString}, Elem: &schema.Schema{Type: schema.TypeString},
Optional: true, Optional: true,
@ -94,14 +94,14 @@ func Provider() terraform.ResourceProvider {
Set: schema.HashString, Set: schema.HashString,
}, },
"dynamodb_endpoint": &schema.Schema{ "dynamodb_endpoint": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["dynamodb_endpoint"], Description: descriptions["dynamodb_endpoint"],
}, },
"kinesis_endpoint": &schema.Schema{ "kinesis_endpoint": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
@ -110,35 +110,35 @@ func Provider() terraform.ResourceProvider {
"endpoints": endpointsSchema(), "endpoints": endpointsSchema(),
"insecure": &schema.Schema{ "insecure": {
Type: schema.TypeBool, Type: schema.TypeBool,
Optional: true, Optional: true,
Default: false, Default: false,
Description: descriptions["insecure"], Description: descriptions["insecure"],
}, },
"skip_credentials_validation": &schema.Schema{ "skip_credentials_validation": {
Type: schema.TypeBool, Type: schema.TypeBool,
Optional: true, Optional: true,
Default: false, Default: false,
Description: descriptions["skip_credentials_validation"], Description: descriptions["skip_credentials_validation"],
}, },
"skip_requesting_account_id": &schema.Schema{ "skip_requesting_account_id": {
Type: schema.TypeBool, Type: schema.TypeBool,
Optional: true, Optional: true,
Default: false, Default: false,
Description: descriptions["skip_requesting_account_id"], Description: descriptions["skip_requesting_account_id"],
}, },
"skip_metadata_api_check": &schema.Schema{ "skip_metadata_api_check": {
Type: schema.TypeBool, Type: schema.TypeBool,
Optional: true, Optional: true,
Default: false, Default: false,
Description: descriptions["skip_metadata_api_check"], Description: descriptions["skip_metadata_api_check"],
}, },
"s3_force_path_style": &schema.Schema{ "s3_force_path_style": {
Type: schema.TypeBool, Type: schema.TypeBool,
Optional: true, Optional: true,
Default: false, Default: false,
@ -454,27 +454,27 @@ func endpointsSchema() *schema.Schema {
Optional: true, Optional: true,
Elem: &schema.Resource{ Elem: &schema.Resource{
Schema: map[string]*schema.Schema{ Schema: map[string]*schema.Schema{
"iam": &schema.Schema{ "iam": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["iam_endpoint"], Description: descriptions["iam_endpoint"],
}, },
"ec2": &schema.Schema{ "ec2": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["ec2_endpoint"], Description: descriptions["ec2_endpoint"],
}, },
"elb": &schema.Schema{ "elb": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",
Description: descriptions["elb_endpoint"], Description: descriptions["elb_endpoint"],
}, },
"s3": &schema.Schema{ "s3": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
Default: "", Default: "",