Skip to content

Commit 3c4356c

Browse files
modular-magicianedwardemilymye
authored
fixed ids for #5542 (#3205) (#1864)
* fixed ids for #5542 * fixed ids for #5542 and replacing self_links * fixed ids for #5542 * Update datasource_google_compute_backend_service.html.markdown (forcing update to build) * Updated id value Co-authored-by: edward <[email protected]> Co-authored-by: emily <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: edward <[email protected]> Co-authored-by: emily <[email protected]>
1 parent 3fbf18c commit 3c4356c

13 files changed

+57
-40
lines changed

.changelog/3205.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/resource_compute_address_generated_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ resource "google_compute_subnetwork" "default" {
9090
name = "tf-test-my-subnet%{random_suffix}"
9191
ip_cidr_range = "10.0.0.0/16"
9292
region = "us-central1"
93-
network = google_compute_network.default.self_link
93+
network = google_compute_network.default.id
9494
}
9595
9696
resource "google_compute_address" "internal_with_subnet_and_address" {
9797
name = "tf-test-my-internal-address%{random_suffix}"
98-
subnetwork = google_compute_subnetwork.default.self_link
98+
subnetwork = google_compute_subnetwork.default.id
9999
address_type = "INTERNAL"
100100
address = "10.0.42.42"
101101
region = "us-central1"
@@ -179,7 +179,7 @@ resource "google_compute_instance" "instance_with_ip" {
179179
180180
boot_disk {
181181
initialize_params {
182-
image = data.google_compute_image.debian_image.self_link
182+
image = data.google_compute_image.debian_image.id
183183
}
184184
}
185185

google-beta/resource_compute_autoscaler_generated_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ resource "google_compute_autoscaler" "default" {
5050
5151
name = "tf-test-my-autoscaler%{random_suffix}"
5252
zone = "us-central1-f"
53-
target = google_compute_instance_group_manager.default.self_link
53+
target = google_compute_instance_group_manager.default.id
5454
5555
autoscaling_policy {
5656
max_replicas = 5
@@ -75,7 +75,7 @@ resource "google_compute_instance_template" "default" {
7575
tags = ["foo", "bar"]
7676
7777
disk {
78-
source_image = data.google_compute_image.debian_9.self_link
78+
source_image = data.google_compute_image.debian_9.id
7979
}
8080
8181
network_interface {
@@ -104,11 +104,11 @@ resource "google_compute_instance_group_manager" "default" {
104104
zone = "us-central1-f"
105105
106106
version {
107-
instance_template = google_compute_instance_template.default.self_link
107+
instance_template = google_compute_instance_template.default.id
108108
name = "primary"
109109
}
110110
111-
target_pools = [google_compute_target_pool.default.self_link]
111+
target_pools = [google_compute_target_pool.default.id]
112112
base_instance_name = "autoscaler-sample"
113113
}
114114
@@ -155,7 +155,7 @@ func testAccComputeAutoscaler_autoscalerBasicExample(context map[string]interfac
155155
resource "google_compute_autoscaler" "foobar" {
156156
name = "tf-test-my-autoscaler%{random_suffix}"
157157
zone = "us-central1-f"
158-
target = google_compute_instance_group_manager.foobar.self_link
158+
target = google_compute_instance_group_manager.foobar.id
159159
160160
autoscaling_policy {
161161
max_replicas = 5
@@ -176,7 +176,7 @@ resource "google_compute_instance_template" "foobar" {
176176
tags = ["foo", "bar"]
177177
178178
disk {
179-
source_image = data.google_compute_image.debian_9.self_link
179+
source_image = data.google_compute_image.debian_9.id
180180
}
181181
182182
network_interface {
@@ -201,11 +201,11 @@ resource "google_compute_instance_group_manager" "foobar" {
201201
zone = "us-central1-f"
202202
203203
version {
204-
instance_template = google_compute_instance_template.foobar.self_link
204+
instance_template = google_compute_instance_template.foobar.id
205205
name = "primary"
206206
}
207207
208-
target_pools = [google_compute_target_pool.foobar.self_link]
208+
target_pools = [google_compute_target_pool.foobar.id]
209209
base_instance_name = "foobar"
210210
}
211211

google-beta/resource_compute_region_autoscaler_generated_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func testAccComputeRegionAutoscaler_regionAutoscalerBasicExample(context map[str
5353
resource "google_compute_region_autoscaler" "foobar" {
5454
name = "tf-test-my-region-autoscaler%{random_suffix}"
5555
region = "us-central1"
56-
target = google_compute_region_instance_group_manager.foobar.self_link
56+
target = google_compute_region_instance_group_manager.foobar.id
5757
5858
autoscaling_policy {
5959
max_replicas = 5
@@ -74,7 +74,7 @@ resource "google_compute_instance_template" "foobar" {
7474
tags = ["foo", "bar"]
7575
7676
disk {
77-
source_image = data.google_compute_image.debian_9.self_link
77+
source_image = data.google_compute_image.debian_9.id
7878
}
7979
8080
network_interface {
@@ -99,11 +99,11 @@ resource "google_compute_region_instance_group_manager" "foobar" {
9999
region = "us-central1"
100100
101101
version {
102-
instance_template = google_compute_instance_template.foobar.self_link
102+
instance_template = google_compute_instance_template.foobar.id
103103
name = "primary"
104104
}
105105
106-
target_pools = [google_compute_target_pool.foobar.self_link]
106+
target_pools = [google_compute_target_pool.foobar.id]
107107
base_instance_name = "foobar"
108108
}
109109

website/docs/d/datasource_google_compute_backend_service.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ In addition to the arguments listed above, the following attributes are exported
4848

4949
* `fingerprint` - The fingerprint of the Backend Service.
5050

51+
* `id` - an identifier for the resource with format `projects/{{project}}/global/backendServices/{{name}}`
52+
5153
* `port_name` - The name of a service that has been added to an instance group in this backend.
5254

5355
* `protocol` - The protocol for incoming requests.

website/docs/r/binary_authorization_attestor.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ resource "google_binary_authorization_attestor" "attestor" {
9595
}
9696
9797
data "google_kms_crypto_key_version" "version" {
98-
crypto_key = google_kms_crypto_key.crypto-key.self_link
98+
crypto_key = google_kms_crypto_key.crypto-key.id
9999
}
100100
101101
resource "google_container_analysis_note" "note" {
@@ -109,7 +109,7 @@ resource "google_container_analysis_note" "note" {
109109
110110
resource "google_kms_crypto_key" "crypto-key" {
111111
name = "test-attestor-key"
112-
key_ring = google_kms_key_ring.keyring.self_link
112+
key_ring = google_kms_key_ring.keyring.id
113113
purpose = "ASYMMETRIC_SIGN"
114114
115115
version_template {

website/docs/r/cloudfunctions_function.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ The `source_repository` block supports:
168168
In addition to the arguments listed above, the following computed attributes are
169169
exported:
170170

171+
* `id` - an identifier for the resource with format `{{name}}`
172+
171173
* `https_trigger_url` - URL which triggers function execution. Returned only if `trigger_http` is used.
172174

173175
* `source_repository.0.deployed_url` - The URL pointing to the hosted repository where the function was defined at the time of deployment.

website/docs/r/cloudiot_registry.html.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ The `public_key_certificate` block supports:
110110

111111
## Attributes Reference
112112

113-
Only the arguments listed above are exposed as attributes.
113+
In addition to the arguments listed above, the following computed attributes are exported:
114+
115+
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{region}}/registries/{{name}}`
114116

115117
## Import
116118

website/docs/r/composer_environment.html.markdown

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ on the IAM policy binding (see `google_project_iam_member` below).
5050

5151
```hcl
5252
resource "google_composer_environment" "test" {
53-
name = "%s"
53+
name = "mycomposer"
5454
region = "us-central1"
5555
config {
5656
node_count = 4
@@ -59,8 +59,8 @@ resource "google_composer_environment" "test" {
5959
zone = "us-central1-a"
6060
machine_type = "n1-standard-1"
6161
62-
network = google_compute_network.test.self_link
63-
subnetwork = google_compute_subnetwork.test.self_link
62+
network = google_compute_network.test.id
63+
subnetwork = google_compute_subnetwork.test.id
6464
6565
service_account = google_service_account.test.name
6666
}
@@ -78,7 +78,7 @@ resource "google_compute_subnetwork" "test" {
7878
name = "composer-test-subnetwork"
7979
ip_cidr_range = "10.2.0.0/16"
8080
region = "us-central1"
81-
network = google_compute_network.test.self_link
81+
network = google_compute_network.test.id
8282
}
8383
8484
resource "google_service_account" "test" {
@@ -95,7 +95,7 @@ resource "google_project_iam_member" "composer-worker" {
9595
### With Software (Airflow) Config
9696
```hcl
9797
resource "google_composer_environment" "test" {
98-
name = "%s"
98+
name = "mycomposer"
9999
region = "us-central1"
100100
101101
config {
@@ -345,6 +345,8 @@ The `ip_allocation_policy` block supports:
345345

346346
In addition to the arguments listed above, the following computed attributes are exported:
347347

348+
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{region}}/environments/{{name}}`
349+
348350
* `config.0.gke_cluster` -
349351
The Kubernetes Engine cluster used to run this environment.
350352

website/docs/r/compute_address.html.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ resource "google_compute_subnetwork" "default" {
7474
name = "my-subnet"
7575
ip_cidr_range = "10.0.0.0/16"
7676
region = "us-central1"
77-
network = google_compute_network.default.self_link
77+
network = google_compute_network.default.id
7878
}
7979
8080
resource "google_compute_address" "internal_with_subnet_and_address" {
8181
name = "my-internal-address"
82-
subnetwork = google_compute_subnetwork.default.self_link
82+
subnetwork = google_compute_subnetwork.default.id
8383
address_type = "INTERNAL"
8484
address = "10.0.42.42"
8585
region = "us-central1"
@@ -125,7 +125,7 @@ resource "google_compute_instance" "instance_with_ip" {
125125
126126
boot_disk {
127127
initialize_params {
128-
image = data.google_compute_image.debian_image.self_link
128+
image = data.google_compute_image.debian_image.id
129129
}
130130
}
131131

0 commit comments

Comments
 (0)