Skip to content

Commit

Permalink
Prefered the use of validateArnIfSet instead of validateArn for kms_k…
Browse files Browse the repository at this point in the history
…ey attributes
  • Loading branch information
Ninir committed Dec 19, 2016
1 parent b136b59 commit c02105a
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 14 deletions.
9 changes: 5 additions & 4 deletions builtin/providers/aws/resource_aws_ami_copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ func resourceAwsAmiCopy() *schema.Resource {
}

resourceSchema["kms_key_id"] = &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validateArnIfSet,
}

return &schema.Resource{
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_cloudtrail.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func resourceAwsCloudTrail() *schema.Resource {
"kms_key_id": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},
"home_region": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func resourceAwsDbInstance() *schema.Resource {
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},

"tags": tagsSchema(),
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_ebs_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func resourceAwsEbsVolume() *schema.Resource {
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},
"size": {
Type: schema.TypeInt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func resourceAwsElasticTranscoderPipeline() *schema.Resource {
"aws_kms_key_arn": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},

// ContentConfig also requires ThumbnailConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource {
"kms_key_arn": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},

"role_arn": {
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_lambda_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func resourceAwsLambdaFunction() *schema.Resource {
"kms_key_arn": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_rds_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func resourceAwsRDSCluster() *schema.Resource {
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},

"tags": tagsSchema(),
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_redshift_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func resourceAwsRedshiftCluster() *schema.Resource {
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},

"elastic_ip": {
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_s3_bucket_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func resourceAwsS3BucketObject() *schema.Resource {
"kms_key_id": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},

"etag": {
Expand Down
2 changes: 1 addition & 1 deletion builtin/providers/aws/resource_aws_ses_receipt_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func resourceAwsSesReceiptRule() *schema.Resource {
"kms_key_arn": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateArn,
ValidateFunc: validateArnIfSet,
},

"object_key_prefix": {
Expand Down

0 comments on commit c02105a

Please sign in to comment.