Skip to content

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

@bakayolo

Description

@bakayolo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions