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

Fix firewall rule products support which was missing handling #630

Merged

Conversation

filipowm
Copy link
Contributor

Resource cloudflare_firewall_rule contained action bypass and field products, however there was no handling implemented what was resulting in error:

products must be specified for the 'bypass' action

@ghost ghost added the size/M label Mar 22, 2020
@filipowm filipowm force-pushed the bugfix/firewall-products-not-added branch from 9a9fc9d to 4192270 Compare March 22, 2020 12:41
name := "cloudflare_firewall_rule." + rnd
zoneID := os.Getenv("CLOUDFLARE_ZONE_ID")

filterQuoted := `(http.host eq \"` + rnd + `\")`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this rule is invalid but i'm unsure why it's not failing when creating it in the tests (as the rule is parsed for validity on creation).

Suggested change
filterQuoted := `(http.host eq \"` + rnd + `\")`
filterQuoted := `(http.host eq \"terraform.cfapi.net\")`

(or pull it from the env using CLOUDFLARE_DOMAIN if you'd rather)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked on CF and any string works.

But I've changed it to proposed CLOUDFLARE_DOMAIN,

@filipowm filipowm force-pushed the bugfix/firewall-products-not-added branch from 149a8ee to e577e87 Compare March 23, 2020 07:09
@jacobbednarz jacobbednarz merged commit 984c5f3 into cloudflare:master Mar 23, 2020
@jacobbednarz
Copy link
Member

Thanking you @filipowm 🍰

@tomelfring
Copy link

Hi, any chance this will be fixed in a new patch release any time soon? We would love to use this feature.

@filipowm
Copy link
Contributor Author

@jacobbednarz Any idea when will be the next release?

@patryk
Copy link
Contributor

patryk commented Mar 27, 2020

We usually release ~ once a month, but it's not a fixed schedule. I'll see about releasing today.

boekkooi-lengoo pushed a commit to boekkooi-lengoo/terraform-provider-cloudflare that referenced this pull request Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants