Skip to content

Commit

Permalink
Merge pull request #21369 from hashicorp/td-route53-key-signing-key-d…
Browse files Browse the repository at this point in the history
…elete

r/route53_key_signing_key: also deactivate keys with `ACTION_NEEDED` status
  • Loading branch information
anGie44 authored Oct 19, 2021
2 parents b84cb22 + 9144f51 commit 6e45b53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/21369.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_route53_key_signing_key: Deactivate key-signing key with `ACTION_NEEDED` status before deletion
```
2 changes: 1 addition & 1 deletion internal/service/route53/key_signing_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func resourceKeySigningKeyDelete(d *schema.ResourceData, meta interface{}) error

status := d.Get("status").(string)

if status == KeySigningKeyStatusActive {
if status == KeySigningKeyStatusActive || status == KeySigningKeyStatusActionNeeded {
input := &route53.DeactivateKeySigningKeyInput{
HostedZoneId: aws.String(d.Get("hosted_zone_id").(string)),
Name: aws.String(d.Get("name").(string)),
Expand Down

0 comments on commit 6e45b53

Please sign in to comment.