-
Notifications
You must be signed in to change notification settings - Fork 626
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
Support for Creating Partial (CNAME) Zones #280
Comments
@jelinn What currently doesn't work for the existing |
@jacobbednarz The response does not contain the activation token which is the TXT record required to activate the zone. The Cloudflare API already returns it properly. (I work at Cloudflare). In addition, you cannot set the 'type' of zone when you are creating a new zone. We receive an error: "Error: cloudflare_zone.testZone: "type": this field cannot be set". |
Thanks for the additional information @farberjd, that isn't mentioned in the issue description hence the question as to what doesn't work :) I'll take a look at this and see if we can easily export it along with the other attributes as I assume you want access to that in order to manage the DNS entry automatically? resource "cloudflare_zone" "example" {
zone = "example.com"
type = "partial"
}
resource "some_dns_resource" "partial_cloudflare_record" {
value = "${cloudflare_zone.example.txt_record}"
....
} |
Yes, that is exactly right. |
@jacobbednarz I'm hoping to use this along with a separate dns provider to auto populate the text record, which is a requirement for authorizing dns if you are in a CNAME setup (dns managed externally to Cloudflare). Any idea if I can expect this relatively soon? I can come up with an alternative solution if not. |
@davidgagnegarmin I only managed to iron out the issue and expected outcome as of yesterday so there hasn't been any further investigation as of yet. I'll probably take a look in the next week or so but if this is a pressing issue for you, you're welcome to propose a PR and I'll happily review it. |
OK, I've just scoped out the requirements here:
|
It's worth noting, this functionality is only available to paid (potentially enterprise accounts?). Doing this on a free account results in 1104 error ("Partial zone signup not allowed"). |
I will work on this.
This is true. |
I'm happy to knock out the cloudflare-go and terraform stuff if needed but the API docs is something that is probably easier to field internally. Can you confirm if it's just a paid account that is required? Or whether it's an enterprise feature? |
its an enterprise feature since you can only use the flag if you have the ability to self provision cname zones. |
also we will get the docs updated. more of an oversight than lack of official support or anything like that. |
🙇 awesome, thanks @garrettgalow and @farberjd. Happy to 🚢 now we've confirmed that. |
Updates the `CreateZone` function to allow the creation of a partially managed zone within Cloudflare. Prior to this change, all zones were assumed as full setups. This unblocks some work in terraform-providers/terraform-provider-cloudflare#280 where we would like the ability to manage all zone types instead of just full zones.
@farberjd I had some time this morning so I added support to |
Updates the `CreateZone` function to allow the creation of a partially managed zone within Cloudflare. Prior to this change, all zones were assumed as full setups. This unblocks some work in terraform-providers/terraform-provider-cloudflare#280 where we would like the ability to manage all zone types instead of just full zones.
Updates the provider to support creating of partially hosted zones within Cloudflare. Fixes cloudflare#280
Updates the provider to support creating of partially hosted zones within Cloudflare. Fixes #280
Hi 😄 thanks for the hard work in this issue. I think the necessary steps to have it work at full potential for enterprise customers is:
(visible with API call for enterprise users).
When doing so the TXT records can be used in another provider to drive the DNS setup. |
Raised cloudflare/cloudflare-go#355 on cloudflare-go |
Raised https://github.com/terraform-providers/terraform-provider-cloudflare/pull/492 to complete this issue |
addressed in #532 |
Terraform Version
Terraform v0.11.11
Affected Resource(s)
-cloudflare_zone
Support creating partial (CNAME) Zones:
Please add support for creating and managing partial (CNAME) zones.
https://support.cloudflare.com/hc/en-us/articles/360020615111-Configuring-a-CNAME-setup
https://support.cloudflare.com/hc/en-us/articles/360020348832-Understanding-a-CNAME-Setup
API Call to Create Partial Zone
curl -X POST "https://api.cloudflare.com/client/v4/zones"
-H "X-Auth-Email: user@example.com"
-H "X-Auth-Key: API-KEY"
-H "Content-Type: application/json"
--data '{"type": "partial", "name":"example.com","jump_start":true,"account":{"id":"ACCOUNTID"}}'
The text was updated successfully, but these errors were encountered: