hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

Feature: Add ability to create CA Audit Report #23497

Open japm94 opened 2 years ago

japm94 commented 2 years ago

Community Note

Description

It's not possible even if using CloudFormation to create a certificate authority audit report, only using AWS Console or CLI.

New or Affected Resource(s)

Potential Terraform Configuration

resource "aws_acmpca_certificate_authority_audit_report" "example" {
    audit_report_response_format = "JSON"
    s3_bucket_name               = aws_s3_bucket.example.id
    certificate_authority_arn    = aws_acmpca_certificate_authority.example.arn
    depends_on                   = [aws_s3_bucket.example.id]
}

References

mattburgess commented 2 years ago

Hi @japm94 - I'm interested in the use case here. From what I can tell from the documentation, this doesn't seem particularly well suited to being controlled via Terraform. For example, once your aws_acmpa_certificate_authority_audit_report.example resource has been created what is going to trigger another report to be generated? I'm presuming here that you would want them generated on a frequent/regular basis?

The API is also missing the ability to update and delete audit reports, which the Terraform provider will normally expect to be present in order to fully manage these resources. Those omissions are likely by design - this is an audit report after all so modifications are generally frowned upon and deletions need to be handled with care.

Given the above, I suspect this may well be why you've found no support for this in CloudFormation either.

japm94 commented 2 years ago

Hi @mattburgess, thank you for the explanation.

github-actions[bot] commented 3 weeks ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!