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

resource/cloudflare_ruleset: ensure custom keys via query strings are known #2388

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

jacobbednarz
Copy link
Member

Updates the state handling to ensure that all query string parameters are known to the state handler when defining explicit query parameters as part of the custom cache key.

Closes #2360

… known

Updates the state handling to ensure that all query string parameters
are known to the state handler when defining explicit query parameters
as part of the custom cache key.

Closes #2360
@jacobbednarz jacobbednarz force-pushed the ensure-state-values-are-set-for-qs-cache-keys branch from 076450f to a5e7a19 Compare April 19, 2023 05:49
@github-actions
Copy link
Contributor

changelog detected ✅

@jacobbednarz
Copy link
Member Author

acceptance tests all passing

TF_ACC=1 go test ./internal/framework/service/rulesets -v -count 1 -run ^TestAccCloudflareRuleset_ -timeout 120m -parallel 1
=== RUN   TestAccCloudflareRuleset_WAFBasic
=== PAUSE TestAccCloudflareRuleset_WAFBasic
=== RUN   TestAccCloudflareRuleset_WAFManagedRuleset
=== PAUSE TestAccCloudflareRuleset_WAFManagedRuleset
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetWithoutDescription
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetWithoutDescription
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetOWASP
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetOWASP
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetOWASPBlockXSSWithAnomalyOver60
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetOWASPBlockXSSWithAnomalyOver60
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetOWASPOnlyPL1
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetOWASPOnlyPL1
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetDeployMultiple
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetDeployMultiple
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithSkip
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithSkip
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithTopSkipAndLastSkip
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithTopSkipAndLastSkip
=== RUN   TestAccCloudflareRuleset_SkipPhaseAndProducts
=== PAUSE TestAccCloudflareRuleset_SkipPhaseAndProducts
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetWithCategoryAndRuleBasedOverrides
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetWithCategoryAndRuleBasedOverrides
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetWithIDBasedOverrides
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetWithIDBasedOverrides
=== RUN   TestAccCloudflareRuleset_MagicTransitUpdateWithHigherPriority
    acctest.go:75: Skipping acceptance test for default account (f037e56e89293a057740de681ac9abbe). Default account is not configured for Magic Transit.
--- SKIP: TestAccCloudflareRuleset_MagicTransitUpdateWithHigherPriority (0.00s)
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetWithPayloadLogging
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetWithPayloadLogging
=== RUN   TestAccCloudflareRuleset_RateLimit
=== PAUSE TestAccCloudflareRuleset_RateLimit
=== RUN   TestAccCloudflareRuleset_RateLimitScorePerPeriod
=== PAUSE TestAccCloudflareRuleset_RateLimitScorePerPeriod
=== RUN   TestAccCloudflareRuleset_PreserveRuleIDs
=== PAUSE TestAccCloudflareRuleset_PreserveRuleIDs
=== RUN   TestAccCloudflareRuleset_CustomErrors
=== PAUSE TestAccCloudflareRuleset_CustomErrors
=== RUN   TestAccCloudflareRuleset_RequestOrigin
=== PAUSE TestAccCloudflareRuleset_RequestOrigin
=== RUN   TestAccCloudflareRuleset_TransformationRuleURIPath
=== PAUSE TestAccCloudflareRuleset_TransformationRuleURIPath
=== RUN   TestAccCloudflareRuleset_TransformationRuleURIQuery
=== PAUSE TestAccCloudflareRuleset_TransformationRuleURIQuery
=== RUN   TestAccCloudflareRuleset_TransformationRuleURIPathAndQueryCombination
=== PAUSE TestAccCloudflareRuleset_TransformationRuleURIPathAndQueryCombination
=== RUN   TestAccCloudflareRuleset_TransformationRuleRequestHeaders
=== PAUSE TestAccCloudflareRuleset_TransformationRuleRequestHeaders
=== RUN   TestAccCloudflareRuleset_TransformationRuleResponseHeaders
=== PAUSE TestAccCloudflareRuleset_TransformationRuleResponseHeaders
=== RUN   TestAccCloudflareRuleset_ActionParametersMultipleSkips
=== PAUSE TestAccCloudflareRuleset_ActionParametersMultipleSkips
=== RUN   TestAccCloudflareRuleset_ActionParametersOverridesAction
=== PAUSE TestAccCloudflareRuleset_ActionParametersOverridesAction
=== RUN   TestAccCloudflareRuleset_ActionParametersHTTPDDoSOverride
=== PAUSE TestAccCloudflareRuleset_ActionParametersHTTPDDoSOverride
=== RUN   TestAccCloudflareRuleset_ActionParametersOverrideAllRulesetRules
=== PAUSE TestAccCloudflareRuleset_ActionParametersOverrideAllRulesetRules
=== RUN   TestAccCloudflareRuleset_AccountLevelCustomWAFRule
=== PAUSE TestAccCloudflareRuleset_AccountLevelCustomWAFRule
=== RUN   TestAccCloudflareRuleset_ExposedCredentialCheck
=== PAUSE TestAccCloudflareRuleset_ExposedCredentialCheck
=== RUN   TestAccCloudflareRuleset_Logging
=== PAUSE TestAccCloudflareRuleset_Logging
=== RUN   TestAccCloudflareRuleset_ConditionallySetActionParameterVersion
=== PAUSE TestAccCloudflareRuleset_ConditionallySetActionParameterVersion
=== RUN   TestAccCloudflareRuleset_WAFManagedRulesetWithActionManagedChallenge
=== PAUSE TestAccCloudflareRuleset_WAFManagedRulesetWithActionManagedChallenge
=== RUN   TestAccCloudflareRuleset_LogCustomField
=== PAUSE TestAccCloudflareRuleset_LogCustomField
=== RUN   TestAccCloudflareRuleset_ActionParametersOverridesThrashingStatus
=== PAUSE TestAccCloudflareRuleset_ActionParametersOverridesThrashingStatus
=== RUN   TestAccCloudflareRuleset_CacheSettingsAllEnabled
=== PAUSE TestAccCloudflareRuleset_CacheSettingsAllEnabled
=== RUN   TestAccCloudflareRuleset_CacheSettingsOptionalsEmpty
=== PAUSE TestAccCloudflareRuleset_CacheSettingsOptionalsEmpty
=== RUN   TestAccCloudflareRuleset_CacheSettingsEdgeTTLRespectOrigin
=== PAUSE TestAccCloudflareRuleset_CacheSettingsEdgeTTLRespectOrigin
=== RUN   TestAccCloudflareRuleset_CacheSettingsStatusRangeGreaterThan
=== PAUSE TestAccCloudflareRuleset_CacheSettingsStatusRangeGreaterThan
=== RUN   TestAccCloudflareRuleset_CacheSettingsStatusRangeLessThan
=== PAUSE TestAccCloudflareRuleset_CacheSettingsStatusRangeLessThan
=== RUN   TestAccCloudflareRuleset_CacheSettingsFalse
=== PAUSE TestAccCloudflareRuleset_CacheSettingsFalse
=== RUN   TestAccCloudflareRuleset_Config
=== PAUSE TestAccCloudflareRuleset_Config
=== RUN   TestAccCloudflareRuleset_Redirect
=== PAUSE TestAccCloudflareRuleset_Redirect
=== RUN   TestAccCloudflareRuleset_DynamicRedirect
=== PAUSE TestAccCloudflareRuleset_DynamicRedirect
=== RUN   TestAccCloudflareRuleset_TransformationRuleURIStripOffQueryString
=== PAUSE TestAccCloudflareRuleset_TransformationRuleURIStripOffQueryString
=== RUN   TestAccCloudflareRuleset_TransformationRuleURIStripOffPath
=== PAUSE TestAccCloudflareRuleset_TransformationRuleURIStripOffPath
=== RUN   TestAccCloudflareRuleset_ConfigSingleFalseyValue
=== PAUSE TestAccCloudflareRuleset_ConfigSingleFalseyValue
=== RUN   TestAccCloudflareRuleset_ConfigConflictingCacheByDevice
=== PAUSE TestAccCloudflareRuleset_ConfigConflictingCacheByDevice
=== RUN   TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringExcludeKeys
=== PAUSE TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringExcludeKeys
=== RUN   TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringIncludeKeys
=== PAUSE TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringIncludeKeys
=== CONT  TestAccCloudflareRuleset_WAFBasic
--- PASS: TestAccCloudflareRuleset_WAFBasic (23.73s)
=== CONT  TestAccCloudflareRuleset_ActionParametersHTTPDDoSOverride
--- PASS: TestAccCloudflareRuleset_ActionParametersHTTPDDoSOverride (13.54s)
=== CONT  TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringIncludeKeys
--- PASS: TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringIncludeKeys (14.06s)
=== CONT  TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringExcludeKeys
--- PASS: TestAccCloudflareRuleset_CacheSettingsDefinedQueryStringExcludeKeys (12.85s)
=== CONT  TestAccCloudflareRuleset_ConfigConflictingCacheByDevice
--- PASS: TestAccCloudflareRuleset_ConfigConflictingCacheByDevice (2.73s)
=== CONT  TestAccCloudflareRuleset_ConfigSingleFalseyValue
--- PASS: TestAccCloudflareRuleset_ConfigSingleFalseyValue (12.96s)
=== CONT  TestAccCloudflareRuleset_TransformationRuleURIStripOffPath
--- PASS: TestAccCloudflareRuleset_TransformationRuleURIStripOffPath (12.41s)
=== CONT  TestAccCloudflareRuleset_TransformationRuleURIStripOffQueryString
--- PASS: TestAccCloudflareRuleset_TransformationRuleURIStripOffQueryString (12.57s)
=== CONT  TestAccCloudflareRuleset_DynamicRedirect
--- PASS: TestAccCloudflareRuleset_DynamicRedirect (12.75s)
=== CONT  TestAccCloudflareRuleset_Redirect
--- PASS: TestAccCloudflareRuleset_Redirect (18.93s)
=== CONT  TestAccCloudflareRuleset_Config
=== CONT  TestAccCloudflareRuleset_CacheSettingsFalse
--- PASS: TestAccCloudflareRuleset_Config (12.50s)
--- PASS: TestAccCloudflareRuleset_CacheSettingsFalse (12.89s)
=== CONT  TestAccCloudflareRuleset_CacheSettingsStatusRangeLessThan
--- PASS: TestAccCloudflareRuleset_CacheSettingsStatusRangeLessThan (13.20s)
=== CONT  TestAccCloudflareRuleset_CacheSettingsStatusRangeGreaterThan
--- PASS: TestAccCloudflareRuleset_CacheSettingsStatusRangeGreaterThan (15.65s)
=== CONT  TestAccCloudflareRuleset_CacheSettingsEdgeTTLRespectOrigin
--- PASS: TestAccCloudflareRuleset_CacheSettingsEdgeTTLRespectOrigin (13.34s)
=== CONT  TestAccCloudflareRuleset_CacheSettingsOptionalsEmpty
--- PASS: TestAccCloudflareRuleset_CacheSettingsOptionalsEmpty (12.51s)
=== CONT  TestAccCloudflareRuleset_CacheSettingsAllEnabled
--- PASS: TestAccCloudflareRuleset_CacheSettingsAllEnabled (13.75s)
=== CONT  TestAccCloudflareRuleset_ActionParametersOverridesThrashingStatus
--- PASS: TestAccCloudflareRuleset_ActionParametersOverridesThrashingStatus (74.70s)
=== CONT  TestAccCloudflareRuleset_LogCustomField
--- PASS: TestAccCloudflareRuleset_LogCustomField (14.10s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetWithActionManagedChallenge
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetWithActionManagedChallenge (24.76s)
=== CONT  TestAccCloudflareRuleset_ConditionallySetActionParameterVersion
--- PASS: TestAccCloudflareRuleset_ConditionallySetActionParameterVersion (25.10s)
=== CONT  TestAccCloudflareRuleset_Logging
--- PASS: TestAccCloudflareRuleset_Logging (14.79s)
=== CONT  TestAccCloudflareRuleset_ExposedCredentialCheck
--- PASS: TestAccCloudflareRuleset_ExposedCredentialCheck (12.25s)
=== CONT  TestAccCloudflareRuleset_AccountLevelCustomWAFRule
--- PASS: TestAccCloudflareRuleset_AccountLevelCustomWAFRule (16.20s)
=== CONT  TestAccCloudflareRuleset_ActionParametersOverrideAllRulesetRules
--- PASS: TestAccCloudflareRuleset_ActionParametersOverrideAllRulesetRules (12.60s)
=== CONT  TestAccCloudflareRuleset_TransformationRuleURIQuery
--- PASS: TestAccCloudflareRuleset_TransformationRuleURIQuery (12.96s)
=== CONT  TestAccCloudflareRuleset_ActionParametersOverridesAction
--- PASS: TestAccCloudflareRuleset_ActionParametersOverridesAction (12.75s)
=== CONT  TestAccCloudflareRuleset_ActionParametersMultipleSkips
--- PASS: TestAccCloudflareRuleset_ActionParametersMultipleSkips (14.84s)
=== CONT  TestAccCloudflareRuleset_TransformationRuleResponseHeaders
--- PASS: TestAccCloudflareRuleset_TransformationRuleResponseHeaders (12.97s)
=== CONT  TestAccCloudflareRuleset_TransformationRuleRequestHeaders
--- PASS: TestAccCloudflareRuleset_TransformationRuleRequestHeaders (13.18s)
=== CONT  TestAccCloudflareRuleset_TransformationRuleURIPathAndQueryCombination
--- PASS: TestAccCloudflareRuleset_TransformationRuleURIPathAndQueryCombination (12.60s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithSkip
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithSkip (19.89s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetWithPayloadLogging
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetWithPayloadLogging (13.10s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetWithIDBasedOverrides
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetWithIDBasedOverrides (13.35s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetWithCategoryAndRuleBasedOverrides
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetWithCategoryAndRuleBasedOverrides (12.96s)
=== CONT  TestAccCloudflareRuleset_SkipPhaseAndProducts
--- PASS: TestAccCloudflareRuleset_SkipPhaseAndProducts (13.59s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithTopSkipAndLastSkip
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetDeployMultipleWithTopSkipAndLastSkip (18.66s)
=== CONT  TestAccCloudflareRuleset_CustomErrors
=== CONT  TestAccCloudflareRuleset_TransformationRuleURIPath
--- PASS: TestAccCloudflareRuleset_CustomErrors (14.35s)
--- PASS: TestAccCloudflareRuleset_TransformationRuleURIPath (12.58s)
=== CONT  TestAccCloudflareRuleset_RequestOrigin
--- PASS: TestAccCloudflareRuleset_RequestOrigin (12.82s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetOWASPBlockXSSWithAnomalyOver60
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetOWASPBlockXSSWithAnomalyOver60 (13.90s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetDeployMultiple
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetDeployMultiple (13.69s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetOWASPOnlyPL1
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetOWASPOnlyPL1 (13.79s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetWithoutDescription
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetWithoutDescription (12.71s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRulesetOWASP
--- PASS: TestAccCloudflareRuleset_WAFManagedRulesetOWASP (13.45s)
=== CONT  TestAccCloudflareRuleset_PreserveRuleIDs
--- PASS: TestAccCloudflareRuleset_PreserveRuleIDs (48.90s)
=== CONT  TestAccCloudflareRuleset_RateLimitScorePerPeriod
--- PASS: TestAccCloudflareRuleset_RateLimitScorePerPeriod (13.41s)
=== CONT  TestAccCloudflareRuleset_WAFManagedRuleset
--- PASS: TestAccCloudflareRuleset_WAFManagedRuleset (13.85s)
=== CONT  TestAccCloudflareRuleset_RateLimit
--- PASS: TestAccCloudflareRuleset_RateLimit (16.89s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/framework/service/rulesets	796.649s

@jacobbednarz jacobbednarz merged commit e6ab158 into master Apr 19, 2023
@jacobbednarz jacobbednarz deleted the ensure-state-values-are-set-for-qs-cache-keys branch April 19, 2023 05:59
@github-actions github-actions bot added this to the v4.5.0 milestone Apr 19, 2023
github-actions bot pushed a commit that referenced this pull request Apr 19, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

This functionality has been released in v4.5.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloudflare_ruleset ailed to marshal plan to json: value is not known
1 participant