-
Notifications
You must be signed in to change notification settings - Fork 650
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
Creation of CAA records #821
Comments
Using the following setup, I'm unable to reproduce the issue. variable "cloudflare_email" {}
variable "cloudflare_api_key" {}
variable "cloudflare_zone_id" {}
variable "cloudflare_domain" {}
provider "cloudflare" {
email = var.cloudflare_email
api_key = var.cloudflare_api_key
}
resource "cloudflare_record" "caa" {
zone_id = var.cloudflare_zone_id
name = "caa-test.${var.cloudflare_domain}"
data = {
flags = "0"
tag = "issue"
value = "letsencrypt.org"
}
type = "CAA"
ttl = 600
}
You shouldn't be using |
Thanks for confirming here - just a follow up question on this - how does this even work when value isn't a parameter available on the data struct? Paul |
It's kind of two part. The first is that nested or complex types in Terraform sometimes allow weird behaviour like not catching unexpected attributes (the case here) and the fact the provider iterates over the When the
After that, the key/value pairs of the type are enumerated and the request is built which ends up marshaling into the JSON payload for creating the record. To safe guard future changes, we should probably add the field to the schema to prevent it from randomly stop working. |
Ah so it's kinda exposing the Map feature in the schema Got it - I'll happily send a PR that adds the specific fields if you want me to? |
👍 happy to review a PR for it |
Hello here! |
Sorry it took so long to get back to you on this, I just opened #866 Paul |
Hi,
I am investigating the creation of CAA records with this Terraform Provider. It was suggested this was added in #97 where I could specify this as follows:
I cannot seem to find where the
value
parameter as part of thedata
map was added. Without thisvalue
parameter, no details can be passed as part of the record.I tried to set both the data and value blocks together but both are conflicting
Please can you help with an example implementation here?
Paul
The text was updated successfully, but these errors were encountered: