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

Unable to manage wiz_control_associations (changing cspm controls is not allowed) #34

Open
gramsa49 opened this issue Oct 31, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@gramsa49
Copy link
Collaborator

Terraform Version and Provider Version

Terraform v1.3.3
terraform-provider-wiz v1.0.7

Affected Resource(s)

  • wiz_control_association

Terraform Configuration Files

Use any Wiz managed control with a custom security sub-category.

Debug Output

{
  "data": {
    "updateControls": {
      "successCount": 0,
      "failCount": 1,
      "errors": [
        {
          "reason": "changing cspm controls is not allowed",
          "control": {
            "id": "014e7d8a-1c95-5220-9852-ffbbcd438f55"
          }
        }
      ]
    }
  }
}

Expected Behavior

Should be able to both define and destroy security sub-category/control associations.

Actual Behavior

Error returned

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@gramsa49 gramsa49 added the bug Something isn't working label Oct 31, 2022
@cvirtucio
Copy link
Contributor

cvirtucio commented Aug 14, 2023

something seems to be clobbering control_ids during the Delete() phase that happens when the control association is getting recreated. this comes up empty, so you only get the securitySubCategoriesToRemove in the UpdateControlsInput struct when the request goes out to Wiz's API.

@cvirtucio
Copy link
Contributor

this fix worked for us: #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants