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

Datasource for Backend Services #1150

Merged
merged 1 commit into from
Mar 12, 2018

Conversation

bpineau
Copy link
Contributor

@bpineau bpineau commented Mar 5, 2018

Exposes existing google_compute_backend_service as data sources.
This addresses #149 (except for google_compute_region_backend_service,
which is not covered here).

This allows, for instance, to collect a backend service's self_link and
use it from an other workspace/tfstate, sharing most of the
loadbalancers definition.

$ env GOOGLE_REGION=us-central1 make testacc TEST=./google TESTARGS='-run=TestAccGoogleComputeBackendService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./google -v -run=TestAccGoogleComputeBackendService_ -timeout 120m
=== RUN   TestAccGoogleComputeBackendService_basic
--- PASS: TestAccGoogleComputeBackendService_basic (45.09s)
PASS
ok  	github.com/terraform-providers/terraform-provider-google/google	45.105s

@nat-henderson nat-henderson self-requested a review March 12, 2018 20:29
Copy link
Contributor

@nat-henderson nat-henderson left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I'll run the tests.

"github.com/hashicorp/terraform/terraform"
)

func TestAccGoogleComputeBackendService_basic(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: please remove "Google" from test names? We're trying to do that as of recently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review @ndmckinley !
I replaced the "Google" with "DataSource" in the tests names,
since just removing this string would name-clash with the resource's own tests, I hope that's ok?

@nat-henderson
Copy link
Contributor

Tests pass - happy to merge once you make that quick change.

@nat-henderson nat-henderson self-assigned this Mar 12, 2018
Exposes existing `google_compute_backend_service` as data sources.
This addresses hashicorp#149 .

This allows, for instance, to collect a backend service's self_link and
use it from an other workspace/tfstate, sharing most of the
loadbalancers definition.

```
env GOOGLE_REGION=us-central1 make testacc TEST=./google TESTARGS='-run=TestAccDataSourceComputeBackendService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./google -v -run=TestAccDataSourceComputeBackendService_ -timeout 120m
=== RUN   TestAccDataSourceComputeBackendService_basic
=== PAUSE TestAccDataSourceComputeBackendService_basic
=== CONT  TestAccDataSourceComputeBackendService_basic
--- PASS: TestAccDataSourceComputeBackendService_basic (48.11s)
PASS
ok  	github.com/terraform-providers/terraform-provider-google/google	48.123s
```
@bpineau bpineau force-pushed the ds-compute-backend-service branch from d3373a3 to dca85ba Compare March 12, 2018 22:06
@nat-henderson nat-henderson merged commit f651275 into hashicorp:master Mar 12, 2018
ashish-amarnath pushed a commit to ashish-amarnath/terraform-provider-google that referenced this pull request Mar 20, 2018
Exposes existing `google_compute_backend_service` as data sources.
This addresses hashicorp#149 .

This allows, for instance, to collect a backend service's self_link and
use it from an other workspace/tfstate, sharing most of the
loadbalancers definition.
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
Exposes existing `google_compute_backend_service` as data sources.
This addresses hashicorp#149 .

This allows, for instance, to collect a backend service's self_link and
use it from an other workspace/tfstate, sharing most of the
loadbalancers definition.
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this pull request Sep 27, 2019
Signed-off-by: Modular Magician <magic-modules@google.com>
@ghost
Copy link

ghost commented Mar 29, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants