Open varunt-git-pb opened 1 month ago
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG
output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key
, X-Auth-Email
and Authorization
HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.
This issue has been marked with triage/needs-information
and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.
Voting for Prioritization
Volunteering to Work on This Issue
Marking this issue as stale due to 30 days of inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 7 days it will automatically be closed. Maintainers can also remove the lifecycle/stale
label.
If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
There appears to be an inconsistency in how the Cloudflare provider handles zone names when updating DNS records. This issue affects the
cloudflare_record
resource.Terraform configuration files
Link to debug output
NA
Panic output
NA
Expected output
The expected behavior would be consistent handling of the zone name. Either:
Both sides should include the full zone name:
"cluster.ie.pointsbet.com" -> "cluster.ie.pointsbet.com"
Or both sides should exclude the zone name:
"cluster.ie" -> "cluster.ie"
so the plan in full should look like below.
cloudflare_record.sf_proxy must be replaced resource "cloudflare_record" "example_proxy" { created_on = "2023-05-11T05:40:56.65566Z" -> (known after apply) hostname = "proxy.ie.pointsbet.com" -> (known after apply) id = "12345" -> (known after apply) metadata = { "auto_added" = "false" "managed_by_apps" = "false" "managed_by_argo_tunnel" = "false" } -> (known after apply) modified_on = "2023-05-11T05:40:56.65566Z" -> (known after apply)
name = "proxy.ie.pointsbet.com" -> "proxy.ie.ie.pointsbet.com" # forces replacement
proxiable = true -> (known after apply)Actual output
When updating a DNS record, the provider seems to inconsistently handle the zone name portion of the hostname:
For the existing record, it uses the full hostname including the zone name:
"cluster.ie.pointsbet.com"
For the replacement, it drops the zone name entirely:
"cluster.ie"
This behavior is seen in the plan output: ~ name = "cluster.ie.pointsbet.com" -> "cluster.ie" # forces replacement
This is how it looks currently in a full plan,
Steps to reproduce
Additional Context
This issue was observed in a Terraform plan output. The inconsistency in handling the zone name could lead to unexpected behavior or errors when applying the Terraform configuration.
Additional factoids
This issue was observed in a Terraform plan output. The inconsistency in handling the zone name could lead to unexpected behavior or errors when applying the Terraform configuration.
References
NA