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
Copy file name to clipboardExpand all lines: 1-org/README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,12 +169,15 @@ Run `terraform output cloudbuild_project_id` in the `0-bootstrap` folder to see
169
169
git add .
170
170
git commit -m 'Your message'
171
171
```
172
-
1. Push your plan branch to trigger a plan. For this command, the branch `plan` is not a special one. Any branch which name is different from `development`, `non-production` or `production` will trigger a Terraform plan.
172
+
1. Push your plan branch to trigger a plan for all environments. Because the
173
+
_plan_ branch is not a [named environment branch](./docs/FAQ.md), pushing your _plan_
174
+
branch triggers _terraform plan_ but not _terraform apply_.
173
175
```
174
176
git push --set-upstream origin plan
175
177
```
176
178
1. Review the plan output in your Cloud Build project. https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
177
-
1. Merge changes to production branch.
179
+
1. Merge changes to production branch. Because the _production_ branch is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
180
+
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
178
181
```
179
182
git checkout -b production
180
183
git push origin production
@@ -239,7 +242,7 @@ to run the command as the Terraform service account.
239
242
git add .
240
243
git commit -m 'Your message'
241
244
```
242
-
1. Push your plan branch. The branch `plan` is not a special one. Any branch which name is different from `development`, `non-production` or `production` will trigger a Terraform plan.
245
+
1. Push your plan branch.
243
246
- Assuming you configured an automatic trigger in your Jenkins Master (see [Jenkins sub-module README](../0-bootstrap/modules/jenkins-agent)), this will trigger a plan. You can also trigger a Jenkins job manually. Given the many options to do this in Jenkins, it is out of the scope of this document see [Jenkins website](http://www.jenkins.io) for more details.
Copy file name to clipboardExpand all lines: docs/FAQ.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,3 +10,20 @@ We recommend that your request 50 additional projects for the service account, `
10
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
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
12
If you see other quota errors, see the [Quota documentation](https://cloud.google.com/docs/quota).
13
+
14
+
## What is a "named" branch?
15
+
16
+
Certain branches in the terraform-example-foundation are considered to be
17
+
_named branches_. Pushing to a named branch causes the _apply_ command to be
18
+
run. Pushing to branches other than the named branches does not run _apply_.
19
+
20
+
* development
21
+
* non-production
22
+
* production
23
+
24
+
## Which Terraform commands are run when I push to a branch?
25
+
26
+
If you pushed to a _named branch_ the following commands are run: _init_, _plan_, _validate_, _apply_.
27
+
28
+
If you push to a branch that is not a named branch, only _init_, _plan_, and
29
+
_validate_ are run. The _apply_ command is not run.
0 commit comments