mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-06 18:51:13 +00:00
website/docs: Run terraform fmt
on code examples (#12075)
* docs/vsphere: Fix code block * docs: Convert `...` to `# ...` to allow `terraform fmt`ing * docs: Trim trailing whitespace * docs: First-pass run of `terraform fmt` on code examples
This commit is contained in:
parent
fc78bd934d
commit
06fa75423e
@ -16,12 +16,15 @@ other Google Cloud Platform resources, such as the `google_project` resource.
|
||||
data "google_iam_policy" "admin" {
|
||||
binding {
|
||||
role = "roles/compute.instanceAdmin"
|
||||
|
||||
members = [
|
||||
"serviceAccount:your-custom-sa@your-project.iam.gserviceaccount.com",
|
||||
]
|
||||
}
|
||||
|
||||
binding {
|
||||
role = "roles/storage.objectViewer"
|
||||
|
||||
members = [
|
||||
"user:evanbrown@google.com",
|
||||
]
|
||||
|
@ -41,6 +41,7 @@ resource "google_compute_url_map" "default" {
|
||||
path_matcher {
|
||||
name = "allpaths"
|
||||
default_service = "${google_compute_backend_service.default.self_link}"
|
||||
|
||||
path_rule {
|
||||
paths = ["/*"]
|
||||
service = "${google_compute_backend_service.default.self_link}"
|
||||
|
@ -23,6 +23,7 @@ resource "google_compute_health_check" "default" {
|
||||
|
||||
timeout_sec = 1
|
||||
check_interval_sec = 1
|
||||
|
||||
tcp_health_check {
|
||||
port = "80"
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ tarball. For more information see [the official documentation](https://cloud.goo
|
||||
```js
|
||||
resource "google_compute_image" "bootable-image" {
|
||||
name = "my-custom-image"
|
||||
|
||||
raw_disk {
|
||||
source = "https://storage.googleapis.com/my-bucket/my-disk-image-tarball.tar.gz"
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ resource "google_compute_instance" "default" {
|
||||
|
||||
network_interface {
|
||||
network = "default"
|
||||
|
||||
access_config {
|
||||
// Ephemeral IP
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ resource "google_compute_instance_group" "webservers" {
|
||||
|
||||
instances = [
|
||||
"${google_compute_instance.test.self_link}",
|
||||
"${google_compute_instance.test2.self_link}"
|
||||
"${google_compute_instance.test2.self_link}",
|
||||
]
|
||||
|
||||
named_port {
|
||||
|
@ -79,12 +79,12 @@ resource "google_compute_instance_template" "instance_template" {
|
||||
|
||||
// boot disk
|
||||
disk {
|
||||
...
|
||||
# ...
|
||||
}
|
||||
|
||||
// networking
|
||||
network_interface {
|
||||
...
|
||||
# ...
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
|
@ -12,12 +12,12 @@ Manages metadata common to all instances for a project in GCE.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```js
|
||||
```
|
||||
resource "google_compute_project_metadata" "default" {
|
||||
metadata {
|
||||
foo = "bar"
|
||||
fizz = "buzz"
|
||||
13 = "42"
|
||||
"13" = "42"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -57,6 +57,7 @@ resource "google_compute_health_check" "default" {
|
||||
check_interval_sec = 1
|
||||
timeout_sec = 1
|
||||
type = "TCP"
|
||||
|
||||
tcp_health_check {
|
||||
port = "80"
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ resource "google_container_cluster" "primary" {
|
||||
|
||||
additional_zones = [
|
||||
"us-central1-b",
|
||||
"us-central1-c"
|
||||
"us-central1-c",
|
||||
]
|
||||
|
||||
master_auth {
|
||||
@ -35,7 +35,7 @@ resource "google_container_cluster" "primary" {
|
||||
"https://www.googleapis.com/auth/compute",
|
||||
"https://www.googleapis.com/auth/devstorage.read_only",
|
||||
"https://www.googleapis.com/auth/logging.write",
|
||||
"https://www.googleapis.com/auth/monitoring"
|
||||
"https://www.googleapis.com/auth/monitoring",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,10 @@ resource "google_compute_instance" "frontend" {
|
||||
|
||||
network_interface {
|
||||
network = "default"
|
||||
access_config {}
|
||||
access_config = {}
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_dns_managed_zone" "prod" {
|
||||
name = "prod-zone"
|
||||
dns_name = "prod.mydomain.com."
|
||||
|
@ -22,6 +22,7 @@ resource "google_project_iam_policy" "project" {
|
||||
data "google_iam_policy" "admin" {
|
||||
binding {
|
||||
role = "roles/editor"
|
||||
|
||||
members = [
|
||||
"user:jane@example.com",
|
||||
]
|
||||
|
@ -29,6 +29,7 @@ resource "google_project" "my_project" {
|
||||
data "google_iam_policy" "admin" {
|
||||
binding {
|
||||
role = "roles/storage.objectViewer"
|
||||
|
||||
members = [
|
||||
"serviceAccount:${google_service_account.object_viewer.email}",
|
||||
]
|
||||
|
@ -24,6 +24,7 @@ resource "google_pubsub_subscription" "default" {
|
||||
|
||||
push_config {
|
||||
endpoint = "https://example.com/push"
|
||||
|
||||
attributes {
|
||||
x-goog-version = "v1"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user