Skip to content

Commit

Permalink
data-source/aws_kms_alias: Improve comment about aliases missing Targ…
Browse files Browse the repository at this point in the history
…etKeyId
  • Loading branch information
bflad committed Jan 31, 2018
1 parent fac79d5 commit 19b34df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aws/data_source_aws_kms_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func dataSourceAwsKmsAliasRead(d *schema.ResourceData, meta interface{}) error {
d.SetId(time.Now().UTC().String())
d.Set("arn", alias.AliasArn)

// AWS service aliases do not return TargetKeyId:
// Some aliases do not return TargetKeyId (e.g. aliases for AWS services or
// aliases not associated with a Customer Managed Key (CMK))
// https://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html
if alias.TargetKeyId != nil {
aliasARN, err := arn.Parse(*alias.AliasArn)
Expand Down

0 comments on commit 19b34df

Please sign in to comment.