-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
App Engine recreated with resource "google_app_engine_application" #2175
Comments
Hi @mkozjak, most of our resources don't let you use a "create" action when the resource already exists. Importing it into your state should work. I'm happy to entertain an argument about why app engine should behave differently than the rest, if you have one. |
@danawillow Hi! Not sure if I reported okay, but I did import everything before trying plan/apply:
So, I have created a project and an app engine initially without using terraform. Later on went with importing and trying apply. The rest is in the debug log. |
@mkozjak Have you tried |
@paddycarver Oh yes, sorry, I haven't tried that one. For some reason I thought it would pull everthing if i did just |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform Version
Terraform v0.11.8
Affected Resource(s)
Terraform Configuration Files
main.tf
app_engine.tf
Debug Output
https://gist.github.com/7940003399787e5e521db648630c9b05
Panic Output
Expected Behavior
Terraform should recognize App Engine already exists and skip recreating it.
Actual Behavior
Terraform tries to create an App Engine, but fails with "googleapi: Error 409: This application already exists and cannot be re-created., alreadyExists".
Btw, Terraform doesn't look at $GOPATH/bin for new providers.
Steps to Reproduce
Create your GCP project and App Engine via GCP Console.
terraform init
terraform import google_project.test-dev test-dev
terraform plan
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: