diff --git a/cloud-operations/asset-inventory-feed-remediation/README.md b/cloud-operations/asset-inventory-feed-remediation/README.md
index 0668a62aaf..2a7e4c52d6 100644
--- a/cloud-operations/asset-inventory-feed-remediation/README.md
+++ b/cloud-operations/asset-inventory-feed-remediation/README.md
@@ -52,6 +52,7 @@ Run the `subscription_pull` command until it returns nothing, then run the follo
- the `tag_show` command to verify that the function output matches the resource state
+
## Variables
@@ -73,6 +74,6 @@ Run the `subscription_pull` command until it returns nothing, then run the follo
| tag_add | Instance add tag command. | |
| tag_show | Instance add tag command. | |
-
+
diff --git a/cloud-operations/dns-fine-grained-iam/README.md b/cloud-operations/dns-fine-grained-iam/README.md
index 3678113790..b9cdea9127 100644
--- a/cloud-operations/dns-fine-grained-iam/README.md
+++ b/cloud-operations/dns-fine-grained-iam/README.md
@@ -99,6 +99,7 @@ dig app1.svc.example.org +short
# 127.0.0.7
```
+
## Variables
@@ -118,5 +119,5 @@ dig app1.svc.example.org +short
| gcloud_commands | Commands used to SSH to the VMs. | |
| vms | VM names. | |
-
+
diff --git a/cloud-operations/dns-shared-vpc/README.md b/cloud-operations/dns-shared-vpc/README.md
index 267b39effa..899ddfba07 100644
--- a/cloud-operations/dns-shared-vpc/README.md
+++ b/cloud-operations/dns-shared-vpc/README.md
@@ -19,6 +19,7 @@ The resources created in this example are shown in the high level diagram below:
Note that Terraform 0.13 at least is required due to the use of `for_each` with modules.
+
## Variables
@@ -39,5 +40,5 @@ Note that Terraform 0.13 at least is required due to the use of `for_each` with
|---|---|:---:|
| teams | Team resources | |
-
+
diff --git a/cloud-operations/iam-delegated-role-grants/README.md b/cloud-operations/iam-delegated-role-grants/README.md
index f2dfd04c0b..2efd818df8 100644
--- a/cloud-operations/iam-delegated-role-grants/README.md
+++ b/cloud-operations/iam-delegated-role-grants/README.md
@@ -64,6 +64,7 @@ If you get any warnings, check the roles and remove any of them granting any of
- `resourcemanager.organizations.setIamPolicy`
+
## Variables
@@ -77,5 +78,5 @@ If you get any warnings, check the roles and remove any of them granting any of
| project_create | Create project instead of using an existing one. | bool
| | false
|
| restricted_role_grant | Role grant to which the restrictions will apply. | string
| | "roles/resourcemanager.projectIamAdmin"
|
-
+
diff --git a/cloud-operations/onprem-sa-key-management/README.md b/cloud-operations/onprem-sa-key-management/README.md
index c1939136c3..3c2d35b970 100644
--- a/cloud-operations/onprem-sa-key-management/README.md
+++ b/cloud-operations/onprem-sa-key-management/README.md
@@ -61,6 +61,7 @@ gcloud auth activate-service-account --key-file data-uploader.json
terraform destroy -var project_id=$GOOGLE_CLOUD_PROJECT
```
+
## Variables
@@ -78,5 +79,5 @@ terraform destroy -var project_id=$GOOGLE_CLOUD_PROJECT
|---|---|:---:|
| sa-credentials | SA json key templates. | |
-
+
diff --git a/cloud-operations/packer-image-builder/README.md b/cloud-operations/packer-image-builder/README.md
index 6339c72f63..a04e79af4b 100644
--- a/cloud-operations/packer-image-builder/README.md
+++ b/cloud-operations/packer-image-builder/README.md
@@ -67,6 +67,7 @@ The following example assumes that provisioning of a Compute Engine VM requires
the resources over the Internet (i.e. to install OS packages). Since Compute VM has no public IP
address for security reasons, Internet connectivity is done with [Cloud NAT](https://cloud.google.com/nat/docs/overview).
+
## Variables
@@ -93,5 +94,5 @@ address for security reasons, Internet connectivity is done with [Cloud NAT](htt
| compute_subnetwork | Name of a subnetwork for Packer's temporary VM. | |
| compute_zone | Name of a compute engine zone for Packer's temporary VM. | |
-
+
diff --git a/cloud-operations/quota-monitoring/README.md b/cloud-operations/quota-monitoring/README.md
index 47611aa690..2c9f2df793 100644
--- a/cloud-operations/quota-monitoring/README.md
+++ b/cloud-operations/quota-monitoring/README.md
@@ -23,6 +23,7 @@ Clone this repository or [open it in cloud shell](https://ssh.cloud.google.com/c
- `terraform init`
- `terraform apply -var project_id=my-project-id`
+
## Variables
@@ -37,6 +38,6 @@ Clone this repository or [open it in cloud shell](https://ssh.cloud.google.com/c
| region | Compute region used in the example. | string
| | "europe-west1"
|
| schedule_config | Schedule timer configuration in crontab format | string
| | "0 * * * *"
|
-
+
diff --git a/cloud-operations/scheduled-asset-inventory-export-bq/README.md b/cloud-operations/scheduled-asset-inventory-export-bq/README.md
index f1fabbe86b..56153ff828 100644
--- a/cloud-operations/scheduled-asset-inventory-export-bq/README.md
+++ b/cloud-operations/scheduled-asset-inventory-export-bq/README.md
@@ -52,6 +52,7 @@ This is an optional part, created if `cai_gcs_export` is set to `true`. The high
+
## Variables
@@ -79,6 +80,6 @@ This is an optional part, created if `cai_gcs_export` is set to `true`. The high
| bq-dataset | Bigquery instance details. | |
| cloud-function | Cloud Function instance details. | |
-
+
diff --git a/data-solutions/cmek-via-centralized-kms/README.md b/data-solutions/cmek-via-centralized-kms/README.md
index a476b70a8f..7c5af4fb84 100644
--- a/data-solutions/cmek-via-centralized-kms/README.md
+++ b/data-solutions/cmek-via-centralized-kms/README.md
@@ -30,6 +30,7 @@ This sample creates several distinct groups of resources:
- GCS
- One bucket encrypted with a CMEK Cryptokey hosted in Cloud KMS
+
## Variables
@@ -56,5 +57,5 @@ This sample creates several distinct groups of resources:
| vm | GCE VM. | |
| vm_keys | GCE VM Cloud KMS crypto keys. | |
-
+
diff --git a/data-solutions/data-platform-foundations/01-environment/README.md b/data-solutions/data-platform-foundations/01-environment/README.md
index d7bca97d3c..4add9b7c4d 100644
--- a/data-solutions/data-platform-foundations/01-environment/README.md
+++ b/data-solutions/data-platform-foundations/01-environment/README.md
@@ -47,6 +47,7 @@ gcloud access-context-manager perimeters list --format="json" | grep name
The script use 'google_access_context_manager_service_perimeter_resource' terraform resource. If this resource is used alongside the 'vpc-sc' module, remember to uncomment the lifecycle block in the 'vpc-sc' module so they don't fight over which resources should be in the perimeter.
+
## Variables
@@ -70,5 +71,5 @@ The script use 'google_access_context_manager_service_perimeter_resource' terraf
| service_account | Main service account. | |
| service_encryption_key_ids | Cloud KMS encryption keys in {LOCATION => [KEY_URL]} format. | |
-
+
diff --git a/data-solutions/data-platform-foundations/02-resources/README.md b/data-solutions/data-platform-foundations/02-resources/README.md
index e34cdef47c..e340fcd537 100644
--- a/data-solutions/data-platform-foundations/02-resources/README.md
+++ b/data-solutions/data-platform-foundations/02-resources/README.md
@@ -51,6 +51,7 @@ Once done testing, you can clean up resources by running `terraform destroy`.
### CMEK configuration
You can configure GCP resources to use existing CMEK keys configuring the 'service_encryption_key_ids' variable. You need to specify a 'global' and a 'multiregional' key.
+
## Variables
@@ -81,5 +82,5 @@ You can configure GCP resources to use existing CMEK keys configuring the 'servi
| transformation-buckets | List of buckets created for the transformation project. | |
| transformation-vpc | Transformation VPC details | |
-
+
diff --git a/data-solutions/gcs-to-bq-with-dataflow/README.md b/data-solutions/gcs-to-bq-with-dataflow/README.md
index 5ab92d73b5..9d214e2029 100644
--- a/data-solutions/gcs-to-bq-with-dataflow/README.md
+++ b/data-solutions/gcs-to-bq-with-dataflow/README.md
@@ -110,6 +110,7 @@ schema_bq_import.json
You can check data imported into Google BigQuery from the Google Cloud Console UI.
+
## Variables
@@ -136,5 +137,5 @@ You can check data imported into Google BigQuery from the Google Cloud Console U
| projects | Project ids. | |
| vm | GCE VM. | |
-
+
diff --git a/factories/firewall-hierarchical-policies/README.md b/factories/firewall-hierarchical-policies/README.md
index cf7cee3087..1590e9b84e 100644
--- a/factories/firewall-hierarchical-policies/README.md
+++ b/factories/firewall-hierarchical-policies/README.md
@@ -148,6 +148,7 @@ web_frontends:
- web-frontends@project-wf2.iam.gserviceaccount.com
```
+
## Variables
@@ -163,5 +164,5 @@ web_frontends:
|---|---|:---:|
| hierarchical-firewall-rules | Generated Hierarchical Firewall Rules | |
-
+
diff --git a/factories/firewall-vpc-rules/flat/README.md b/factories/firewall-vpc-rules/flat/README.md
index 96f3bc4152..6baa58627f 100644
--- a/factories/firewall-vpc-rules/flat/README.md
+++ b/factories/firewall-vpc-rules/flat/README.md
@@ -135,6 +135,7 @@ web-app-a-ingress:
- web-app-a@myproject-id.iam.gserviceaccount.com
```
+
## Variables
@@ -155,5 +156,5 @@ web-app-a-ingress:
| ingress_allow_rules | Ingress rules with allow blocks. | |
| ingress_deny_rules | Ingress rules with deny blocks. | |
-
+
diff --git a/factories/firewall-vpc-rules/nested/README.md b/factories/firewall-vpc-rules/nested/README.md
index 35bdf4183b..ae6be49412 100644
--- a/factories/firewall-vpc-rules/nested/README.md
+++ b/factories/firewall-vpc-rules/nested/README.md
@@ -124,6 +124,7 @@ web_frontends:
- web-frontends@project-wf2.iam.gserviceaccount.com
```
+
## Variables
@@ -139,5 +140,5 @@ web_frontends:
|---|---|:---:|
| vpc-firewall-rules | Generated VPC Firewall Rules | |
-
+
diff --git a/factories/subnets/README.md b/factories/subnets/README.md
index 0c9a54e012..5b92263274 100644
--- a/factories/subnets/README.md
+++ b/factories/subnets/README.md
@@ -52,6 +52,7 @@ secondary_ip_ranges: # Opt- List of secondary IP ranges
# Secondary ranges in name: cidr format
```
+
## Variables
@@ -66,5 +67,5 @@ secondary_ip_ranges: # Opt- List of secondary IP ranges
|---|---|:---:|
| subnet | Generated subnets | |
-
+
diff --git a/foundations/business-units/README.md b/foundations/business-units/README.md
index 12d0fa75f2..4664e6d57f 100644
--- a/foundations/business-units/README.md
+++ b/foundations/business-units/README.md
@@ -25,6 +25,7 @@ The number of resources in this sample is kept to a minimum so as to make it gen
This sample uses a top-level folder to encapsulate projects that host resources that are not specific to a single environment. If no shared services are needed,the Terraform and audit modules can be easily attached to the root node, and the shared services folder and project removed from `main.tf`.
+
## Variables
@@ -57,5 +58,5 @@ This sample uses a top-level folder to encapsulate projects that host resources
| shared_resources_project | Project that holdes resources shared across business units. | |
| terraform_project | Project that holds the base Terraform resources. | |
-
+
diff --git a/foundations/environments/README.md b/foundations/environments/README.md
index 67b41f0f63..b20e9c05a2 100644
--- a/foundations/environments/README.md
+++ b/foundations/environments/README.md
@@ -27,6 +27,7 @@ For more complex setups where multiple shared services projects are needed to en
If no shared services are needed, the shared service project module can of course be removed from `main.tf`.
+
## Variables
@@ -63,5 +64,5 @@ If no shared services are needed, the shared service project module can of cours
| shared_services_project | Project that holdes resources shared across environments. | |
| terraform_project | Project that holds the base Terraform resources. | |
-
+
diff --git a/modules/__experimental/net-neg/README.md b/modules/__experimental/net-neg/README.md
index 8915c3440a..8357296c29 100644
--- a/modules/__experimental/net-neg/README.md
+++ b/modules/__experimental/net-neg/README.md
@@ -24,6 +24,7 @@ module "neg" {
}
```
+
## Variables
@@ -45,5 +46,5 @@ module "neg" {
| self_lnk | Network endpoint group self link | |
| size | Size of the network endpoint group | |
-
+
diff --git a/modules/apigee-organization/README.md b/modules/apigee-organization/README.md
index d2325e2fc3..33933efb4e 100644
--- a/modules/apigee-organization/README.md
+++ b/modules/apigee-organization/README.md
@@ -99,6 +99,7 @@ module "apigee-organization" {
# tftest:modules=1:resources=6
```
+
## Variables
@@ -125,5 +126,5 @@ module "apigee-organization" {
| org_id | Apigee Organization ID. | |
| subscription_type | Apigee subscription type. | |
-
+
diff --git a/modules/apigee-x-instance/README.md b/modules/apigee-x-instance/README.md
index d63dcfaf30..eab58179bd 100644
--- a/modules/apigee-x-instance/README.md
+++ b/modules/apigee-x-instance/README.md
@@ -43,6 +43,7 @@ module "apigee-x-instance" {
# tftest:modules=1:resources=5
```
+
## Variables
@@ -66,5 +67,5 @@ module "apigee-x-instance" {
| instance | Apigee instance. | |
| port | Port number of the internal endpoint of the Apigee instance. | |
-
+
diff --git a/modules/artifact-registry/README.md b/modules/artifact-registry/README.md
index 507a6e8ebb..051d858ef5 100644
--- a/modules/artifact-registry/README.md
+++ b/modules/artifact-registry/README.md
@@ -20,6 +20,7 @@ module "docker_artifact_registry" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -41,5 +42,5 @@ module "docker_artifact_registry" {
| id | Repository id | |
| name | Repository name | |
-
+
diff --git a/modules/bigquery-dataset/README.md b/modules/bigquery-dataset/README.md
index e9ff2d5c89..1919dd5571 100644
--- a/modules/bigquery-dataset/README.md
+++ b/modules/bigquery-dataset/README.md
@@ -174,6 +174,7 @@ module "bigquery-dataset" {
# tftest:modules=1:resources=3
```
+
## Variables
@@ -208,6 +209,6 @@ module "bigquery-dataset" {
| view_ids | Map of fully qualified view ids keyed by view ids. | |
| views | View resources. | |
-
+
diff --git a/modules/bigtable-instance/README.md b/modules/bigtable-instance/README.md
index cbbae24f76..c560a5bff1 100644
--- a/modules/bigtable-instance/README.md
+++ b/modules/bigtable-instance/README.md
@@ -33,6 +33,7 @@ module "bigtable-instance" {
# tftest:modules=1:resources=4
```
+
## Variables
@@ -61,6 +62,6 @@ module "bigtable-instance" {
| table_ids | Map of fully qualified table ids keyed by table name. | |
| tables | Table resources. | |
-
+
diff --git a/modules/billing-budget/README.md b/modules/billing-budget/README.md
index 54f2face63..6a0f4607cc 100644
--- a/modules/billing-budget/README.md
+++ b/modules/billing-budget/README.md
@@ -62,6 +62,7 @@ module "pubsub" {
# tftest:modules=2:resources=2
```
+
## Variables
@@ -87,5 +88,5 @@ module "pubsub" {
| budget | Budget resource. | |
| id | Budget ID. | |
-
+
diff --git a/modules/cloud-config-container/coredns/README.md b/modules/cloud-config-container/coredns/README.md
index 03c8d72b8a..e1af3ebae8 100644
--- a/modules/cloud-config-container/coredns/README.md
+++ b/modules/cloud-config-container/coredns/README.md
@@ -69,6 +69,7 @@ module "cos-coredns" {
}
```
+
## Variables
@@ -87,5 +88,5 @@ module "cos-coredns" {
|---|---|:---:|
| cloud_config | Rendered cloud-config file to be passed as user-data instance metadata. | |
-
+
diff --git a/modules/cloud-config-container/cos-generic-metadata/README.md b/modules/cloud-config-container/cos-generic-metadata/README.md
index 70192670f5..51f9a601f6 100644
--- a/modules/cloud-config-container/cos-generic-metadata/README.md
+++ b/modules/cloud-config-container/cos-generic-metadata/README.md
@@ -58,6 +58,7 @@ module "cos-envoy" {
}
```
+
## Variables
@@ -85,5 +86,5 @@ module "cos-envoy" {
|---|---|:---:|
| cloud_config | Rendered cloud-config file to be passed as user-data instance metadata. | |
-
+
diff --git a/modules/cloud-config-container/envoy-traffic-director/README.md b/modules/cloud-config-container/envoy-traffic-director/README.md
index 996154288a..a0856f1dca 100644
--- a/modules/cloud-config-container/envoy-traffic-director/README.md
+++ b/modules/cloud-config-container/envoy-traffic-director/README.md
@@ -46,6 +46,7 @@ module "vm-cos" {
```
+
## Variables
@@ -61,5 +62,5 @@ module "vm-cos" {
|---|---|:---:|
| cloud_config | Rendered cloud-config file to be passed as user-data instance metadata. | |
-
+
diff --git a/modules/cloud-config-container/mysql/README.md b/modules/cloud-config-container/mysql/README.md
index 0e894b5b4d..9abf5b6318 100644
--- a/modules/cloud-config-container/mysql/README.md
+++ b/modules/cloud-config-container/mysql/README.md
@@ -74,6 +74,7 @@ module "cos-mysql" {
}
```
+
## Variables
@@ -94,5 +95,5 @@ module "cos-mysql" {
|---|---|:---:|
| cloud_config | Rendered cloud-config file to be passed as user-data instance metadata. | |
-
+
diff --git a/modules/cloud-config-container/nginx/README.md b/modules/cloud-config-container/nginx/README.md
index 1db8ece91d..c0d3a9e3d4 100644
--- a/modules/cloud-config-container/nginx/README.md
+++ b/modules/cloud-config-container/nginx/README.md
@@ -52,6 +52,7 @@ module "cos-nginx" {
}
```
+
## Variables
@@ -71,5 +72,5 @@ module "cos-nginx" {
|---|---|:---:|
| cloud_config | Rendered cloud-config file to be passed as user-data instance metadata. | |
-
+
diff --git a/modules/cloud-config-container/onprem/README.md b/modules/cloud-config-container/onprem/README.md
index 560226fb53..9dcc5a1445 100644
--- a/modules/cloud-config-container/onprem/README.md
+++ b/modules/cloud-config-container/onprem/README.md
@@ -59,6 +59,7 @@ module "on-prem" {
}
```
+
## Variables
@@ -78,5 +79,5 @@ module "on-prem" {
|---|---|:---:|
| cloud_config | Rendered cloud-config file to be passed as user-data instance metadata. | |
-
+
diff --git a/modules/cloud-config-container/squid/README.md b/modules/cloud-config-container/squid/README.md
index 368ece7886..42b43d6db9 100644
--- a/modules/cloud-config-container/squid/README.md
+++ b/modules/cloud-config-container/squid/README.md
@@ -56,6 +56,7 @@ module "cos-squid" {
}
```
+
## Variables
@@ -78,5 +79,5 @@ module "cos-squid" {
|---|---|:---:|
| cloud_config | Rendered cloud-config file to be passed as user-data instance metadata. | |
-
+
diff --git a/modules/cloud-function/README.md b/modules/cloud-function/README.md
index 77516b900d..b3c430b0c2 100644
--- a/modules/cloud-function/README.md
+++ b/modules/cloud-function/README.md
@@ -155,6 +155,7 @@ module "cf-http" {
# tftest:skip
```
+
## Variables
@@ -193,5 +194,5 @@ module "cf-http" {
| service_account_iam_email | Service account email. | |
| vpc_connector | VPC connector resource if created. | |
-
+
diff --git a/modules/cloud-identity-group/README.md b/modules/cloud-identity-group/README.md
index c3ff786486..ea0ab02e5e 100644
--- a/modules/cloud-identity-group/README.md
+++ b/modules/cloud-identity-group/README.md
@@ -32,6 +32,7 @@ module "group" {
# tftest:modules=1:resources=4
```
+
## Variables
@@ -51,5 +52,5 @@ module "group" {
| id | Group ID. | |
| name | Group name. | |
-
+
diff --git a/modules/cloud-run/README.md b/modules/cloud-run/README.md
index cdc1e0a4f3..b7a2d184cd 100644
--- a/modules/cloud-run/README.md
+++ b/modules/cloud-run/README.md
@@ -207,6 +207,7 @@ module "cloud_run" {
# tftest:modules=1:resources=1
```
+
## Variables
@@ -242,5 +243,5 @@ module "cloud_run" {
| service_name | Cloud Run service name | |
| vpc_connector | VPC connector resource if created. | |
-
+
diff --git a/modules/cloudsql-instance/README.md b/modules/cloudsql-instance/README.md
index 217fcd45ee..334aa79e40 100644
--- a/modules/cloudsql-instance/README.md
+++ b/modules/cloudsql-instance/README.md
@@ -91,6 +91,7 @@ module "db" {
# tftest:modules=1:resources=6
```
+
## Variables
@@ -131,5 +132,5 @@ module "db" {
| self_links | Self links of all instances | |
| user_passwords | Map of containing the password of all users created through terraform. | ✓ |
-
+
diff --git a/modules/compute-mig/README.md b/modules/compute-mig/README.md
index 841ff57a1a..51b499158f 100644
--- a/modules/compute-mig/README.md
+++ b/modules/compute-mig/README.md
@@ -444,6 +444,7 @@ module "nginx-mig" {
```
+
## Variables
@@ -474,9 +475,9 @@ module "nginx-mig" {
| group_manager | Instance group resource. | |
| health_check | Auto-created health-check resource. | |
-
+
## TODO
- [✓] add support for instance groups
diff --git a/modules/compute-vm/README.md b/modules/compute-vm/README.md
index b29ba0a448..1634888c67 100644
--- a/modules/compute-vm/README.md
+++ b/modules/compute-vm/README.md
@@ -293,6 +293,7 @@ module "instance-group" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -344,9 +345,9 @@ module "instance-group" {
| template | Template resource. | |
| template_name | Template name. | |
-
+
## TODO
- [ ] add support for instance groups
diff --git a/modules/container-registry/README.md b/modules/container-registry/README.md
index 04723dc990..12a4d18635 100644
--- a/modules/container-registry/README.md
+++ b/modules/container-registry/README.md
@@ -16,6 +16,7 @@ module "container_registry" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -32,5 +33,5 @@ module "container_registry" {
|---|---|:---:|
| bucket_id | ID of the GCS bucket created | |
-
+
diff --git a/modules/datafusion/README.md b/modules/datafusion/README.md
index c8e6013e1f..65c1aa685b 100644
--- a/modules/datafusion/README.md
+++ b/modules/datafusion/README.md
@@ -34,6 +34,7 @@ module "datafusion" {
# tftest:modules=1:resources=3
```
+
## Variables
@@ -66,5 +67,5 @@ module "datafusion" {
| service_endpoint | DataFusion Service Endpoint. | |
| version | DataFusion version. | |
-
+
diff --git a/modules/dns/README.md b/modules/dns/README.md
index 95d908d70c..e4a252d6d8 100644
--- a/modules/dns/README.md
+++ b/modules/dns/README.md
@@ -53,6 +53,7 @@ module "private-dns" {
# tftest:modules=1:resources=1
```
+
## Variables
@@ -85,5 +86,5 @@ module "private-dns" {
| type | The DNS zone type. | |
| zone | DNS zone resource. | |
-
+
diff --git a/modules/endpoints/README.md b/modules/endpoints/README.md
index 8d5636f312..09e294d7de 100644
--- a/modules/endpoints/README.md
+++ b/modules/endpoints/README.md
@@ -23,6 +23,7 @@ module "endpoint" {
[Here](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/endpoints/getting-started/openapi.yaml) you can find an example of an openapi.yaml file. Once created the endpoint, remember to activate the service at project level.
+
## Variables
@@ -43,5 +44,5 @@ module "endpoint" {
| endpoints_service | The Endpoint service resource. | |
| service_name | The name of the service.. | |
-
+
diff --git a/modules/folder/README.md b/modules/folder/README.md
index 41ece1f205..2f9d093458 100644
--- a/modules/folder/README.md
+++ b/modules/folder/README.md
@@ -219,6 +219,7 @@ module "folder2" {
# tftest:modules=2:resources=6
```
+
## Variables
@@ -251,5 +252,5 @@ module "folder2" {
| name | Folder name. | |
| sink_writer_identities | Writer identities created for each sink. | |
-
+
diff --git a/modules/folders-unit/README.md b/modules/folders-unit/README.md
index a3b6d2a2af..d563ccfbea 100644
--- a/modules/folders-unit/README.md
+++ b/modules/folders-unit/README.md
@@ -24,6 +24,7 @@ module "folders-unit" {
# tftest:modules=1:resources=37
```
+
## Variables
@@ -55,5 +56,5 @@ module "folders-unit" {
| env_service_accounts | Unit environments service accounts. | |
| unit_folder | Unit top level folder. | |
-
+
diff --git a/modules/gcs/README.md b/modules/gcs/README.md
index a7f8297e56..c65eaa27fd 100644
--- a/modules/gcs/README.md
+++ b/modules/gcs/README.md
@@ -107,6 +107,7 @@ module "bucket-gcs-notification" {
# tftest:modules=1:resources=4
```
+
## Variables
@@ -141,5 +142,5 @@ module "bucket-gcs-notification" {
| topic | Topic ID used by GCS. | |
| url | Bucket URL. | |
-
+
diff --git a/modules/gke-cluster/README.md b/modules/gke-cluster/README.md
index 20c98797c7..9c5917575a 100644
--- a/modules/gke-cluster/README.md
+++ b/modules/gke-cluster/README.md
@@ -63,6 +63,7 @@ module "cluster-1" {
# tftest:modules=1:resources=1
```
+
## Variables
@@ -120,5 +121,5 @@ module "cluster-1" {
| name | Cluster name. | |
| notifications | GKE PubSub notifications topic. | |
-
+
diff --git a/modules/gke-nodepool/README.md b/modules/gke-nodepool/README.md
index 12a22da18e..8229b7bf09 100644
--- a/modules/gke-nodepool/README.md
+++ b/modules/gke-nodepool/README.md
@@ -34,6 +34,7 @@ module "cluster-1-nodepool-1" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -83,5 +84,5 @@ module "cluster-1-nodepool-1" {
| service_account_email | Service account email. | |
| service_account_iam_email | Service account email. | |
-
+
diff --git a/modules/iam-service-account/README.md b/modules/iam-service-account/README.md
index ee443ebbc8..ddea6fb5a1 100644
--- a/modules/iam-service-account/README.md
+++ b/modules/iam-service-account/README.md
@@ -25,6 +25,7 @@ module "myproject-default-service-accounts" {
# tftest:modules=1:resources=5
```
+
## Variables
@@ -56,5 +57,5 @@ module "myproject-default-service-accounts" {
| service_account | Service account resource. | |
| service_account_credentials | Service account json credential templates for uploaded public keys data. | |
-
+
diff --git a/modules/kms/README.md b/modules/kms/README.md
index 9b2b55db43..e17a342570 100644
--- a/modules/kms/README.md
+++ b/modules/kms/README.md
@@ -68,6 +68,7 @@ module "kms" {
# tftest:modules=1:resources=4
```
+
## Variables
@@ -94,5 +95,5 @@ module "kms" {
| location | Keyring location. | |
| name | Keyring name. | |
-
+
diff --git a/modules/logging-bucket/README.md b/modules/logging-bucket/README.md
index 08c811c450..79b4815e0a 100644
--- a/modules/logging-bucket/README.md
+++ b/modules/logging-bucket/README.md
@@ -41,6 +41,7 @@ module "bucket-default" {
```
+
## Variables
@@ -60,5 +61,5 @@ module "bucket-default" {
|---|---|:---:|
| id | ID of the created bucket. | |
-
+
diff --git a/modules/naming-convention/README.md b/modules/naming-convention/README.md
index d56629dc7b..4ef9d461e2 100644
--- a/modules/naming-convention/README.md
+++ b/modules/naming-convention/README.md
@@ -65,6 +65,7 @@ module "project-tf" {
}
```
+
## Variables
@@ -87,5 +88,5 @@ module "project-tf" {
| labels | Per resource labels. | |
| names | Per resource names. | |
-
+
diff --git a/modules/net-address/README.md b/modules/net-address/README.md
index c3f596d55e..e51f820e4b 100644
--- a/modules/net-address/README.md
+++ b/modules/net-address/README.md
@@ -84,6 +84,7 @@ module "addresses" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -108,5 +109,5 @@ module "addresses" {
| psa_addresses | Allocated internal addresses for PSA endpoints. | |
| psc_addresses | Allocated internal addresses for PSC endpoints. | |
-
+
diff --git a/modules/net-cloudnat/README.md b/modules/net-cloudnat/README.md
index 29b8cfd057..3dfe4e4d2e 100644
--- a/modules/net-cloudnat/README.md
+++ b/modules/net-cloudnat/README.md
@@ -15,6 +15,7 @@ module "nat" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -45,5 +46,5 @@ module "nat" {
| router | Cloud NAT router resources (if auto created). | |
| router_name | Cloud NAT router name. | |
-
+
diff --git a/modules/net-ilb/README.md b/modules/net-ilb/README.md
index 6a242d36eb..18f9d44150 100644
--- a/modules/net-ilb/README.md
+++ b/modules/net-ilb/README.md
@@ -108,6 +108,7 @@ module "ilb" {
# tftest:modules=3:resources=7
```
+
## Variables
@@ -149,5 +150,5 @@ module "ilb" {
| health_check_self_id | Auto-created health-check self id. | |
| health_check_self_link | Auto-created health-check self link. | |
-
+
diff --git a/modules/net-interconnect-attachment-direct/README.md b/modules/net-interconnect-attachment-direct/README.md
index eff2e556d1..85fd6b60bf 100644
--- a/modules/net-interconnect-attachment-direct/README.md
+++ b/modules/net-interconnect-attachment-direct/README.md
@@ -104,6 +104,7 @@ module "vlan-attachment-2" {
# tftest:modules=2:resources=8
```
+
## Variables
@@ -130,5 +131,5 @@ module "vlan-attachment-2" {
| interconnect_attachment | interconnect attachment | |
| router | Router resource (only if auto-created). | |
-
+
diff --git a/modules/net-vpc-firewall/README.md b/modules/net-vpc-firewall/README.md
index 8288c6ac66..4592463a20 100644
--- a/modules/net-vpc-firewall/README.md
+++ b/modules/net-vpc-firewall/README.md
@@ -124,6 +124,7 @@ healthchecks:
```
+
## Variables
@@ -153,5 +154,5 @@ healthchecks:
| custom_ingress_deny_rules | Custom ingress rules with deny blocks. | |
| rules | All google_compute_firewall resources created. | |
-
+
diff --git a/modules/net-vpc-peering/README.md b/modules/net-vpc-peering/README.md
index 5cf83210ac..61cf4f4d50 100644
--- a/modules/net-vpc-peering/README.md
+++ b/modules/net-vpc-peering/README.md
@@ -41,6 +41,7 @@ module "peering-a-c" {
# tftest:modules=2:resources=4
```
+
## Variables
@@ -61,5 +62,5 @@ module "peering-a-c" {
| local_network_peering | Network peering resource. | |
| peer_network_peering | Peer network peering resource. | |
-
+
diff --git a/modules/net-vpc/README.md b/modules/net-vpc/README.md
index ee5da70352..737f4eb5cd 100644
--- a/modules/net-vpc/README.md
+++ b/modules/net-vpc/README.md
@@ -202,6 +202,7 @@ flow_logs: # enable, set to empty map to use defaults
- metadata: "INCLUDE_ALL_METADATA"
```
+
## Variables
@@ -249,7 +250,7 @@ flow_logs: # enable, set to empty map to use defaults
| subnets | Subnet resources. | |
| subnets_l7ilb | L7 ILB subnet resources. | |
-
+
The key format is `subnet_region/subnet_name`. For example `europe-west1/my_subnet`.
diff --git a/modules/net-vpn-dynamic/README.md b/modules/net-vpn-dynamic/README.md
index 23333d1dec..7b1b0ca17b 100644
--- a/modules/net-vpn-dynamic/README.md
+++ b/modules/net-vpn-dynamic/README.md
@@ -39,6 +39,7 @@ module "vpn-dynamic" {
# tftest:modules=1:resources=10
```
+
## Variables
@@ -73,5 +74,5 @@ module "vpn-dynamic" {
| tunnel_self_links | VPN tunnel self links. | |
| tunnels | VPN tunnel resources. | |
-
+
diff --git a/modules/net-vpn-ha/README.md b/modules/net-vpn-ha/README.md
index d464b289b9..7f4317ab23 100644
--- a/modules/net-vpn-ha/README.md
+++ b/modules/net-vpn-ha/README.md
@@ -139,6 +139,7 @@ module "vpn_ha" {
# tftest:modules=1:resources=10
```
+
## Variables
@@ -176,5 +177,5 @@ module "vpn_ha" {
| tunnel_self_links | VPN tunnel self links. | |
| tunnels | VPN tunnel resources. | |
-
+
diff --git a/modules/net-vpn-static/README.md b/modules/net-vpn-static/README.md
index 9713b04360..6eba9b20f9 100644
--- a/modules/net-vpn-static/README.md
+++ b/modules/net-vpn-static/README.md
@@ -32,6 +32,7 @@ module "vpn" {
# tftest:modules=2:resources=8
```
+
## Variables
@@ -61,5 +62,5 @@ module "vpn" {
| tunnel_self_links | VPN tunnel self links. | |
| tunnels | VPN tunnel resources. | |
-
+
diff --git a/modules/organization/README.md b/modules/organization/README.md
index 561ae064dc..e3182b5657 100644
--- a/modules/organization/README.md
+++ b/modules/organization/README.md
@@ -235,6 +235,7 @@ module "org" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -270,5 +271,5 @@ module "org" {
| organization_id | Organization id dependent on module resources. | |
| sink_writer_identities | Writer identities created for each sink. | |
-
+
diff --git a/modules/project/README.md b/modules/project/README.md
index d07d1ffb13..3f1b50dc35 100644
--- a/modules/project/README.md
+++ b/modules/project/README.md
@@ -173,6 +173,7 @@ module "project" {
# tftest:modules=1:resources=7
```
+
## Variables
@@ -222,6 +223,6 @@ module "project" {
| service_accounts | Product robot service accounts in project. | |
| sink_writer_identities | Writer identities created for each sink. | |
-
+
diff --git a/modules/pubsub/README.md b/modules/pubsub/README.md
index fb5fb2934d..d47a5c9575 100644
--- a/modules/pubsub/README.md
+++ b/modules/pubsub/README.md
@@ -88,6 +88,7 @@ module "pubsub" {
# tftest:modules=1:resources=3
```
+
## Variables
@@ -115,5 +116,5 @@ module "pubsub" {
| subscriptions | Subscription resources. | |
| topic | Topic resource. | |
-
+
diff --git a/modules/secret-manager/README.md b/modules/secret-manager/README.md
index dc3aca21e2..059eeb89c9 100644
--- a/modules/secret-manager/README.md
+++ b/modules/secret-manager/README.md
@@ -73,6 +73,7 @@ module "secret-manager" {
# tftest:modules=1:resources=5
```
+
## Variables
@@ -94,9 +95,9 @@ module "secret-manager" {
| version_ids | Version ids keyed by secret name : version name. | |
| versions | Secret versions. | |
-
+
## Requirements
These sections describe requirements for using this module.
diff --git a/modules/service-directory/README.md b/modules/service-directory/README.md
index 0915400c6e..3d6bc6b49e 100644
--- a/modules/service-directory/README.md
+++ b/modules/service-directory/README.md
@@ -88,6 +88,7 @@ module "dns-sd" {
# tftest:modules=2:resources=5
```
+
## Variables
@@ -115,5 +116,5 @@ module "dns-sd" {
| service_names | Service ids (long names). | |
| services | Service resources. | |
-
+
diff --git a/modules/source-repository/README.md b/modules/source-repository/README.md
index a7473a7df2..cf0a7e0480 100644
--- a/modules/source-repository/README.md
+++ b/modules/source-repository/README.md
@@ -19,6 +19,7 @@ module "repo" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -36,5 +37,5 @@ module "repo" {
| id | Repository id. | |
| url | Repository URL. | |
-
+
diff --git a/modules/vpc-sc/README.md b/modules/vpc-sc/README.md
index c181087271..fded87d1a5 100644
--- a/modules/vpc-sc/README.md
+++ b/modules/vpc-sc/README.md
@@ -231,6 +231,7 @@ module "vpc-sc-first" {
# tftest:modules=1:resources=2
```
+
## Variables
@@ -260,5 +261,5 @@ module "vpc-sc-first" {
| perimeters_bridge | VPC-SC bridge perimeter resources. | |
| perimeters_standard | VPC-SC standard perimeter resources. | |
-
+
diff --git a/networking/decentralized-firewall/README.md b/networking/decentralized-firewall/README.md
index 2bdf6bbc3b..dc98862271 100644
--- a/networking/decentralized-firewall/README.md
+++ b/networking/decentralized-firewall/README.md
@@ -20,6 +20,7 @@ The rules can be validated either using an automated process or a manual process
the two). There is an example of a YAML-based validator using [Yamale](https://github.com/23andMe/Yamale)
in the [`validator/`](validator/) subdirectory, which can be integrated as part of a CI/CD pipeline.
+
## Variables
@@ -41,5 +42,5 @@ in the [`validator/`](validator/) subdirectory, which can be integrated as part
| projects | Project ids. | |
| vpc | Shared VPCs. | |
-
+
diff --git a/networking/filtering-proxy/README.md b/networking/filtering-proxy/README.md
index 792301d990..9edfe6a222 100644
--- a/networking/filtering-proxy/README.md
+++ b/networking/filtering-proxy/README.md
@@ -15,6 +15,7 @@ You can optionally deploy the Squid server as [Managed Instance Group](https://c

+
## Variables
@@ -36,5 +37,5 @@ You can optionally deploy the Squid server as [Managed Instance Group](https://c
|---|---|:---:|
| squid-address | IP address of the Squid proxy. | |
-
+
diff --git a/networking/hub-and-spoke-peering/README.md b/networking/hub-and-spoke-peering/README.md
index ae19ed1895..30c3ba1a95 100644
--- a/networking/hub-and-spoke-peering/README.md
+++ b/networking/hub-and-spoke-peering/README.md
@@ -79,6 +79,7 @@ A few APIs need to be enabled in the project, if `apply` fails due to a service
The VPN used to connect the GKE masters VPC does not account for HA, upgrading to use HA VPN is reasonably simple by using the relevant [module](../../modules/net-vpn-ha).
+
## Variables
@@ -100,5 +101,5 @@ The VPN used to connect the GKE masters VPC does not account for HA, upgrading t
| project | Project id. | |
| vms | GCE VMs. | |
-
+
diff --git a/networking/hub-and-spoke-vpn/README.md b/networking/hub-and-spoke-vpn/README.md
index da1dac6db7..81cd1a1bab 100644
--- a/networking/hub-and-spoke-vpn/README.md
+++ b/networking/hub-and-spoke-vpn/README.md
@@ -34,6 +34,7 @@ The example does not account for HA, but the VPN gateways can be easily upgraded
If a single router and VPN gateway are used in the hub to manage all tunnels, particular care must be taken in announcing ranges from hub to spokes, as Cloud Router does not explicitly support transitivity and overlapping routes received from both sides create unintended side effects. The simple workaround is to announce a single aggregated route from hub to spokes so that it does not overlap with any of the ranges advertised by each spoke to the hub.
+
## Variables
@@ -53,5 +54,5 @@ If a single router and VPN gateway are used in the hub to manage all tunnels, pa
|---|---|:---:|
| vms | GCE VMs. | |
-
+
diff --git a/networking/ilb-next-hop/README.md b/networking/ilb-next-hop/README.md
index b6c496f70d..66e337f3e0 100644
--- a/networking/ilb-next-hop/README.md
+++ b/networking/ilb-next-hop/README.md
@@ -60,6 +60,7 @@ A sample testing session using `tmux`:
+
## Variables
@@ -86,5 +87,5 @@ A sample testing session using `tmux`:
| ssh_vm_left | Command-line login to left VMs. | |
| ssh_vm_right | Command-line login to right VMs. | |
-
+
diff --git a/networking/onprem-google-access-dns/README.md b/networking/onprem-google-access-dns/README.md
index 53d5c811e3..888171f437 100644
--- a/networking/onprem-google-access-dns/README.md
+++ b/networking/onprem-google-access-dns/README.md
@@ -201,6 +201,7 @@ A single pre-existing project is used in this example to keep variables and comp
The VPN-s used to connect to the on-premises environment do not account for HA, upgrading to use HA VPN is reasonably simple by using the relevant [module](../../modules/net-vpn-ha).
+
## Variables
@@ -224,5 +225,5 @@ The VPN-s used to connect to the on-premises environment do not account for HA,
| test-instance1 | Test instance details. | |
| test-instance2 | Test instance details. | |
-
+
diff --git a/networking/private-cloud-function-from-onprem/README.md b/networking/private-cloud-function-from-onprem/README.md
index 9c34d720b1..f787e6fa9a 100644
--- a/networking/private-cloud-function-from-onprem/README.md
+++ b/networking/private-cloud-function-from-onprem/README.md
@@ -14,6 +14,7 @@ curl https://YOUR_REGION-YOUR_PROJECT_ID.cloudfunctions.net/YOUR_FUNCTION_NAME

+
## Variables
@@ -33,5 +34,4 @@ curl https://YOUR_REGION-YOUR_PROJECT_ID.cloudfunctions.net/YOUR_FUNCTION_NAME
|---|---|:---:|
| function_url | URL of the Cloud Function. | |
-
-
\ No newline at end of file
+
diff --git a/networking/shared-vpc-gke/README.md b/networking/shared-vpc-gke/README.md
index 3bfa1dc582..67658a2220 100644
--- a/networking/shared-vpc-gke/README.md
+++ b/networking/shared-vpc-gke/README.md
@@ -42,6 +42,7 @@ alias k='HTTPS_PROXY=localhost:8888 kubectl $@'
There's a minor glitch that can surface running `terraform destroy`, where the service project attachments to the Shared VPC will not get destroyed even with the relevant API call succeeding. We are investigating the issue, in the meantime just manually remove the attachment in the Cloud console or via the `gcloud beta compute shared-vpc associated-projects remove` command when `terraform destroy` fails, and then relaunch the command.
+
## Variables
@@ -70,5 +71,5 @@ There's a minor glitch that can surface running `terraform destroy`, where the s
| vms | GCE VMs. | |
| vpc | Shared VPC. | |
-
+
diff --git a/third-party-solutions/openshift/tf/README.md b/third-party-solutions/openshift/tf/README.md
index 2af199c349..8a76e93ac8 100644
--- a/third-party-solutions/openshift/tf/README.md
+++ b/third-party-solutions/openshift/tf/README.md
@@ -2,6 +2,7 @@
This example is a companion setup to the Python script in the parent folder, and is used to bootstrap OpenShift clusters on GCP. Refer to the documentation in the parent folder for usage instructions.
+
## Variables
@@ -30,5 +31,5 @@ This example is a companion setup to the Python script in the parent folder, and
| bootstrap-ssh | Command to SSH to the bootstrap instance. | |
| masters-ssh | Command to SSH to the master instances. | |
-
+
diff --git a/tools/tfdoc.py b/tools/tfdoc.py
index 69974d3e73..892c10104a 100755
--- a/tools/tfdoc.py
+++ b/tools/tfdoc.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Copyright 2021 Google LLC
+# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@
import click
-__version__ = '2.0.1'
+__version__ = '2.1.0'
# TODO(ludomagno): decide if we want to support variables*.tf and outputs*.tf
@@ -153,15 +153,18 @@ def _parse(body, enum=VAR_ENUM, re=VAR_RE, template=VAR_TEMPLATE):
item[context].append(data)
-def parse_files(basepath):
+def parse_files(basepath, exclude_files=None):
'Return a list of File named tuples in root module at basepath.'
+ exclude_files = exclude_files or []
for name in glob.glob(os.path.join(basepath, '*tf')):
+ shortname = os.path.basename(name)
+ if shortname in exclude_files:
+ continue
try:
with open(name) as file:
body = file.read()
except (IOError, OSError) as e:
raise SystemExit(f'Cannot read file {name}: {e}')
- shortname = os.path.basename(name)
tags = _extract_tags(body)
description = tags.get(
'file:description', FILE_DESC_DEFAULTS.get(shortname))
@@ -218,19 +221,16 @@ def format_doc(outputs, variables, files, show_extra=False):
'Return formatted document.'
buffer = []
if files:
- buffer.append('\n## Files\n')
- for line in format_files(files):
- buffer.append(line)
- buffer.append('\n')
+ buffer += ['', '## Files', '']
+ buffer += list(format_files(files))
if variables:
- buffer.append('\n## Variables\n')
- for line in format_variables(variables, show_extra):
- buffer.append(line)
+ buffer += ['', '## Variables', '']
+ buffer += list(format_variables(variables, show_extra))
if outputs:
- buffer.append('\n## Outputs\n')
- for line in format_outputs(outputs, show_extra):
- buffer.append(line)
- buffer.append('\n')
+ buffer += ['', '## Outputs', '']
+ buffer += list(format_outputs(outputs, show_extra))
+ if buffer:
+ buffer.append('')
return '\n'.join(buffer)
@@ -321,9 +321,9 @@ def get_doc(readme):
return {'doc': m.group(1), 'start': m.start(), 'end': m.end()}
-def create_doc(module_path, files=False, show_extra=False):
+def create_doc(module_path, files=False, show_extra=False, exclude_files=None):
try:
- mod_files = list(parse_files(module_path)) if files else []
+ mod_files = list(parse_files(module_path, exclude_files)) if files else []
mod_variables = list(parse_variables(module_path))
mod_outputs = list(parse_outputs(module_path))
except (IOError, OSError) as e:
@@ -357,13 +357,14 @@ def replace_doc(module_path, doc):
@ click.command()
@ click.argument('module', type=click.Path(exists=True))
-@ click.option('--show-extra/--no-show-extra', default=False)
+@click.option('--exclude-file', '-x', multiple=True)
@ click.option('--files/--no-files', default=False)
@ click.option('--replace/--no-replace', default=True)
-def main(module=None, annotate=False, files=False, replace=True,
+@ click.option('--show-extra/--no-show-extra', default=False)
+def main(module=None, annotate=False, exclude_file=None, files=False, replace=True,
show_extra=True):
'Program entry point.'
- doc = create_doc(module, files, show_extra)
+ doc = create_doc(module, files, show_extra, exclude_file)
if replace:
replace_doc(module, doc)
else: