Skip to content

Commit

Permalink
Merge pull request #22878 from hashicorp/td-cert-auth-deprecate
Browse files Browse the repository at this point in the history
r/acmpca_certificate_authority: Deprecate `status` attribute
  • Loading branch information
zhelding authored Feb 2, 2022
2 parents ff03cc7 + f64a350 commit c7d64bd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/22878.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:note
resource/aws_acmpca_certificate_authority: The `status` attribute has been deprecated. Use the `enabled` attribute instead.
```
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 c7d64bd

Please sign in to comment.