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

Provider checks that key_name is an FQDN, but there's no such restriction in Bind9 #175

Open
marrold opened this issue Nov 10, 2021 · 2 comments

Comments

@marrold
Copy link

marrold commented Nov 10, 2021

The DNS module currently checks that the key_name is an FQDN, but there's no such restriction in Bind9 and I can't see it explicitly mentioned in RFC 2845.

Terraform Version

0.15.5

Affected Resource(s)

Provider

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

provider "dns" {
  update {
    server        = "10.0.144.4" # Can be an IP or domain
    key_name      = "update"
    key_algorithm = "hmac-sha256"
    key_secret    = "things"
  }
}

Expected Behavior

None FQDN string is permitted

Actual Behavior

Module validates the key_name is an FQDN here

Steps to Reproduce

Configure provider with non-FQDN key_name

@Lestat-GitHub
Copy link

Hi,

I have exactly the same issue on version 3.4.1 the provider forces me to use a key named with the domain name and this is a non sense for me. I use various keys on my DNS server (certbot, terraform, etc...) and I explicitly want to be aware that an update has been done with a "Terraform" key on my logs.

Is there any plan for implementing this ?

It would be possible in that case to add a "domains" section on the update block in order to specify the list of domains handled by this block ?

Thanks.

@Lestat-GitHub
Copy link

Hi, after digging and some tests I discovered that you can specify the key name as an FQDN notation in order for the provider to work.

As an example, I have a terraform key, so to use the provider I just need to use that :

update {
  server        = "my.server.ip"
  key_name      = "terraform-key." (note the ending dot)
  key_algorithm = "hmac-sha256"
  ...
}

Weird, but it works.

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

2 participants