Skip to content

create_route53_record=false still try to create a record for ACM #360

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

Closed
1 task done
bakayolo opened this issue Oct 1, 2023 · 4 comments · Fixed by #366
Closed
1 task done

create_route53_record=false still try to create a record for ACM #360

bakayolo opened this issue Oct 1, 2023 · 4 comments · Fixed by #366

Comments

@bakayolo
Copy link

bakayolo commented Oct 1, 2023

Description

Context: I am deploying Atlantis behind Cloudflare. I don't wanna use route53. And I understand that I'll have to set the records for validating certificates in Cloudflare by myself (I am doing this manually).

In my modules, I set

route53_private_zone       = false
create_route53_aaaa_record = false
create_route53_record      = false

Note: create_route53_record is the only not default value.

The issue is happening in this dependency module and exactly in this resource.

I think we should find a way to provide var.validate_certificate in the module directly.
We could set validate_certificate = var.create_route53_record || var.create_route53_aaaa_record since I would assume that having both false we don't want to use route53 at all (which is my case) or we can create a new variable.
Note that I can also set create_certificate = false by passing my own certificate but it feels more like a workaround in that case.

Wdyt?

If your request is for a new feature, please use the Feature request template.

  • ✋ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: 3.28.0

  • Terraform version: v1.4.2

  • Provider version(s): ~> 4.0

Reproduction Code [Required]

Steps to reproduce the behavior:

Not adding any code since the issue is pretty obvious and described above.

Expected behavior

I would expect a new certificate to be created, and have to validate it by myself (which is what I am already doing today fwiw).

Actual behavior

Plan is erroring with

╷
│ Error: zone_id must not be empty, got 
│ 
│   with module.atlantis.module.atlantis.module.acm.aws_route53_record.validation[0],
│   on .terraform/modules/atlantis.atlantis.acm/main.tf line 37, in resource "aws_route53_record" "validation":
│   37:   zone_id = var.zone_id
│ 
╵

Terminal Output Screenshot(s)

Additional context

@bakayolo
Copy link
Author

bakayolo commented Oct 2, 2023

Actually, creating a certificate as part of the same deployment code using aws_acm_certificate resource and certificate_arn input in atlantis module does not work.

The "count" value depends on resource attributes that cannot be determined
│ until apply, so Terraform cannot predict how many instances will be
│ created. To work around this, use the -target argument to first apply only
│ the resources that the count depends on.

#268

Copy link

github-actions bot commented Nov 2, 2023

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@antonbabenko
Copy link
Member

This issue has been resolved in version 4.0.0 🎉

Copy link

github-actions bot commented Dec 5, 2023

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants