-
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
GATE-2386: Adds support for missing team rules settings #1402
GATE-2386: Adds support for missing team rules settings #1402
Conversation
This PR adds support for creating rules with session management settings (check_session), adding HTTP headers (add_headers), and other missing browser isolation options.
Oops! It looks like no changelog entry is attached to this PR. Please include a release note as described in https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/docs/changelog-process.md. Example:
If you do not require a release note to be included, please add the |
@@ -44,6 +44,8 @@ func TestAccCloudflareTeamsRuleBasic(t *testing.T) { | |||
resource.TestCheckResourceAttr(name, "traffic", "any(dns.domains[*] == \"example.com\")"), | |||
resource.TestCheckResourceAttr(name, "rule_settings.0.block_page_enabled", "false"), | |||
resource.TestCheckResourceAttr(name, "rule_settings.0.block_page_reason", "cuz"), | |||
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.enforce", "true"), | |||
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.duration", "200s"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is up here; the acceptance tests aren't passing
TF_ACC=1 go test $(go list ./...) -v -run "^TestAccCloudflareTeamsRule" -count 1 -parallel 1 -timeout 120m -parallel 1
? github.com/cloudflare/terraform-provider-cloudflare [no test files]
=== RUN TestAccCloudflareTeamsRuleBasic
resource_cloudflare_teams_rules_test.go:28: Step 1/1 error: Error running apply: exit status 1
Error: error creating Teams rule for account "f037e56e89293a057740de681ac9abbe": HTTP status 400: EOF
with cloudflare_teams_rule.qgngjyuhan,
on terraform_plugin_test.tf line 2, in resource "cloudflare_teams_rule" "qgngjyuhan":
2: resource "cloudflare_teams_rule" "qgngjyuhan" {
--- FAIL: TestAccCloudflareTeamsRuleBasic (8.24s)
FAIL
FAIL github.com/cloudflare/terraform-provider-cloudflare/cloudflare 8.818s
? github.com/cloudflare/terraform-provider-cloudflare/tools/cmd/changelog-check [no test files]
? github.com/cloudflare/terraform-provider-cloudflare/version [no test files]
FAIL
make: *** [testacc] Error 1
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.enforce", "true"), | ||
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.duration", "200s"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.enforce", "true"), | |
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.duration", "200s"), | |
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.0.enforce", "true"), | |
resource.TestCheckResourceAttr(name, "rule_settings.0.check_session.0.duration", "200s"), |
acceptance tests look good!
once we update the website documentation to include the new fields, we can merge this. |
acceptance tests are now passing
|
This PR adds support for creating rules with session management
settings (check_session), adding HTTP headers (add_headers), and other
missing browser isolation options.
This PR depends on cloudflare/cloudflare-go#786