Skip to content

Commit

Permalink
r/aws_acmpca_certificate_authority: Add 'testAccCheckAwsAcmpcaCertifi…
Browse files Browse the repository at this point in the history
…cateAuthorityDisableCA'.
  • Loading branch information
ewbankkit committed Sep 30, 2020
1 parent 9b8caf6 commit 1a02e79
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions aws/resource_aws_acmpca_certificate_authority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,19 @@ func testAccCheckAwsAcmpcaCertificateAuthorityActivateCA(certificateAuthority *a
}
}

func testAccCheckAwsAcmpcaCertificateAuthorityDisableCA(certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc {
return func(s *terraform.State) error {
conn := testAccProvider.Meta().(*AWSClient).acmpcaconn

_, err := conn.UpdateCertificateAuthority(&acmpca.UpdateCertificateAuthorityInput{
CertificateAuthorityArn: certificateAuthority.Arn,
Status: aws.String(acmpca.CertificateAuthorityStatusDisabled),
})

return err
}
}

func listAcmpcaCertificateAuthorities(conn *acmpca.ACMPCA) ([]*acmpca.CertificateAuthority, error) {
certificateAuthorities := []*acmpca.CertificateAuthority{}
input := &acmpca.ListCertificateAuthoritiesInput{}
Expand Down

0 comments on commit 1a02e79

Please sign in to comment.