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

Add compute_backend_service import support #40

Merged

Conversation

selmanj
Copy link
Contributor

@selmanj selmanj commented Jun 13, 2017

Does what it says on the tin.

/cc @danawillow


## Import

A backend service can be imported using the `name`, e.g.
Copy link
Collaborator

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.

Copy link
Contributor Author

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
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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
Copy link
Collaborator

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

Copy link
Contributor Author

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" {
Copy link
Collaborator

@rileykarson rileykarson Jun 14, 2017

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glad to hear it!

Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@catsby catsby merged commit 3b7f6d6 into hashicorp:master Jun 14, 2017
gh-mlfowler pushed a commit to gh-mlfowler/terraform-provider-google that referenced this pull request Jun 20, 2017
* Add compute_backend_service import support

* Fixed the nit

* Made example names a bit more intuitive

* Use underscores wherever possible instead of dashes
pdecat pushed a commit to pdecat/terraform-provider-google that referenced this pull request Jun 29, 2017
* Add compute_backend_service import support

* Fixed the nit

* Made example names a bit more intuitive

* Use underscores wherever possible instead of dashes
chrisst referenced this pull request in chrisst/terraform-provider-google Nov 9, 2018
* Add compute_backend_service import support

* Fixed the nit

* Made example names a bit more intuitive

* Use underscores wherever possible instead of dashes
@ghost
Copy link

ghost commented Mar 31, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants