Skip to content

Commit

Permalink
fixed ids for #5542 (#3205) (#5915)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Mar 18, 2020
1 parent cfb63ee commit 1d84144
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .changelog/3205.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
6 changes: 3 additions & 3 deletions google/resource_compute_address_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ resource "google_compute_subnetwork" "default" {
name = "tf-test-my-subnet%{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
}
resource "google_compute_address" "internal_with_subnet_and_address" {
name = "tf-test-my-internal-address%{random_suffix}"
subnetwork = google_compute_subnetwork.default.self_link
subnetwork = google_compute_subnetwork.default.id
address_type = "INTERNAL"
address = "10.0.42.42"
region = "us-central1"
Expand Down Expand Up @@ -179,7 +179,7 @@ resource "google_compute_instance" "instance_with_ip" {
boot_disk {
initialize_params {
image = data.google_compute_image.debian_image.self_link
image = data.google_compute_image.debian_image.id
}
}
Expand Down
8 changes: 4 additions & 4 deletions google/resource_compute_autoscaler_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func testAccComputeAutoscaler_autoscalerBasicExample(context map[string]interfac
resource "google_compute_autoscaler" "foobar" {
name = "tf-test-my-autoscaler%{random_suffix}"
zone = "us-central1-f"
target = google_compute_instance_group_manager.foobar.self_link
target = google_compute_instance_group_manager.foobar.id
autoscaling_policy {
max_replicas = 5
Expand All @@ -74,7 +74,7 @@ resource "google_compute_instance_template" "foobar" {
tags = ["foo", "bar"]
disk {
source_image = data.google_compute_image.debian_9.self_link
source_image = data.google_compute_image.debian_9.id
}
network_interface {
Expand All @@ -99,11 +99,11 @@ resource "google_compute_instance_group_manager" "foobar" {
zone = "us-central1-f"
version {
instance_template = google_compute_instance_template.foobar.self_link
instance_template = google_compute_instance_template.foobar.id
name = "primary"
}
target_pools = [google_compute_target_pool.foobar.self_link]
target_pools = [google_compute_target_pool.foobar.id]
base_instance_name = "foobar"
}
Expand Down
8 changes: 4 additions & 4 deletions google/resource_compute_region_autoscaler_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func testAccComputeRegionAutoscaler_regionAutoscalerBasicExample(context map[str
resource "google_compute_region_autoscaler" "foobar" {
name = "tf-test-my-region-autoscaler%{random_suffix}"
region = "us-central1"
target = google_compute_region_instance_group_manager.foobar.self_link
target = google_compute_region_instance_group_manager.foobar.id
autoscaling_policy {
max_replicas = 5
Expand All @@ -74,7 +74,7 @@ resource "google_compute_instance_template" "foobar" {
tags = ["foo", "bar"]
disk {
source_image = data.google_compute_image.debian_9.self_link
source_image = data.google_compute_image.debian_9.id
}
network_interface {
Expand All @@ -99,11 +99,11 @@ resource "google_compute_region_instance_group_manager" "foobar" {
region = "us-central1"
version {
instance_template = google_compute_instance_template.foobar.self_link
instance_template = google_compute_instance_template.foobar.id
name = "primary"
}
target_pools = [google_compute_target_pool.foobar.self_link]
target_pools = [google_compute_target_pool.foobar.id]
base_instance_name = "foobar"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ In addition to the arguments listed above, the following attributes are exported

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

* `id` - an identifier for the resource with format `projects/{{project}}/global/backendServices/{{name}}`

* `port_name` - The name of a service that has been added to an instance group in this backend.

* `protocol` - The protocol for incoming requests.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/binary_authorization_attestor.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ resource "google_binary_authorization_attestor" "attestor" {
}
data "google_kms_crypto_key_version" "version" {
crypto_key = google_kms_crypto_key.crypto-key.self_link
crypto_key = google_kms_crypto_key.crypto-key.id
}
resource "google_container_analysis_note" "note" {
Expand All @@ -109,7 +109,7 @@ resource "google_container_analysis_note" "note" {
resource "google_kms_crypto_key" "crypto-key" {
name = "test-attestor-key"
key_ring = google_kms_key_ring.keyring.self_link
key_ring = google_kms_key_ring.keyring.id
purpose = "ASYMMETRIC_SIGN"
version_template {
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/cloudfunctions_function.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ The `source_repository` block supports:
In addition to the arguments listed above, the following computed attributes are
exported:

* `id` - an identifier for the resource with format `{{name}}`

* `https_trigger_url` - URL which triggers function execution. Returned only if `trigger_http` is used.

* `source_repository.0.deployed_url` - The URL pointing to the hosted repository where the function was defined at the time of deployment.
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/cloudiot_registry.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ The `public_key_certificate` block supports:

## Attributes Reference

Only the arguments listed above are exposed as attributes.
In addition to the arguments listed above, the following computed attributes are exported:

* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{region}}/registries/{{name}}`

## Import

Expand Down
12 changes: 7 additions & 5 deletions website/docs/r/composer_environment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ on the IAM policy binding (see `google_project_iam_member` below).

```hcl
resource "google_composer_environment" "test" {
name = "%s"
name = "mycomposer"
region = "us-central1"
config {
node_count = 4
Expand All @@ -59,8 +59,8 @@ resource "google_composer_environment" "test" {
zone = "us-central1-a"
machine_type = "n1-standard-1"
network = google_compute_network.test.self_link
subnetwork = google_compute_subnetwork.test.self_link
network = google_compute_network.test.id
subnetwork = google_compute_subnetwork.test.id
service_account = google_service_account.test.name
}
Expand All @@ -78,7 +78,7 @@ resource "google_compute_subnetwork" "test" {
name = "composer-test-subnetwork"
ip_cidr_range = "10.2.0.0/16"
region = "us-central1"
network = google_compute_network.test.self_link
network = google_compute_network.test.id
}
resource "google_service_account" "test" {
Expand All @@ -95,7 +95,7 @@ resource "google_project_iam_member" "composer-worker" {
### With Software (Airflow) Config
```hcl
resource "google_composer_environment" "test" {
name = "%s"
name = "mycomposer"
region = "us-central1"
config {
Expand Down Expand Up @@ -345,6 +345,8 @@ The `ip_allocation_policy` block supports:

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

* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{region}}/environments/{{name}}`

* `config.0.gke_cluster` -
The Kubernetes Engine cluster used to run this environment.

Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/compute_address.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ resource "google_compute_subnetwork" "default" {
name = "my-subnet"
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
}
resource "google_compute_address" "internal_with_subnet_and_address" {
name = "my-internal-address"
subnetwork = google_compute_subnetwork.default.self_link
subnetwork = google_compute_subnetwork.default.id
address_type = "INTERNAL"
address = "10.0.42.42"
region = "us-central1"
Expand Down Expand Up @@ -125,7 +125,7 @@ resource "google_compute_instance" "instance_with_ip" {
boot_disk {
initialize_params {
image = data.google_compute_image.debian_image.self_link
image = data.google_compute_image.debian_image.id
}
}
Expand Down
10 changes: 8 additions & 2 deletions website/docs/r/compute_attached_disk.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ To get more information about attaching disks, see:
## Example Usage
```hcl
resource "google_compute_attached_disk" "default" {
disk = google_compute_disk.default.self_link
instance = google_compute_instance.default.self_link
disk = google_compute_disk.default.id
instance = google_compute_instance.default.id
}
resource "google_compute_instance" "default" {
Expand Down Expand Up @@ -104,6 +104,12 @@ The following arguments are supported:
"READ_ONLY"
"READ_WRITE"

## Attributes Reference

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

* `id` - an identifier for the resource with format `projects/{{project}}/zones/{{zone}}/disks/{{disk.name}}`

## Timeouts

This resource provides the following
Expand Down
16 changes: 8 additions & 8 deletions website/docs/r/compute_autoscaler.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resource "google_compute_autoscaler" "default" {
name = "my-autoscaler"
zone = "us-central1-f"
target = google_compute_instance_group_manager.default.self_link
target = google_compute_instance_group_manager.default.id
autoscaling_policy {
max_replicas = 5
Expand All @@ -74,7 +74,7 @@ resource "google_compute_instance_template" "default" {
tags = ["foo", "bar"]
disk {
source_image = data.google_compute_image.debian_9.self_link
source_image = data.google_compute_image.debian_9.id
}
network_interface {
Expand Down Expand Up @@ -103,11 +103,11 @@ resource "google_compute_instance_group_manager" "default" {
zone = "us-central1-f"
version {
instance_template = google_compute_instance_template.default.self_link
instance_template = google_compute_instance_template.default.id
name = "primary"
}
target_pools = [google_compute_target_pool.default.self_link]
target_pools = [google_compute_target_pool.default.id]
base_instance_name = "autoscaler-sample"
}
Expand Down Expand Up @@ -135,7 +135,7 @@ provider "google-beta" {
resource "google_compute_autoscaler" "foobar" {
name = "my-autoscaler"
zone = "us-central1-f"
target = google_compute_instance_group_manager.foobar.self_link
target = google_compute_instance_group_manager.foobar.id
autoscaling_policy {
max_replicas = 5
Expand All @@ -156,7 +156,7 @@ resource "google_compute_instance_template" "foobar" {
tags = ["foo", "bar"]
disk {
source_image = data.google_compute_image.debian_9.self_link
source_image = data.google_compute_image.debian_9.id
}
network_interface {
Expand All @@ -181,11 +181,11 @@ resource "google_compute_instance_group_manager" "foobar" {
zone = "us-central1-f"
version {
instance_template = google_compute_instance_template.foobar.self_link
instance_template = google_compute_instance_template.foobar.id
name = "primary"
}
target_pools = [google_compute_target_pool.foobar.self_link]
target_pools = [google_compute_target_pool.foobar.id]
base_instance_name = "foobar"
}
Expand Down
8 changes: 4 additions & 4 deletions website/docs/r/compute_region_autoscaler.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To get more information about RegionAutoscaler, see:
resource "google_compute_region_autoscaler" "foobar" {
name = "my-region-autoscaler"
region = "us-central1"
target = google_compute_region_instance_group_manager.foobar.self_link
target = google_compute_region_instance_group_manager.foobar.id
autoscaling_policy {
max_replicas = 5
Expand All @@ -68,7 +68,7 @@ resource "google_compute_instance_template" "foobar" {
tags = ["foo", "bar"]
disk {
source_image = data.google_compute_image.debian_9.self_link
source_image = data.google_compute_image.debian_9.id
}
network_interface {
Expand All @@ -93,11 +93,11 @@ resource "google_compute_region_instance_group_manager" "foobar" {
region = "us-central1"
version {
instance_template = google_compute_instance_template.foobar.self_link
instance_template = google_compute_instance_template.foobar.id
name = "primary"
}
target_pools = [google_compute_target_pool.foobar.self_link]
target_pools = [google_compute_target_pool.foobar.id]
base_instance_name = "foobar"
}
Expand Down

0 comments on commit 1d84144

Please sign in to comment.