Skip to content

Commit

Permalink
Replace self link for TPG#5542 (GoogleCloudPlatform#3467)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardmedia authored and Nathan Klish committed May 18, 2020
1 parent 7868673 commit c4ff65c
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "google_access_context_manager_access_level" "<%= ctx[:primary_resource_id] %>" {
parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}"
name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/accessLevels/<%= ctx[:vars]['access_level_name'] %>"
parent = "accessPolicies/${google_access_context_manager_access_policy.access-policy.name}"
name = "accessPolicies/${google_access_context_manager_access_policy.access-policy.name}/accessLevels/<%= ctx[:vars]['access_level_name'] %>"
title = "<%= ctx[:vars]['access_level_name'] %>"
basic {
conditions {
Expand Down
2 changes: 1 addition & 1 deletion templates/terraform/examples/backend_service_basic.tf.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['backend_service_name'] %>"
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 @@ -16,14 +16,14 @@ resource "google_compute_backend_service" "example_backend" {
group = google_compute_instance_group_manager.webservers.instance_group
}

health_checks = [google_compute_http_health_check.default.self_link]
health_checks = [google_compute_http_health_check.default.id]
}

resource "google_compute_instance_group_manager" "webservers" {
name = "my-webservers"

version {
instance_template = google_compute_instance_template.webserver.self_link
instance_template = google_compute_instance_template.webserver.id
name = "primary"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta

name = "<%= ctx[:vars]['backend_service_name'] %>"
health_checks = [google_compute_health_check.health_check.self_link]
health_checks = [google_compute_health_check.health_check.id]
load_balancing_scheme = "INTERNAL_SELF_MANAGED"
locality_lb_policy = "RING_HASH"
session_affinity = "HTTP_COOKIE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta

name = "<%= ctx[:vars]['backend_service_name'] %>"
health_checks = [google_compute_health_check.health_check.self_link]
health_checks = [google_compute_health_check.health_check.id]
load_balancing_scheme = "INTERNAL_SELF_MANAGED"
locality_lb_policy = "ROUND_ROBIN"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "google_compute_instance" "mirror" {
}

network_interface {
network = google_compute_network.default.self_link
network = google_compute_network.default.id
access_config {
}
}
Expand All @@ -21,15 +21,15 @@ resource "google_compute_packet_mirroring" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
description = "bar"
network {
url = google_compute_network.default.self_link
url = google_compute_network.default.id
}
collector_ilb {
url = google_compute_forwarding_rule.default.self_link
url = google_compute_forwarding_rule.default.id
}
mirrored_resources {
tags = ["foo"]
instances {
url = google_compute_instance.mirror.self_link
url = google_compute_instance.mirror.id
}
}
filter {
Expand All @@ -45,15 +45,15 @@ resource "google_compute_network" "default" {
resource "google_compute_subnetwork" "default" {
name = "<%= ctx[:vars]['subnetwork_name'] %>"
provider = google-beta
network = google_compute_network.default.self_link
network = google_compute_network.default.id
ip_cidr_range = "10.2.0.0/16"

}

resource "google_compute_region_backend_service" "default" {
name = "<%= ctx[:vars]['service_name'] %>"
provider = google-beta
health_checks = ["${google_compute_health_check.default.self_link}"]
health_checks = [google_compute_health_check.default.id]
}

resource "google_compute_health_check" "default" {
Expand All @@ -74,9 +74,9 @@ resource "google_compute_forwarding_rule" "default" {
is_mirroring_collector = true
ip_protocol = "TCP"
load_balancing_scheme = "INTERNAL"
backend_service = google_compute_region_backend_service.default.self_link
backend_service = google_compute_region_backend_service.default.id
all_ports = true
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
network_tier = "PREMIUM"
}
4 changes: 2 additions & 2 deletions templates/terraform/examples/dns_managed_zone_private.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" {

private_visibility_config {
networks {
network_url = google_compute_network.network-1.self_link
network_url = google_compute_network.network-1.id
}
networks {
network_url = google_compute_network.network-2.self_link
network_url = google_compute_network.network-2.id
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" {

private_visibility_config {
networks {
network_url = google_compute_network.network-1.self_link
network_url = google_compute_network.network-1.id
}
networks {
network_url = google_compute_network.network-2.self_link
network_url = google_compute_network.network-2.id
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" {

private_visibility_config {
networks {
network_url = google_compute_network.network-source.self_link
network_url = google_compute_network.network-source.id
}
}

peering_config {
target_network {
network_url = google_compute_network.network-target.self_link
network_url = google_compute_network.network-target.id
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions templates/terraform/examples/dns_policy_basic.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ resource "google_dns_policy" "<%= ctx[:primary_resource_id] %>" {
}

networks {
network_url = google_compute_network.network-1.self_link
network_url = google_compute_network.network-1.id
}
networks {
network_url = google_compute_network.network-2.self_link
network_url = google_compute_network.network-2.id
}
}

Expand Down
2 changes: 1 addition & 1 deletion templates/terraform/examples/forwarding_rule_basic.tf.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "google_compute_forwarding_rule" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['forwarding_rule_name'] %>"
target = google_compute_target_pool.default.self_link
target = google_compute_target_pool.default.id
port_range = "80"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ resource "google_compute_forwarding_rule" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['forwarding_rule_name'] %>"
region = "us-central1"
load_balancing_scheme = "INTERNAL"
backend_service = "${google_compute_region_backend_service.backend.self_link}"
backend_service = google_compute_region_backend_service.backend.id
all_ports = true
allow_global_access = true
network = "${google_compute_network.default.name}"
subnetwork = "${google_compute_subnetwork.default.name}"
network = google_compute_network.default.name
subnetwork = google_compute_subnetwork.default.name
}
resource "google_compute_region_backend_service" "backend" {
name = "<%= ctx[:vars]['backend_name'] %>"
region = "us-central1"
health_checks = ["${google_compute_health_check.hc.self_link}"]
health_checks = [google_compute_health_check.hc.id]
}
resource "google_compute_health_check" "hc" {
name = "check-<%= ctx[:vars]['backend_name'] %>"
Expand All @@ -30,5 +30,5 @@ resource "google_compute_subnetwork" "default" {
name = "<%= ctx[:vars]['network_name'] %>"
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
network = "${google_compute_network.default.self_link}"
}
network = google_compute_network.default.id
}
28 changes: 14 additions & 14 deletions templates/terraform/examples/forwarding_rule_http_lb.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ resource "google_compute_forwarding_rule" "<%= ctx[:primary_resource_id] %>" {
ip_protocol = "TCP"
load_balancing_scheme = "INTERNAL_MANAGED"
port_range = "80"
target = google_compute_region_target_http_proxy.default.self_link
network = google_compute_network.default.self_link
subnetwork = google_compute_subnetwork.default.self_link
target = google_compute_region_target_http_proxy.default.id
network = google_compute_network.default.id
subnetwork = google_compute_subnetwork.default.id
network_tier = "PREMIUM"
}

Expand All @@ -19,15 +19,15 @@ resource "google_compute_region_target_http_proxy" "default" {

region = "us-central1"
name = "<%= ctx[:vars]['region_target_http_proxy_name'] %>"
url_map = google_compute_region_url_map.default.self_link
url_map = google_compute_region_url_map.default.id
}

resource "google_compute_region_url_map" "default" {
provider = google-beta

region = "us-central1"
name = "<%= ctx[:vars]['region_url_map_name'] %>"
default_service = google_compute_region_backend_service.default.self_link
default_service = google_compute_region_backend_service.default.id
}

resource "google_compute_region_backend_service" "default" {
Expand All @@ -46,7 +46,7 @@ resource "google_compute_region_backend_service" "default" {
protocol = "HTTP"
timeout_sec = 10

health_checks = [google_compute_region_health_check.default.self_link]
health_checks = [google_compute_region_health_check.default.id]
}

data "google_compute_image" "debian_image" {
Expand All @@ -73,8 +73,8 @@ resource "google_compute_instance_template" "instance_template" {
machine_type = "n1-standard-1"

network_interface {
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
}

disk {
Expand All @@ -100,7 +100,7 @@ resource "google_compute_region_health_check" "default" {
resource "google_compute_firewall" "fw1" {
provider = google-beta
name = "<%= ctx[:vars]['fw_name'] %>-1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
source_ranges = ["10.1.2.0/24"]
allow {
protocol = "tcp"
Expand All @@ -118,7 +118,7 @@ resource "google_compute_firewall" "fw2" {
depends_on = [google_compute_firewall.fw1]
provider = google-beta
name = "<%= ctx[:vars]['fw_name'] %>-2"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
source_ranges = ["0.0.0.0/0"]
allow {
protocol = "tcp"
Expand All @@ -132,7 +132,7 @@ resource "google_compute_firewall" "fw3" {
depends_on = [google_compute_firewall.fw2]
provider = google-beta
name = "<%= ctx[:vars]['fw_name'] %>-3"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
source_ranges = ["130.211.0.0/22", "35.191.0.0/16"]
allow {
protocol = "tcp"
Expand All @@ -145,7 +145,7 @@ resource "google_compute_firewall" "fw4" {
depends_on = [google_compute_firewall.fw3]
provider = google-beta
name = "<%= ctx[:vars]['fw_name'] %>-4"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
source_ranges = ["10.129.0.0/26"]
target_tags = ["load-balanced-backend"]
allow {
Expand Down Expand Up @@ -175,15 +175,15 @@ resource "google_compute_subnetwork" "default" {
name = "<%= ctx[:vars]['network_name'] %>-default"
ip_cidr_range = "10.1.2.0/24"
region = "us-central1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
}

resource "google_compute_subnetwork" "proxy" {
provider = google-beta
name = "<%= ctx[:vars]['network_name'] %>-proxy"
ip_cidr_range = "10.129.0.0/26"
region = "us-central1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
purpose = "INTERNAL_HTTPS_LOAD_BALANCER"
role = "ACTIVE"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "google_compute_forwarding_rule" "<%= ctx[:primary_resource_id] %>" {
region = "us-central1"

load_balancing_scheme = "INTERNAL"
backend_service = google_compute_region_backend_service.backend.self_link
backend_service = google_compute_region_backend_service.backend.id
all_ports = true
network = google_compute_network.default.name
subnetwork = google_compute_subnetwork.default.name
Expand All @@ -13,7 +13,7 @@ resource "google_compute_forwarding_rule" "<%= ctx[:primary_resource_id] %>" {
resource "google_compute_region_backend_service" "backend" {
name = "<%= ctx[:vars]['backend_name'] %>"
region = "us-central1"
health_checks = [google_compute_health_check.hc.self_link]
health_checks = [google_compute_health_check.hc.id]
}

resource "google_compute_health_check" "hc" {
Expand All @@ -35,5 +35,5 @@ resource "google_compute_subnetwork" "default" {
name = "<%= ctx[:vars]['network_name'] %>"
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
}

0 comments on commit c4ff65c

Please sign in to comment.