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

dynamic DNS record IPs overwritten by terraform provider #35

Open
angelnu opened this issue Mar 28, 2022 · 1 comment
Open

dynamic DNS record IPs overwritten by terraform provider #35

angelnu opened this issue Mar 28, 2022 · 1 comment

Comments

@angelnu
Copy link

angelnu commented Mar 28, 2022

Terraform Version

Terraform v1.1.7
on linux_amd64
+ provider registry.terraform.io/carlpett/sops v0.6.3
+ provider registry.terraform.io/dnsmadeeasy/dme v1.0.4
+ provider registry.terraform.io/goauthentik/authentik v2022.3.2
+ provider registry.terraform.io/paultyng/unifi v0.34.0
+ provider registry.terraform.io/telkomindonesia/linux v0.7.0

Affected Resource(s)

  • dme_dns_record

Terraform Configuration Files

resource "dme_dns_record" "dyn_record" {
  domain_id     = "domain ID"
  name          = "foo-dyndns"
  type          = "A"
  value         = "1.2.3.4"
  ttl           = 600
  dynamic_dns   = true
  password      = "aPassword"

Debug Output

NA

Panic Output

NA

Expected Behavior

value is currently a required parameter. I would expect it to be optional in case of dynamic_dns=true to avoid overriding the dynamic IP on the next terraform apply.

I would expect the following input to be accepted by making value optional:

resource "dme_dns_record" "dyn_record" {
  domain_id     = "domain ID"
  name          = "foo-dyndns"
  type          = "A"
  ttl           = 600
  dynamic_dns   = true
  password      = "aPassword"

Alternative would be to ignore the value when the record already exists.

Actual Behavior

On each terraform apply the IP address uploaded by my router is overriden by hardcoded value in terraform. With this we loose the dynamic capabilities.

Steps to Reproduce

  1. terraform apply
  2. modify the IP address either by the UI or with a dyndns client
  3. terraform apply -> IP change from step 2 is lost.

Important Factoids

NA

References

NA

angelnu pushed a commit to angelnu/terraform-provider-dme that referenced this issue Jun 5, 2022
angelnu pushed a commit to angelnu/terraform-provider-dme that referenced this issue Jun 5, 2022
@angelnu
Copy link
Author

angelnu commented Jun 5, 2022

As the value must be provided I prepared a PR where an init_value can be provided.

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

1 participant