-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Terraform plan with 'google_compute_security_policy' not show the creation of existing resources #8335
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
Comments
@skymoraa if you want to bring a resource created in google console to a terraform managed resource, you need to use |
Yes I agree, but without the import the plan shouldn't show me the resource to add, because it is not present in the state? As it happens for other resources Because terraform plan doesn't show it and if I run terraform apply the resource is still added to the state even if the plan did not say so. |
Can you add debug output of your tf plan command, just want to check the calls we are making there. |
Debug Output Log: Rule with priority=100 and default create with terraform. Rule priority=101 create manualy and then add configuration on tf. Terraform plan make a rest call and find resource. But doesn't it make a difference with the state? State: |
) Signed-off-by: Modular Magician <[email protected]>
) Signed-off-by: Modular Magician <[email protected]>
Hello there, I started checking on this. @skymoraa could you get if this issue still persist on latest provider version? |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
I expect that running a
terraform plan
, if a resource exists but it is not present in the state on bucket, the command want to add the resource until i import it in state.For examples: rule with priority=101 created by gcp console, then add configuration into .tf file and run a plan.
Actual Behavior
Instead,
terraform plan
shows "No changes. Infrastructure is up-to-date.". Moreover then doing aterraform apply
puts it on the state. But the plan before didn't show it.Steps to Reproduce
terraform plan
with the same resources (nothing is displayed)terraform apply
on "No changes. Infrastructure is up-to-date" and the state will be refreshedReferences
b/305279834
The text was updated successfully, but these errors were encountered: