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

azurerm_policy_definition: fix acceptance test of removing forcenew paramters steps #27871

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Nov 4, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

// `parameters` cannot have values removed so we'll ForceNew if there are less parameters between Terraform runs
if d.HasChange("parameters") {
oldParametersRaw, newParametersRaw := d.GetChange("parameters")
if oldParametersString := oldParametersRaw.(string); oldParametersString != "" {
newParametersString := newParametersRaw.(string)
if newParametersString == "" {
return d.ForceNew("parameters")

=== CONT  TestAccAzureRMPolicyDefinition_removeParameter
    testcase.go:173: Step 7/9 error: Pre-apply plan check(s) failed:
        'azurerm_policy_definition.test' - expected action to not be Replace, path: [[parameters]]
--- FAIL: TestAccAzureRMPolicyDefinition_removeParameter (385.15s)

@wuxu92 wuxu92 requested review from katbyte and a team as code owners November 4, 2024 03:11
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @wuxu92 LGTM 👍

@stephybun stephybun merged commit b6ee744 into hashicorp:main Nov 4, 2024
28 of 29 checks passed
@github-actions github-actions bot added this to the v4.9.0 milestone Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants