-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add compute_backend_service import support #40
Add compute_backend_service import support #40
Conversation
|
||
## Import | ||
|
||
A backend service can be imported using the `name`, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "Backend Services can..." matches existing import blocks like google_compute_network
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Backend services can be imported using the `name`, e.g. | ||
|
||
``` | ||
$ terraform import google_compute_backend_service.website my_backend_service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can this line also be updated to import the example at the top of the page? It's a pattern I am trying to start going forward with #119. That way, readers of the Import documentation will be able to see a concrete example of how to structure an import for a resource based on an existing .tf configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names are pretty bad though, 'foobar', and 'blablah'. If I was reading the bottom example I might get confused as to what's what.
How about I update the example to match the import instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better! 👍
Backend services can be imported using the `name`, e.g. | ||
|
||
``` | ||
$ terraform import google_compute_backend_service.website my_backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/my_backend/my-backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! fixing
resource "google_compute_backend_service" "foobar" { | ||
name = "blablah" | ||
description = "Hello World 1234" | ||
resource "google_compute_backend_service" "website" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These example changes are awesome! Looks way better than names like "blablah"
and having test
appear in the name of most resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glad to hear it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Add compute_backend_service import support * Fixed the nit * Made example names a bit more intuitive * Use underscores wherever possible instead of dashes
* Add compute_backend_service import support * Fixed the nit * Made example names a bit more intuitive * Use underscores wherever possible instead of dashes
* Add compute_backend_service import support * Fixed the nit * Made example names a bit more intuitive * Use underscores wherever possible instead of dashes
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! |
Does what it says on the tin.
/cc @danawillow