Skip to content

Commit

Permalink
resource/aws_kms_external_key: Remove extraneous ListResourceTags logic
Browse files Browse the repository at this point in the history
Reference: #10905 (comment)

Output from acceptance testing (failures due to unrelated eventual consistency issues):

```
--- PASS: TestAccAWSKmsExternalKey_disappears (33.81s)
--- PASS: TestAccAWSKmsExternalKey_basic (38.62s)
--- FAIL: TestAccAWSKmsExternalKey_Policy (45.11s)
--- PASS: TestAccAWSKmsExternalKey_DeletionWindowInDays (46.43s)
--- FAIL: TestAccAWSKmsExternalKey_Description (47.13s)
--- PASS: TestAccAWSKmsExternalKey_Tags (57.37s)
--- PASS: TestAccAWSKmsExternalKey_KeyMaterialBase64 (140.85s)
--- PASS: TestAccAWSKmsExternalKey_ValidTo (249.45s)
--- PASS: TestAccAWSKmsExternalKey_Enabled (349.97s)
```
  • Loading branch information
bflad committed Nov 19, 2019
1 parent 89d8594 commit 1963850
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions aws/resource_aws_kms_external_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,20 +228,6 @@ func resourceAwsKmsExternalKeyRead(d *schema.ResourceData, meta interface{}) err
return fmt.Errorf("error normalizing KMS External Key (%s) policy: %s", d.Id(), err)
}

listResourceTagsInput := &kms.ListResourceTagsInput{
KeyId: metadata.KeyId,
}

listResourceTagsOutput, err := conn.ListResourceTags(listResourceTagsInput)

if err != nil {
return fmt.Errorf("error listing KMS External Key (%s) tags: %s", d.Id(), err)
}

if listResourceTagsOutput == nil {
return fmt.Errorf("error listing KMS External Key (%s) tags: empty response", d.Id())
}

d.Set("arn", metadata.Arn)
d.Set("description", metadata.Description)
d.Set("enabled", metadata.Enabled)
Expand Down

0 comments on commit 1963850

Please sign in to comment.