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

cloud_type bug w/IAM Module #108

Open
brandon-secid opened this issue Jan 28, 2022 · 0 comments
Open

cloud_type bug w/IAM Module #108

brandon-secid opened this issue Jan 28, 2022 · 0 comments
Labels

Comments

@brandon-secid
Copy link

Describe the bug

I created a new IAM policy in the console which reflected the cloud type of "Any"
image

However, when I list the same policy ID via the API, the cloud_type reflects "AWS":

  curl --request GET \
  --url https://****.prismacloud.io/policy/*******-94ca-f3b7e6e88e3d \
  --header $MYTOKEN
{"policyId":"******-94ca-f3b7e6e88e3d","name":"*****","policyType":"iam","policySubTypes":["permissions"],"systemDefault":false,"description":"****","severity":"high","rule":{"name":"*******","cloudType":"AWS",[TRUNCATED]

So I attempt to import this policy w/terraform import, which happens successfully, but then the state shows that the cloud type is "all":

resource "prismacloud_policy" "****" {
    cloud_type               = "all"

Then a terraform plan shows "all" as acceptable value, and doesn't try to change it. However, when running apply, I get a vague 500 error:

Error: 500/https://****.prismacloud.io/policy/*******-94ca-f3b7e6e88e3d Error(msg:internal_error severity:error subject:)

  on ../modules/policy/main.tf line 15, in resource "prismacloud_policy" "default":
  15: resource "prismacloud_policy" "default" {

Expected behavior

Something with the cloud_type parameter with an IAM type policy, cloud_type "Any" is breaking here. Unfortunately, TRACE debugging isn't giving any additional details that are helpful. The expectation here is that I can import this IAM policy into TF.

This was all run with the latest version, 1.2.0, TF version 0.13.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant