diff --git a/.changelog/22878.txt b/.changelog/22878.txt new file mode 100644 index 000000000000..15a8ad2c9782 --- /dev/null +++ b/.changelog/22878.txt @@ -0,0 +1,3 @@ +```release-note:note +resource/aws_acmpca_certificate_authority: The `status` attribute has been deprecated. Use the `enabled` attribute instead. +``` diff --git a/internal/service/acmpca/certificate_authority.go b/internal/service/acmpca/certificate_authority.go index 2d324eb2cafd..a5d5bab03290 100644 --- a/internal/service/acmpca/certificate_authority.go +++ b/internal/service/acmpca/certificate_authority.go @@ -262,9 +262,11 @@ func ResourceCertificateAuthority() *schema.Resource { Type: schema.TypeString, Computed: true, }, + // See https://github.com/hashicorp/terraform-provider-aws/issues/17832 for deprecation / removal status "status": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Deprecated: "The reported value of the \"status\" attribute is often inaccurate. Use the resource's \"enabled\" attribute to explicitly set status.", }, "permanent_deletion_time_in_days": { Type: schema.TypeInt, diff --git a/internal/service/acmpca/certificate_authority_test.go b/internal/service/acmpca/certificate_authority_test.go index cfe1aec9107f..b261bd62efbe 100644 --- a/internal/service/acmpca/certificate_authority_test.go +++ b/internal/service/acmpca/certificate_authority_test.go @@ -87,7 +87,7 @@ func TestAccACMPCACertificateAuthority_disappears(t *testing.T) { }) } -func TestAccACMPCACertificateAuthority_enabled(t *testing.T) { +func TestAccACMPCACertificateAuthority_enabledDeprecated(t *testing.T) { var certificateAuthority acmpca.CertificateAuthority resourceName := "aws_acmpca_certificate_authority.test" diff --git a/website/docs/r/acmpca_certificate_authority.html.markdown b/website/docs/r/acmpca_certificate_authority.html.markdown index 4df9feadad5e..5cf6ffc2a87d 100644 --- a/website/docs/r/acmpca_certificate_authority.html.markdown +++ b/website/docs/r/acmpca_certificate_authority.html.markdown @@ -146,7 +146,7 @@ In addition to all arguments above, the following attributes are exported: * `not_after` - Date and time after which the certificate authority is not valid. Only available after the certificate authority certificate has been imported. * `not_before` - Date and time before which the certificate authority is not valid. Only available after the certificate authority certificate has been imported. * `serial` - Serial number of the certificate authority. Only available after the certificate authority certificate has been imported. -* `status` - Status of the certificate authority. +* `status` - (**Deprecated** use the `enabled` attribute instead) Status of the certificate authority. * `tags_all` - A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block). ## Timeouts