Skip to content

Commit

Permalink
Replace self_link (part 2 of #5542) (#3478) (#6349)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored May 11, 2020
1 parent b80b426 commit 2ae02a4
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 53 deletions.
3 changes: 3 additions & 0 deletions .changelog/3478.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
12 changes: 6 additions & 6 deletions google/resource_compute_global_forwarding_rule_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ func testAccComputeGlobalForwardingRule_globalForwardingRuleHttpExample(context
return Nprintf(`
resource "google_compute_global_forwarding_rule" "default" {
name = "tf-test-global-rule%{random_suffix}"
target = google_compute_target_http_proxy.default.self_link
target = google_compute_target_http_proxy.default.id
port_range = "80"
}
resource "google_compute_target_http_proxy" "default" {
name = "tf-test-target-proxy%{random_suffix}"
description = "a description"
url_map = google_compute_url_map.default.self_link
url_map = google_compute_url_map.default.id
}
resource "google_compute_url_map" "default" {
name = "url-map-tf-test-target-proxy%{random_suffix}"
description = "a description"
default_service = google_compute_backend_service.default.self_link
default_service = google_compute_backend_service.default.id
host_rule {
hosts = ["mysite.com"]
Expand All @@ -73,11 +73,11 @@ resource "google_compute_url_map" "default" {
path_matcher {
name = "allpaths"
default_service = google_compute_backend_service.default.self_link
default_service = google_compute_backend_service.default.id
path_rule {
paths = ["/*"]
service = google_compute_backend_service.default.self_link
service = google_compute_backend_service.default.id
}
}
}
Expand All @@ -88,7 +88,7 @@ resource "google_compute_backend_service" "default" {
protocol = "HTTP"
timeout_sec = 10
health_checks = [google_compute_http_health_check.default.self_link]
health_checks = [google_compute_http_health_check.default.id]
}
resource "google_compute_http_health_check" "default" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func testAccComputeNetworkEndpointGroup_networkEndpointGroupExample(context map[
return Nprintf(`
resource "google_compute_network_endpoint_group" "neg" {
name = "tf-test-my-lb-neg%{random_suffix}"
network = google_compute_network.default.self_link
subnetwork = google_compute_subnetwork.default.self_link
network = google_compute_network.default.id
subnetwork = google_compute_subnetwork.default.id
default_port = "90"
zone = "us-central1-a"
}
Expand All @@ -66,7 +66,7 @@ resource "google_compute_subnetwork" "default" {
name = "tf-test-neg-subnetwork%{random_suffix}"
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
}
`, context)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ resource "google_compute_network_peering_routes_config" "peering_primary_routes"
resource "google_compute_network_peering" "peering_primary" {
name = "tf-test-primary-peering%{random_suffix}"
network = google_compute_network.network_primary.self_link
peer_network = google_compute_network.network_secondary.self_link
network = google_compute_network.network_primary.id
peer_network = google_compute_network.network_secondary.id
import_custom_routes = true
export_custom_routes = true
}
resource "google_compute_network_peering" "peering_secondary" {
name = "tf-test-secondary-peering%{random_suffix}"
network = google_compute_network.network_secondary.self_link
peer_network = google_compute_network.network_primary.self_link
network = google_compute_network.network_secondary.id
peer_network = google_compute_network.network_primary.id
}
resource "google_compute_network" "network_primary" {
Expand Down
2 changes: 1 addition & 1 deletion google/resource_compute_node_group_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "google_compute_node_group" "nodes" {
description = "example google_compute_node_group for Terraform Google Provider"
size = 1
node_template = google_compute_node_template.soletenant-tmpl.self_link
node_template = google_compute_node_template.soletenant-tmpl.id
}
`, context)
}
Expand Down
8 changes: 4 additions & 4 deletions google/resource_redis_instance_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource "google_redis_instance" "cache" {
location_id = "us-central1-a"
alternative_location_id = "us-central1-f"
authorized_network = data.google_compute_network.redis-network.self_link
authorized_network = data.google_compute_network.redis-network.id
redis_version = "REDIS_3_2"
display_name = "Terraform Test Instance"
Expand Down Expand Up @@ -155,11 +155,11 @@ resource "google_compute_global_address" "service_range" {
purpose = "VPC_PEERING"
address_type = "INTERNAL"
prefix_length = 16
network = google_compute_network.network.self_link
network = google_compute_network.network.id
}
resource "google_service_networking_connection" "private_service_connection" {
network = google_compute_network.network.self_link
network = google_compute_network.network.id
service = "servicenetworking.googleapis.com"
reserved_peering_ranges = [google_compute_global_address.service_range.name]
}
Expand All @@ -172,7 +172,7 @@ resource "google_redis_instance" "cache" {
location_id = "us-central1-a"
alternative_location_id = "us-central1-f"
authorized_network = google_compute_network.network.self_link
authorized_network = google_compute_network.network.id
connect_mode = "PRIVATE_SERVICE_ACCESS"
redis_version = "REDIS_3_2"
Expand Down
24 changes: 12 additions & 12 deletions website/docs/r/compute_global_forwarding_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ https://cloud.google.com/compute/docs/load-balancing/http/
```hcl
resource "google_compute_global_forwarding_rule" "default" {
name = "global-rule"
target = google_compute_target_http_proxy.default.self_link
target = google_compute_target_http_proxy.default.id
port_range = "80"
}
resource "google_compute_target_http_proxy" "default" {
name = "target-proxy"
description = "a description"
url_map = google_compute_url_map.default.self_link
url_map = google_compute_url_map.default.id
}
resource "google_compute_url_map" "default" {
name = "url-map-target-proxy"
description = "a description"
default_service = google_compute_backend_service.default.self_link
default_service = google_compute_backend_service.default.id
host_rule {
hosts = ["mysite.com"]
Expand All @@ -65,11 +65,11 @@ resource "google_compute_url_map" "default" {
path_matcher {
name = "allpaths"
default_service = google_compute_backend_service.default.self_link
default_service = google_compute_backend_service.default.id
path_rule {
paths = ["/*"]
service = google_compute_backend_service.default.self_link
service = google_compute_backend_service.default.id
}
}
}
Expand All @@ -80,7 +80,7 @@ resource "google_compute_backend_service" "default" {
protocol = "HTTP"
timeout_sec = 10
health_checks = [google_compute_http_health_check.default.self_link]
health_checks = [google_compute_http_health_check.default.id]
}
resource "google_compute_http_health_check" "default" {
Expand All @@ -102,7 +102,7 @@ resource "google_compute_http_health_check" "default" {
resource "google_compute_global_forwarding_rule" "default" {
provider = google-beta
name = "global-rule"
target = google_compute_target_http_proxy.default.self_link
target = google_compute_target_http_proxy.default.id
port_range = "80"
load_balancing_scheme = "INTERNAL_SELF_MANAGED"
ip_address = "0.0.0.0"
Expand All @@ -119,14 +119,14 @@ resource "google_compute_target_http_proxy" "default" {
provider = google-beta
name = "target-proxy"
description = "a description"
url_map = google_compute_url_map.default.self_link
url_map = google_compute_url_map.default.id
}
resource "google_compute_url_map" "default" {
provider = google-beta
name = "url-map-target-proxy"
description = "a description"
default_service = google_compute_backend_service.default.self_link
default_service = google_compute_backend_service.default.id
host_rule {
hosts = ["mysite.com"]
Expand All @@ -135,11 +135,11 @@ resource "google_compute_url_map" "default" {
path_matcher {
name = "allpaths"
default_service = google_compute_backend_service.default.self_link
default_service = google_compute_backend_service.default.id
path_rule {
paths = ["/*"]
service = google_compute_backend_service.default.self_link
service = google_compute_backend_service.default.id
}
}
}
Expand All @@ -159,7 +159,7 @@ resource "google_compute_backend_service" "default" {
max_rate_per_instance = 50
}
health_checks = [google_compute_health_check.default.self_link]
health_checks = [google_compute_health_check.default.id]
}
data "google_compute_image" "debian_image" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ resource "google_compute_global_network_endpoint" "default-endpoint" {
resource "google_compute_global_network_endpoint_group" "group" {
name = "my-lb-neg"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
default_port = "90"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ information, see Creating VLAN Attachments.
resource "google_compute_interconnect_attachment" "on_prem" {
name = "on-prem-attachment"
interconnect = "my-interconnect-id"
router = google_compute_router.foobar.self_link
router = google_compute_router.foobar.id
}
resource "google_compute_router" "foobar" {
Expand Down
8 changes: 4 additions & 4 deletions website/docs/r/compute_network_endpoint.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ resource "google_compute_instance" "endpoint-instance" {
}
network_interface {
subnetwork = google_compute_subnetwork.default.self_link
subnetwork = google_compute_subnetwork.default.id
access_config {
}
}
}
resource "google_compute_network_endpoint_group" "group" {
name = "my-lb-neg"
network = google_compute_network.default.self_link
subnetwork = google_compute_subnetwork.default.self_link
network = google_compute_network.default.id
subnetwork = google_compute_subnetwork.default.id
default_port = "90"
zone = "us-central1-a"
}
Expand All @@ -87,7 +87,7 @@ resource "google_compute_subnetwork" "default" {
name = "neg-subnetwork"
ip_cidr_range = "10.0.0.1/16"
region = "us-central1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
}
```

Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/compute_network_endpoint_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ To get more information about NetworkEndpointGroup, see:
```hcl
resource "google_compute_network_endpoint_group" "neg" {
name = "my-lb-neg"
network = google_compute_network.default.self_link
subnetwork = google_compute_subnetwork.default.self_link
network = google_compute_network.default.id
subnetwork = google_compute_subnetwork.default.id
default_port = "90"
zone = "us-central1-a"
}
Expand All @@ -68,7 +68,7 @@ resource "google_compute_subnetwork" "default" {
name = "neg-subnetwork"
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ resource "google_compute_network_peering_routes_config" "peering_primary_routes"
resource "google_compute_network_peering" "peering_primary" {
name = "primary-peering"
network = google_compute_network.network_primary.self_link
peer_network = google_compute_network.network_secondary.self_link
network = google_compute_network.network_primary.id
peer_network = google_compute_network.network_secondary.id
import_custom_routes = true
export_custom_routes = true
}
resource "google_compute_network_peering" "peering_secondary" {
name = "secondary-peering"
network = google_compute_network.network_secondary.self_link
peer_network = google_compute_network.network_primary.self_link
network = google_compute_network.network_secondary.id
peer_network = google_compute_network.network_primary.id
}
resource "google_compute_network" "network_primary" {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/compute_node_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ resource "google_compute_node_group" "nodes" {
description = "example google_compute_node_group for Terraform Google Provider"
size = 1
node_template = google_compute_node_template.soletenant-tmpl.self_link
node_template = google_compute_node_template.soletenant-tmpl.id
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
Expand Down Expand Up @@ -92,7 +92,7 @@ resource "google_compute_node_group" "nodes" {
description = "example google_compute_node_group for Terraform Google Provider"
size = 1
node_template = google_compute_node_template.soletenant-tmpl.self_link
node_template = google_compute_node_template.soletenant-tmpl.id
autoscaling_policy {
mode = "ON"
min_nodes = 1
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/kms_crypto_key.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "google_kms_key_ring" "keyring" {
resource "google_kms_crypto_key" "example-key" {
name = "crypto-key-example"
key_ring = google_kms_key_ring.keyring.self_link
key_ring = google_kms_key_ring.keyring.id
rotation_period = "100000s"
lifecycle {
Expand All @@ -70,7 +70,7 @@ resource "google_kms_key_ring" "keyring" {
resource "google_kms_crypto_key" "example-asymmetric-sign-key" {
name = "crypto-key-example"
key_ring = google_kms_key_ring.keyring.self_link
key_ring = google_kms_key_ring.keyring.id
purpose = "ASYMMETRIC_SIGN"
version_template {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/pubsub_topic.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ resource "google_pubsub_topic" "example" {
```hcl
resource "google_pubsub_topic" "example" {
name = "example-topic"
kms_key_name = google_kms_crypto_key.crypto_key.self_link
kms_key_name = google_kms_crypto_key.crypto_key.id
}
resource "google_kms_crypto_key" "crypto_key" {
name = "example-key"
key_ring = google_kms_key_ring.key_ring.self_link
key_ring = google_kms_key_ring.key_ring.id
}
resource "google_kms_key_ring" "key_ring" {
Expand Down
Loading

0 comments on commit 2ae02a4

Please sign in to comment.