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

Provider produced inconsistent result after apply #224

Open
Satyajeetsendha11 opened this issue May 12, 2023 · 3 comments
Open

Provider produced inconsistent result after apply #224

Satyajeetsendha11 opened this issue May 12, 2023 · 3 comments
Labels

Comments

@Satyajeetsendha11
Copy link

Hi Team, Below is the error.

Error: Provider produced inconsistent result after apply 
│ 
│ When applying changes to prismacloud_policy.PC-GCP-GKE-151, provider
│ "provider["registry.terraform.io/paloaltonetworks/prismacloud"]" produced
│ an unexpected new value: Root resource was present, but now absent.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

Expected behavior

We are using Terraform to manage all the policies in our Prisma Cloud Console, our Terraform Provider Version is "1.3.7".
How can we find the absent resource because our Policies is built-in policies and we imported that policy to Terraform to manage.

Your Environment

We manage 304 policy in Terraform but this error occured in our last commit.

  • Version used: "1.3.7"
@welcome-to-palo-alto-networks

🎉 Thanks for opening your first issue here! Welcome to the community!

@infosec-shinobi
Copy link

We are also running into this error:

Terraform v1.5.6
Prisma Provider Version: 1.4.9

When applying changes to prismacloud_policy.random_named_policy, provider "provider[\"registry.terraform.io/paloaltonetworks/prismacloud\"]" produced an unexpected new value: Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own issue tracker.

Interesting enough, although we got this error, TF did create the resource... But it didn't update state. So when we tried to run another plan and apply:

  1. Plan was fine and said it wanted to create policy named random_named_policy
  2. Apply failed with the following:
Error: 400/https://apiX.prismacloud.io/policy Error(msg:duplicate_name severity:error subject:name)
with prismacloud_policy.random_named_policy
on X.tf line xxx, in resource "prismacloud_policy" "random_named_policy":
resource "prismacloud_policy" "random_named_policy" {

Have you guys had a chance to review?

@AnushreeHS
Copy link
Collaborator

@infosec-shinobi We are unable to replicate the error on our end. It would be helpful if you could share the resource template of the policy you are trying to create. We would be happy to assist you.

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

3 participants