Skip to content

Commit

Permalink
r/acmpca_certificate_authority: Deprecate status attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelding committed Feb 1, 2022
1 parent 9bfc2e2 commit f190883
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions internal/service/acmpca/certificate_authority.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion internal/service/acmpca/certificate_authority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/acmpca_certificate_authority.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f190883

Please sign in to comment.