-
Notifications
You must be signed in to change notification settings - Fork 630
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
Cloudflare API Support #3
Comments
+1, page rules would be awesome. |
Re-linking hashicorp/terraform#11249 - PR for page rules. I suppose it needs rebasing here, and it's still missing tests. It's a bit stale, but I haven't forgotten it 🙂 |
This commit adds most of the boilerplate for implementing CloudFlare Page Rules, and implements the Create method. `PageRuleActionValue`s still need a validator; this is complex and depends on `PageRuleActionId`. Read, Update, and Delete methods will throw 'not implemented' errors. Towards hashicorp/terraform#9040; cloudflare#3.
This commit adds most of the boilerplate for implementing CloudFlare Page Rules, and implements the Create method. `PageRuleActionValue`s still need a validator; this is complex and depends on `PageRuleActionId`. Read, Update, and Delete methods will throw 'not implemented' errors. Towards hashicorp/terraform#9040; cloudflare#3.
Would love to see support for:
|
@thomasbiddle These are all supported as page rule actions in my PR - are they also possible in the CF web app as a zone/domain-wide setting? |
Ollie - yes, via https://api.cloudflare.com/#zone-settings-properties
…On Tue, Jul 11, 2017 at 2:29 PM Ollie Ford ***@***.***> wrote:
@thomasbiddle <https://github.com/thomasbiddle> These are all supported
as page rule actions in my PR - are they also possible in the CF web app as
a zone/domain-wide setting?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/terraform-providers/terraform-provider-cloudflare/issues/3#issuecomment-314577752>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABIcByHFVzaK8kaLB-vRbUMgeFP8b3Gks5sM-kagaJpZM4N42K0>
.
|
+1 for load balancer |
@elaijuh We've added support for Load Balancing to the cloudflare-go library in the latest release - https://github.com/cloudflare/cloudflare-go/releases/tag/v0.8.0 - this should make contributing LB management to the Cloudflare Terraform provider much easier now! |
Would love more support for cloudflare via terraform! |
Hi, It would be good if these additional features could be ported into the cloudflare terraform provider including the LB management. |
This commit adds most of the boilerplate for implementing CloudFlare Page Rules, and implements the Create method. `PageRuleActionValue`s still need a validator; this is complex and depends on `PageRuleActionId`. Read, Update, and Delete methods will throw 'not implemented' errors. Towards hashicorp/terraform#9040; cloudflare#3.
This commit adds most of the boilerplate for implementing CloudFlare Page Rules, and implements the Create method. `PageRuleActionValue`s still need a validator; this is complex and depends on `PageRuleActionId`. Read, Update, and Delete methods will throw 'not implemented' errors. Towards hashicorp/terraform#9040; cloudflare#3.
This commit adds most of the boilerplate for implementing CloudFlare Page Rules, and implements the Create method. `PageRuleActionValue`s still need a validator; this is complex and depends on `PageRuleActionId`. Read, Update, and Delete methods will throw 'not implemented' errors. Towards hashicorp/terraform#9040; #3. Require at least one page rule action Simplify page rule targets API Asking for a list of targets is just confusing to a user when Cloudflare only accepts a single `"url"` target. Implement action value validation Improve legibility Change action Elems to be Schema Implement Read/Update/Delete Page Rules Simplify Page Rule action schema This commit changes Page Rule actions to be a TypeSet of maps containing the action ID, and optionally its sub-setting. This makes validation a bit nicer, too. Fix crash while running apply Page Rule Read implementation was naïvely copying Cloudflare's returned data structure, rather than transforming to fit schema. Fix passing PageRuleAction value error back up Flatten PageRule action schema Fix flattened structure Unfortunately, we cannot have the desired structure with a `schema.Resource` `actions` in the main schema: resource "cloudflare_page_rule" "foo" { actions = { always_online = true } } where `always_online` and other Actions are explicitly defined, since `actions` needs to be a `schema.Schema`. This commit moves the `Resource` inside `actions`, which now becomes a `Schema` of `TypeSet`, which means Cloudflare's binary options such as `always_online` will default to `false` if we have them be `TypeBool`. To circumvent that, we instead use `TypeString` and validate `"on"` or `"off"` (matching Cloudflare's API) - since these will be empty if not set. The logic's a little less clean, since we now have to loop through every possible action type for each action in the set, testing the type and value of its sub-setting/mode to determine if it was really set by the user. Document page rule resources Appease linter Add acceptance tests for page rules Fix allowing multiple entries in page rule actions Improve error reporting get page rule resource working, add tests random fixes standardise on zone + implement import tests check api attributes + docs update for page rule error check on set complex attr + remove failing attributes from page rules tests
This commit adds most of the boilerplate for implementing CloudFlare Page Rules, and implements the Create method. `PageRuleActionValue`s still need a validator; this is complex and depends on `PageRuleActionId`. Read, Update, and Delete methods will throw 'not implemented' errors. Towards hashicorp/terraform#9040; #3. Require at least one page rule action Simplify page rule targets API Asking for a list of targets is just confusing to a user when Cloudflare only accepts a single `"url"` target. Implement action value validation Improve legibility Change action Elems to be Schema Implement Read/Update/Delete Page Rules Simplify Page Rule action schema This commit changes Page Rule actions to be a TypeSet of maps containing the action ID, and optionally its sub-setting. This makes validation a bit nicer, too. Fix crash while running apply Page Rule Read implementation was naïvely copying Cloudflare's returned data structure, rather than transforming to fit schema. Fix passing PageRuleAction value error back up Flatten PageRule action schema Fix flattened structure Unfortunately, we cannot have the desired structure with a `schema.Resource` `actions` in the main schema: resource "cloudflare_page_rule" "foo" { actions = { always_online = true } } where `always_online` and other Actions are explicitly defined, since `actions` needs to be a `schema.Schema`. This commit moves the `Resource` inside `actions`, which now becomes a `Schema` of `TypeSet`, which means Cloudflare's binary options such as `always_online` will default to `false` if we have them be `TypeBool`. To circumvent that, we instead use `TypeString` and validate `"on"` or `"off"` (matching Cloudflare's API) - since these will be empty if not set. The logic's a little less clean, since we now have to loop through every possible action type for each action in the set, testing the type and value of its sub-setting/mode to determine if it was really set by the user. Document page rule resources Appease linter Add acceptance tests for page rules Fix allowing multiple entries in page rule actions Improve error reporting get page rule resource working, add tests random fixes standardise on zone + implement import tests check api attributes + docs update for page rule error check on set complex attr + remove failing attributes from page rules tests
…le-resolve_override add doc for resolve_override
@patryk this isn't a specific issue and has just been a catch all for feature requests, most of which are tracked separately now as they should be. Also most of them have been added by this point. We should just close this one. |
Yep, you're right. Tracked in separate issues already. Closing this one. |
This issue was originally opened by @omarabid as hashicorp/terraform#9040. It was migrated here as part of the provider split. The original body of the issue is below.
This is not a bug report but rather a feature request. The cloudflare API currently supports only the "Record" resource. The GO API Library has many other features, though.
https://godoc.org/github.com/cloudflare/cloudflare-go
Any chances of getting some of these into the Cloudflare Provider?
The text was updated successfully, but these errors were encountered: