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:
George Christou 2017-02-18 22:48:50 +00:00 committed by Paul Stack
parent fc78bd934d
commit 06fa75423e
24 changed files with 75 additions and 63 deletions

View File

@ -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",
]

View File

@ -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}"

View File

@ -23,6 +23,7 @@ resource "google_compute_health_check" "default" {
timeout_sec = 1
check_interval_sec = 1
tcp_health_check {
port = "80"
}

View File

@ -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"
}

View File

@ -36,6 +36,7 @@ resource "google_compute_instance" "default" {
network_interface {
network = "default"
access_config {
// Ephemeral IP
}

View File

@ -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 {

View File

@ -79,12 +79,12 @@ resource "google_compute_instance_template" "instance_template" {
// boot disk
disk {
...
# ...
}
// networking
network_interface {
...
# ...
}
lifecycle {

View File

@ -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"
}
}
```

View File

@ -57,6 +57,7 @@ resource "google_compute_health_check" "default" {
check_interval_sec = 1
timeout_sec = 1
type = "TCP"
tcp_health_check {
port = "80"
}

View File

@ -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",
]
}
}

View File

@ -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."

View File

@ -22,6 +22,7 @@ resource "google_project_iam_policy" "project" {
data "google_iam_policy" "admin" {
binding {
role = "roles/editor"
members = [
"user:jane@example.com",
]

View File

@ -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}",
]

View File

@ -24,6 +24,7 @@ resource "google_pubsub_subscription" "default" {
push_config {
endpoint = "https://example.com/push"
attributes {
x-goog-version = "v1"
}