Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform created AWS ACM Certificates every times #6128

Closed
ghost opened this issue Oct 11, 2018 · 3 comments
Closed

terraform created AWS ACM Certificates every times #6128

ghost opened this issue Oct 11, 2018 · 3 comments
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. service/acm Issues and PRs that pertain to the acm service.

Comments

@ghost
Copy link

ghost commented Oct 11, 2018

This issue was originally opened by @jxin19 as hashicorp/terraform#19031. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.11.3

Terraform Files

resource "aws_acm_certificate" "cert-2" {
  domain_name = "domain.com"
  subject_alternative_names = [
    "${var.live}",
    "${var.live-api}",
    "${var.live-image}",
    "${var.live-manager}",
    "${var.dev}",
    "${var.dev-api}",
    "${var.dev-image}",
    "${var.dev-manager}"
  ]
  validation_method = "DNS"

  tags {
    Name = "Certification"
  }

  lifecycle {
    create_before_destroy = true
  }
}

resource "aws_route53_record" "cert-2-proof" {
  count = "${length(var.cert-zone-ids)}"
  name = "${lookup(aws_acm_certificate.cert-2.domain_validation_options[count.index], "resource_record_name")}"
  type = "${lookup(aws_acm_certificate.cert-2.domain_validation_options[count.index], "resource_record_type")}"
  zone_id = "${aws_route53_zone.primary.id}"
  records = ["${lookup(aws_acm_certificate.cert-2.domain_validation_options[count.index], "resource_record_value")}"]
  ttl = 30
}

resource "aws_acm_certificate_validation" "cert-2" {
  certificate_arn = "${aws_acm_certificate.cert-2.arn}"
  validation_record_fqdns = ["${aws_route53_record.cert-2-proof.*.fqdn}"]
}

Debug Output

* aws_acm_certificate.cert-2: 1 error(s) occurred:

* aws_acm_certificate.cert-2: Error requesting certificate: LimitExceededException: Error: you have reached your limit of 20 certificates in the last year.
        status code: 400, request id: 7dde0d6d-cb95-11e8-be6e-59f81c3e2a01

I tried request command 'apply' then terraform created AWS ACM Certificates every times.
finally I saw an error "LimitExceededException".
How can I handling?

@bflad bflad added the service/acm Issues and PRs that pertain to the acm service. label Oct 11, 2018
@bflad
Copy link
Contributor

bflad commented Oct 12, 2018

Hi @jxin19 👋 Sorry you are running into trouble here. Do you have the terraform plan output from before or after you saw this LimitExceededException? If it includes (forces new resource), Terraform will issue a new certificate.

ACM only allows you to create a certain number of certificates per region per year (https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html) and the LimitExceededException error is what is returned by the ACM when you have reached that limit. You will need to open an AWS Support case to get that limit raised for your account.

We can help you troubleshoot the Terraform side of this if you can post the terraform plan output though. Thanks!

@bflad bflad added question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. waiting-response Maintainers are waiting on response from community or contributor. labels Oct 12, 2018
@bflad
Copy link
Contributor

bflad commented Nov 7, 2018

Closing due to lack of response.

@ghost
Copy link
Author

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. service/acm Issues and PRs that pertain to the acm service.
Projects
None yet
Development

No branches or pull requests

2 participants