Skip to content

Commit b6a0b89

Browse files
committed
update README
1 parent 7be8eeb commit b6a0b89

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This was written with a very narrow use case in mind: wrapping Terraform command
1414

1515
### But Why?
1616

17-
Google Cloud Builds have a timeout value, which by default is (currently) 10 minutes. When this timeout for the build (and specifically for the build job itself) is reached, the build service sends a SIGTERM, followed by a very brief pause, and the container in whcih the step is running is force-terminated. This has serious consequences for a stateful application like Terraform, which often needs to terminate gracefully in order to terminate its operations, update and write state, and to release the state lock. If a job is force-terminated, this cannot happen and can often have dire consequences, like requiring manual, human intervention to recover the state and manually delete the lock.
17+
Google Cloud Builds have a timeout value, which by default is (currently) 10 minutes. When this timeout for the build (and specifically for the build job itself) is reached, the build service sends a SIGTERM, followed by a very brief pause, and the container in which the step is running is force-terminated. This has serious consequences for a stateful application like Terraform, which needs to terminate gracefully in order to stop its operations, update and write state, and to release the state lock. If a job is force-terminated, this cannot happen and can often have dire consequences, like orphaning resources, requiring human intervention, and a manual release of the state lock.
1818

1919
## Use
2020

@@ -42,7 +42,7 @@ docker build -t gcr.io/angstwad-gcbcw/gcbcw:latest
4242
docker push gcr.io/angstwad-gcbcw/gcbcw:latest
4343
```
4444

45-
Last, use the image in your Cloud Build [configuration](https://cloud.google.com/cloud-build/docs/build-config), which is often `cloudbuild.yaml`. An [example](example/cloudbuild.yaml) has been provided. Because the Terraform image was defined with a custom `entrypoint`, you will need to override this in your build config with the [entrypoint](https://cloud.google.com/cloud-build/docs/build-config#entrypoint) flag. Below, I have provided an example build step, which wraps the command `terraform apply -auto-approve`, signalling Terraform 2 minutes before the build job's scheduled timeout.
45+
Last, use the image in your Cloud Build [configuration](https://cloud.google.com/cloud-build/docs/build-config). An [example](example/cloudbuild.yaml) has been provided. Because Hashicorp's Terraform image has been defined with a custom `entrypoint`, you will need to override this in your build config with the [entrypoint](https://cloud.google.com/cloud-build/docs/build-config#entrypoint) flag. Below I have provided an example build step which wraps the command `terraform apply -auto-approve`, signaling Terraform 2 minutes before the build job's scheduled timeout.
4646

4747
The below example uses [default variable substitutions](https://cloud.google.com/cloud-build/docs/configuring-builds/substitute-variable-values#using_default_substitutions) to populate the required project and build ID parameters.
4848

0 commit comments

Comments
 (0)