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.61k stars 8.99k forks source link

[Enhancement]: Custom ssl certificate for `aws_amplify_domain_association` #37070

Closed romatallinn closed 1 day ago

romatallinn commented 2 months ago

Description

There is no support for custom SSL certificates for AWS Amplify apps. When creating an app, Amplify is issuing self-managed certificates for the purpose. Recently, AWS did add support for custom certificates, incl. into Go's sdk.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_amplify_domain_association" "store_admin" {
  app_id      = aws_amplify_app.store_admin.id
  domain_name = "<>"

  sub_domain {
    branch_name = aws_amplify_branch.store_admin_main.branch_name
    prefix      = "<>"
  }

  # This is new
  certificate {
    certificate_type = "CUSTOM"
    custom_certificate_arn = "...."
  }

  lifecycle {
   ignore_changes = all
  }
}

References

documentation: https://docs.aws.amazon.com/amplify/latest/userguide/using-certificates.html blog post: https://aws.amazon.com/blogs/mobile/custom-ssl-amplify-hosting/ CustomCertificateArn in GO SDK: https://github.com/aws/aws-sdk-go-v2/blob/edaca42957519598cf3188fc8ad5adda6f90731d/service/amplify/types/types.go#L380

Would you like to implement a fix?

None

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

romatallinn commented 2 months ago

In addition to certificate_verification_dns_record: https://github.com/hashicorp/terraform-provider-aws/blob/312351d0e6333928333048cbac7535ae7d9f3abc/internal/service/amplify/domain_association.go#L50-L53

You should now also be able to assign a multi-purpose Certificate from aws sdk (which can be either custom or certificate_verification_dns_record).

github-actions[bot] commented 1 day ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.