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

Issue with existing domain en DKIM #97

Open
bilyboy785 opened this issue Jun 12, 2024 · 2 comments
Open

Issue with existing domain en DKIM #97

bilyboy785 opened this issue Jun 12, 2024 · 2 comments

Comments

@bilyboy785
Copy link

Hi,

I have an existing mailcow domain and i try to figure out with your dkim terraform module to generate a new key and add it to a dns record :

resource "mailcow_domain" "domain" {
  domain       = var.zone_name
  description  = var.mailcow_description
  gal          = var.gal
  restart_sogo = var.restart_sogo
  aliases      = var.aliases
  mailboxes    = var.mailboxes
  defquota     = var.defquota
  maxquota     = var.maxquota
  quota        = var.quota
  rate_limit   = var.rate_limit
}

resource "mailcow_dkim" "dkim" {
  domain = mailcow_domain.domain.id
  length = 2048
}

resource "cloudflare_record" "dkim" {
  zone_id = var.zone_id
  name    = "dkim._domainkey.${var.zone_name}"
  value   = mailcow_dkim.dkim.dkim_txt
  type    = "TXT"
  ttl     = 1
  proxied = false
}

I'm facing this error :

│ Error: strconv.Atoi: parsing "<nil>": invalid syntax
│ 
│   with module.mailcow_artsfr.mailcow_dkim.dkim,
│   on ../../modules/cloudflare-mx-bldwebagency/main.tf line 15, in resource "mailcow_dkim" "dkim":
│   15: resource "mailcow_dkim" "dkim" {

Do you have any idea what is wrong ?

@l-with
Copy link
Owner

l-with commented Jun 13, 2024

Is the code you provided the file "../../modules/cloudflare-mx-bldwebagency/main.tf"?
Which command produced the error after which flow?

@tcarrondo
Copy link

Can you share a full plan output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants