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

add id and replace self_link in docs (part 5 of #5542) #3535

Merged
merged 18 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9d0e9ed
add ids to docs #5
May 18, 2020
7fbb7f5
Update third_party/terraform/website/docs/r/google_kms_key_ring_iam.h…
edwardmedia May 19, 2020
6f5d1ad
Update third_party/terraform/website/docs/r/google_kms_key_ring_iam.h…
edwardmedia May 19, 2020
3b03e3b
Update third_party/terraform/website/docs/r/google_kms_key_ring_iam.h…
edwardmedia May 19, 2020
1f28ae2
Update third_party/terraform/website/docs/r/google_project_iam.html.m…
edwardmedia May 19, 2020
9bf99b9
Update third_party/terraform/website/docs/r/google_project_service.ht…
edwardmedia May 19, 2020
6e2faf6
Update google_kms_crypto_key_iam.html.markdown
edwardmedia May 20, 2020
e391dbf
Update google_kms_key_ring_iam.html.markdown
edwardmedia May 20, 2020
0c1906b
Update google_project_iam.html.markdown
edwardmedia May 20, 2020
da1c0ed
Update google_service_account_iam.html.markdown
edwardmedia May 20, 2020
89c25f4
Update google_organization_iam_audit_config.html.markdown
edwardmedia May 20, 2020
7afd836
Update google_kms_crypto_key_iam.html.markdown
edwardmedia May 20, 2020
3756f63
Update google_organization_iam_member.html.markdown
edwardmedia May 20, 2020
b50e81a
Update google_organization_iam_audit_config.html.markdown
edwardmedia May 20, 2020
6ca6abf
Update google_organization_iam_binding.html.markdown
edwardmedia May 20, 2020
0cbe6fb
Update google_organization_iam_policy.html.markdown
edwardmedia May 20, 2020
5e12e47
Update google_organization_policy.html.markdown
edwardmedia May 20, 2020
445e2ad
Update google_project_organization_policy.html.markdown
edwardmedia May 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ resource "google_compute_instance_from_template" "tpl" {
name = "instance-from-template"
zone = "us-central1-a"

source_instance_template = google_compute_instance_template.tpl.self_link
source_instance_template = google_compute_instance_template.tpl.id

// Override fields from instance template
can_ip_forward = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "google_compute_instance_group" "test" {
name = "terraform-test"
description = "Terraform test instance group"
zone = "us-central1-a"
network = google_compute_network.default.self_link
network = google_compute_network.default.id
}
```

Expand All @@ -36,8 +36,8 @@ resource "google_compute_instance_group" "webservers" {
description = "Terraform test instance group"

instances = [
google_compute_instance.test.self_link,
google_compute_instance.test2.self_link,
google_compute_instance.test.id,
google_compute_instance.test2.id,
]

named_port {
Expand All @@ -63,7 +63,7 @@ as shown in this example to avoid this type of error.
resource "google_compute_instance_group" "staging_group" {
name = "staging-instance-group"
zone = "us-central1-c"
instances = [google_compute_instance.staging_vm.self_link]
instances = [google_compute_instance.staging_vm.id]
named_port {
name = "http"
port = "8080"
Expand Down Expand Up @@ -105,11 +105,11 @@ resource "google_compute_backend_service" "staging_service" {
protocol = "HTTPS"

backend {
group = google_compute_instance_group.staging_group.self_link
group = google_compute_instance_group.staging_group.id
}

health_checks = [
google_compute_https_health_check.staging_health.self_link,
google_compute_https_health_check.staging_health.id,
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ resource "google_compute_instance_group_manager" "appserver" {
zone = "us-central1-a"

version {
instance_template = google_compute_instance_template.appserver.self_link
instance_template = google_compute_instance_template.appserver.id
}

target_pools = [google_compute_target_pool.appserver.self_link]
target_pools = [google_compute_target_pool.appserver.id]
target_size = 2

named_port {
Expand All @@ -51,7 +51,7 @@ resource "google_compute_instance_group_manager" "appserver" {
}

auto_healing_policies {
health_check = google_compute_health_check.autohealing.self_link
health_check = google_compute_health_check.autohealing.id
initial_delay_sec = 300
}
}
Expand All @@ -70,12 +70,12 @@ resource "google_compute_instance_group_manager" "appserver" {

version {
name = "appserver"
instance_template = google_compute_instance_template.appserver.self_link
instance_template = google_compute_instance_template.appserver.id
}

version {
name = "appserver-canary"
instance_template = google_compute_instance_template.appserver-canary.self_link
instance_template = google_compute_instance_template.appserver-canary.id
target_size {
fixed = 1
}
Expand Down Expand Up @@ -183,7 +183,7 @@ The `version` block supports:
```hcl
version {
name = "appserver-canary"
instance_template = google_compute_instance_template.appserver-canary.self_link
instance_template = google_compute_instance_template.appserver-canary.id

target_size {
fixed = 1
Expand All @@ -194,7 +194,7 @@ version {
```hcl
version {
name = "appserver-canary"
instance_template = google_compute_instance_template.appserver-canary.self_link
instance_template = google_compute_instance_template.appserver-canary.id

target_size {
percent = 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ resource "google_compute_instance_template" "instance_template" {

resource "google_compute_instance_group_manager" "instance_group_manager" {
name = "instance-group-manager"
instance_template = google_compute_instance_template.instance_template.self_link
instance_template = google_compute_instance_template.instance_template.id
base_instance_name = "instance-group-manager"
zone = "us-central1-f"
target_size = "1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ to be functional.
```hcl
resource "google_compute_network_peering" "peering1" {
name = "peering1"
network = google_compute_network.default.self_link
peer_network = google_compute_network.other.self_link
network = google_compute_network.default.id
peer_network = google_compute_network.other.id
}

resource "google_compute_network_peering" "peering2" {
name = "peering2"
network = google_compute_network.other.self_link
peer_network = google_compute_network.default.self_link
network = google_compute_network.other.id
peer_network = google_compute_network.default.id
}

resource "google_compute_network" "default" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ resource "google_compute_region_instance_group_manager" "appserver" {
distribution_policy_zones = ["us-central1-a", "us-central1-f"]

version {
instance_template = google_compute_instance_template.appserver.self_link
instance_template = google_compute_instance_template.appserver.id
}

target_pools = [google_compute_target_pool.appserver.self_link]
target_pools = [google_compute_target_pool.appserver.id]
target_size = 2

named_port {
Expand All @@ -52,7 +52,7 @@ resource "google_compute_region_instance_group_manager" "appserver" {
}

auto_healing_policies {
health_check = google_compute_health_check.autohealing.self_link
health_check = google_compute_health_check.autohealing.id
initial_delay_sec = 300
}
}
Expand All @@ -69,11 +69,11 @@ resource "google_compute_region_instance_group_manager" "appserver" {
target_size = 5

version {
instance_template = google_compute_instance_template.appserver.self_link
instance_template = google_compute_instance_template.appserver.id
}

version {
instance_template = google_compute_instance_template.appserver-canary.self_link
instance_template = google_compute_instance_template.appserver-canary.id
target_size {
fixed = 1
}
Expand Down Expand Up @@ -188,7 +188,7 @@ The `version` block supports:
```hcl
version {
name = "appserver-canary"
instance_template = google_compute_instance_template.appserver-canary.self_link
instance_template = google_compute_instance_template.appserver-canary.id

target_size {
fixed = 1
Expand All @@ -199,7 +199,7 @@ version {
```hcl
version {
name = "appserver-canary"
instance_template = google_compute_instance_template.appserver-canary.self_link
instance_template = google_compute_instance_template.appserver-canary.id

target_size {
percent = 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ The following arguments are supported:

## 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 `{{project}}/{{zone}}/{{name}}/{{type}}`

## Import

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,4 @@ $ terraform import google_kms_crypto_key_iam_policy.crypto_key your-project-id/l
```

-> If you're importing a resource with beta features, make sure to include `-provider=google-beta`
as an argument so that Terraform uses the correct provider to import your resource.
as an argument so that Terraform uses the correct provider to import your resource.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ The following arguments are supported:
In addition to the arguments listed above, the following computed attributes are
exported:

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

* `number` - The numeric identifier of the project.

## Import
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,3 @@ terraform import google_project_iam_audit_config.my_project "your-project-id foo

-> **Custom Roles**: If you're importing a IAM resource with a custom role, make sure to use the
full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ If `false` or unset, an error will be generated if any enabled services depend o

* `disable_on_destroy` - (Optional) If true, disable the service when the terraform resource is destroyed. Defaults to true. May be useful in the event that a project is long-lived but the infrastructure running in that project changes frequently.

## Attributes Reference

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

* `id` - an identifier for the resource with format `{{project}}/{{service}}`

## Import

Project services can be imported using the `project_id` and `service`, e.g.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The following arguments are supported:
In addition to the arguments listed above, the following computed attributes are
exported:

* `id` - an identifier for the resource with format `projects/{{project}}/serviceAccounts/{{email}}`

* `email` - The e-mail address of the service account. This value
should be referenced from any `google_iam_policy` data sources
that would grant the service account privileges.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Valid values are listed at

The following attributes are exported in addition to the arguments listed above:

* `id` - an identifier for the resource with format `projects/{{project}}/serviceAccounts/{{account}}/keys/{{key}}`

* `name` - The name used for this key pair

* `public_key` - The public key, base64 encoded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ resource "google_compute_global_address" "private_ip_alloc" {
purpose = "VPC_PEERING"
address_type = "INTERNAL"
prefix_length = 16
network = google_compute_network.peering_network.self_link
network = google_compute_network.peering_network.id
}

resource "google_service_networking_connection" "foobar" {
network = google_compute_network.peering_network.self_link
network = google_compute_network.peering_network.id
service = "servicenetworking.googleapis.com"
reserved_peering_ranges = [google_compute_global_address.private_ip_alloc.name]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ resource "google_compute_global_address" "private_ip_address" {
purpose = "VPC_PEERING"
address_type = "INTERNAL"
prefix_length = 16
network = google_compute_network.private_network.self_link
network = google_compute_network.private_network.id
}

resource "google_service_networking_connection" "private_vpc_connection" {
provider = google-beta

network = google_compute_network.private_network.self_link
network = google_compute_network.private_network.id
service = "servicenetworking.googleapis.com"
reserved_peering_ranges = [google_compute_global_address.private_ip_address.name]
}
Expand All @@ -165,7 +165,7 @@ resource "google_sql_database_instance" "instance" {
tier = "db-f1-micro"
ip_configuration {
ipv4_enabled = false
private_network = google_compute_network.private_network.self_link
private_network = google_compute_network.private_network.id
}
}
}
Expand Down