You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* initial verison of docs folder and files
* fix glossary link
* update glossary and troubleshooting
* add cross reference to troubleshooting
* Add item for IPv6 issue in Cloud Shell
* Apply suggestions from code review
Co-authored-by: Bharath KKB <[email protected]>
* make Troubleshooting a section under Prerequisites
* adjust common errors heading
* Add alternative to upgrade the terraform runner image version
* upgrade option is only valid for versions 0.14.x
Co-authored-by: Bharath KKB <[email protected]>
Copy file name to clipboardExpand all lines: 0-bootstrap/README.md
+7-34Lines changed: 7 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ file.
55
55
56
56
## Purpose
57
57
58
-
The purpose of this step is to bootstrap a Google Cloud organization, creating all the required resources & permissions to start using the Cloud Foundation Toolkit (CFT). This step also configures a CI/CD pipeline for foundations code in subsequent stages. The CI/CD pipeline can use either Cloud Build andCloud Source Repos or Jenkins and your own Git repos (which might live on-premises).
58
+
The purpose of this step is to bootstrap a Google Cloud organization, creating all the required resources & permissions to start using the Cloud Foundation Toolkit (CFT). This step also configures a CI/CD pipeline for foundations code in subsequent stages. The CI/CD pipeline can use either Cloud Build and Cloud Source Repos or Jenkins and your own Git repos (which might live on-premises).
59
59
60
60
## Prerequisites
61
61
@@ -66,7 +66,7 @@ installed:
66
66
-[Terraform](https://www.terraform.io/downloads.html) version 0.13.6.
67
67
- An existing project which the user has access to be used by terraform-validator.
68
68
69
-
Note: Make sure that you use the same version of Terraform throughout this
69
+
**Note:** Make sure that you use the same version of Terraform throughout this
70
70
series. Otherwise, you might experience Terraform state snapshot lock errors.
71
71
72
72
Also make sure that you've done the following:
@@ -93,6 +93,10 @@ For more information about the permissions that are required and the resources
93
93
that are created, see the organization bootstrap module
These are warnings for resources that are not yet supported or not known by terraform-validator, these are not actual errors.
146
150
147
-
**Note 2:** After the deploy, even if you did not receive the project quota error described in the first item of the [Troubleshooting](#troubleshooting) section, we recommend that your request 50 additional projects for the service account, `terraform_service_account`, created in this step.
151
+
**Note 2:** After the deploy, even if you did not receive the project quota error described in the [Troubleshooting guide](../docs/TROUBLESHOOTING.md#project-quota-exceeded), we recommend that you request 50 additional projects for the service account, `terraform_service_account`, created in this step.
148
152
149
153
## Running Terraform locally
150
154
@@ -196,34 +200,3 @@ the following steps:
196
200
| terraform\_validator\_policies\_repo | Cloud Source Repository created for terraform-validator policies. |
197
201
198
202
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
199
-
200
-
## Troubleshooting
201
-
202
-
When you run the examples in this repository, you might see the following errors
203
-
during a Terraform `apply` command:
204
-
205
-
206
-
- `Error code 8, message: The project cannot be created because you have exceeded
207
-
your allotted project quota`.
208
-
209
-
- This message means you have reached your [project creation
210
-
quota](https://support.google.com/cloud/answer/6330231). In this case, you can
form to request a quota increase. In the support form, for **Email addresses
214
-
that will be used to create projects**, use the `terraform_sa_email` address
215
-
that's created in the organization bootstrap module. If you see other quota
216
-
errors, see the [Quota documentation](https://cloud.google.com/docs/quota).
217
-
218
-
-`Error: Error when reading or editing Organization Not Found : <organization-id>: googleapi: Error 403: The caller does not have permission, forbidden`.
219
-
- Check that your user have [Organization Admin](https://cloud.google.com/iam/docs/understanding-roles#resource-manager-roles) predefined role at the Organization level.
220
-
- If this is the case, try the following:
221
-
```
222
-
gcloud auth application-default login
223
-
gcloud auth list # <- confirm that correct account has a star next to it
224
-
```
225
-
- Re-run `terraform` after.
226
-
227
-
- `Error: Error setting billing account "XXXXXX-XXXXXX-XXXXXX" for project "projects/some-project": googleapi: Error 400: Precondition check failed., failedPrecondition`. Most likely this is related to billing quota issue.
228
-
- To confirm this, try `gcloud alpha billing projects link projects/some-project --billing-account XXXXXX-XXXXXX-XXXXXX`.
229
-
- If output states `Cloud billing quota exceeded`, please request increase via [https://support.google.com/code/contact/billing_quota_increase](https://support.google.com/code/contact/billing_quota_increase).
Copy file name to clipboardExpand all lines: 1-org/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,9 +63,13 @@ The purpose of this step is to set up top-level shared folders, monitoring and n
63
63
3. Membership in the security admins group for the user running Terraform.
64
64
4. Security Command Center notifications require that you choose a Security Command Center tier and create and grant permissions for the Security Command Center service account as outlined in [Setting up Security Command Center](https://cloud.google.com/security-command-center/docs/quickstart-security-command-center)
65
65
66
-
Note: Make sure that you use the same version of Terraform throughout this
66
+
**Note:** Make sure that you use the same version of Terraform throughout this
67
67
series, otherwise you might experience Terraform state snapshot lock errors.
68
68
69
+
### Troubleshooting
70
+
71
+
Please refer to [troubleshooting](../docs/TROUBLESHOOTING.md) if you run into issues during this step.
72
+
69
73
## Usage
70
74
71
75
**Disclaimer:** This step enables [Data Access logs](https://cloud.google.com/logging/docs/audit#data-access) for all services in your organization.
Copy file name to clipboardExpand all lines: 3-networks/README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,15 @@ The purpose of this step is to:
64
64
1. 0-bootstrap executed successfully.
65
65
1. 1-org executed successfully.
66
66
1. 2-environments executed successfully.
67
-
1. Obtain the value for the access_context_manager_policy_id variable. Can be obtained by running `gcloud access-context-manager policies list --organization YOUR_ORGANIZATION_ID --format="value(name)"`.
67
+
1. Obtain the value for the access_context_manager_policy_id variable. Can be obtained by running
68
+
69
+
```
70
+
gcloud access-context-manager policies list --organization YOUR_ORGANIZATION_ID --format="value(name)"
71
+
```
72
+
73
+
### Troubleshooting
74
+
75
+
Please refer to [troubleshooting](../docs/TROUBLESHOOTING.md) if you run into issues during this step.
Copy file name to clipboardExpand all lines: 4-projects/README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,9 +75,6 @@ This pipeline can be utilized for deploying resources in projects across develop
75
75
gcloud access-context-manager perimeters list --policy ACCESS_CONTEXT_MANAGER_POLICY_ID --format="value(name)"
76
76
```
77
77
78
-
**Troubleshooting:**
79
-
If you do not have access to run the commands above and you are in the organization admins group, you can append `--impersonate-service-account=org-terraform@<SEED_PROJECT_ID>.iam.gserviceaccount.com` to run the command as the Terraform service account.
80
-
81
78
**Note:** If you have more than one service perimeter for each environment, you can also get the values from the `restricted_service_perimeter_name` output from each of the`3-networks` environments.
82
79
83
80
If you are using Cloud Build you can also search for the values in the outputs from the build logs:
@@ -101,6 +98,10 @@ gcloud builds log BUILD_ID \
101
98
102
99
Change the `BRANCH_NAME` from `development` to `non-production` or `production` for the other two service perimeters.
103
100
101
+
### Troubleshooting
102
+
103
+
Please refer to [troubleshooting](../docs/TROUBLESHOOTING.md) if you run into issues during this step.
104
+
104
105
## Usage
105
106
106
107
**Note:** You need to set variable `enable_hub_and_spoke` to `true` to be able to used the **Hub-and-Spoke** architecture detailed in the **Networking** section of the [google cloud security foundations guide](https://services.google.com/fh/files/misc/google-cloud-security-foundations-guide.pdf).
## Why am I encountering a low quota with projects created via Terraform Example Foundation?
4
+
5
+
When you deploy the Terraform Example Foundation with the Service Account created in step 0-bootstrap,
6
+
the project quota will be based on the reputation of your service account rather than your user identity.
7
+
In many cases, this quota is initially low.
8
+
9
+
We recommend that your request 50 additional projects for the service account, `terraform_service_account`, created in step 0-bootstrap.
10
+
You can use the [Request Project Quota Increase](https://support.google.com/code/contact/project_quota_increase) form to request the quota increase.
11
+
In the support form, for **Email addresses that will be used to create projects**, use the `terraform_service_account` address that's created in the organization bootstrap module.
12
+
If you see other quota errors, see the [Quota documentation](https://cloud.google.com/docs/quota).
Defined terms in the documentation for Terraform Example Foundation are capitalized and have
4
+
specific meaning within the domain of knowledge.
5
+
6
+
## Terraform Service Account
7
+
8
+
The email for privileged service account created in the seed project of the step 0-bootstrap.
9
+
This service account is used to run Terraform by Cloud Build and Jenkins using service account impersonation.
10
+
11
+
## Seed Project
12
+
13
+
Seed Project created in the 0-bootstrap step. It is the project where the Terraform Service Account (`terraform_service_account`) is created and hosts the GCS bucket used to store Terraform state of each environment in subsequent phases.
14
+
15
+
## Foundation Pipeline
16
+
17
+
A project created in step 0-bootstrap to manage infrastructure **within the organization**.
18
+
The pipeline can use **Cloud Build** or **Jenkins** depending or your context and Terraform is executed using the seed project service account.
19
+
Also know as the CI/CD project.
20
+
It is located under folder `bootstrap`.
21
+
22
+
## App Infra Pipeline
23
+
24
+
A project created in step 4-projects to host a Cloud Build pipeline configured to manage infrastructure **within projects**.
25
+
A separate pipeline exists for each of the business units and it can be configured to use a service account that has limited permissions to deploy into certain projects created in 4-projects.
0 commit comments