-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #1
Open
oeghaneyan
wants to merge
1
commit into
hashicorp-guides:main
Choose a base branch
from
oeghaneyan:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,28 @@ | ||||||
# gcp-stacks-example | ||||||
|
||||||
This is a PoC configuration testing stacks with Google Cloud Platform. It's not documented or polished as other | ||||||
stacks examples we've made, and isn't intended for public consumption (without said documentation or | ||||||
polish, anyway). | ||||||
_This is an example stack configuration for the private preview of Terraform Stacks. Language | ||||||
constructs and features are subject to change given feedback received during this preview. Do not | ||||||
use Stacks for production workloads at this time._ | ||||||
|
||||||
An example Terraform Stack that provisions a Debian virtual machine. | ||||||
|
||||||
Three components are used: | ||||||
|
||||||
* `compute` leverages the data references of the SSH key and cloud image to create a new Debian resource using the Google provider. | ||||||
|
||||||
_We do not recommend using this example within production accounts. This example will incur [small] | ||||||
costs if provisioned. Please remember to destroy the infrastructure after using this example._ | ||||||
|
||||||
|
||||||
## Usage | ||||||
|
||||||
_Prerequisites: You must have a Terraform Cloud account with access to the private preview of | ||||||
Terraform Stacks, a GitHub account, and a GCP Project with Terraform Cloud configured as an OIDC | ||||||
identity provider. Details of all of this are found in the provided Stacks User Guide._ | ||||||
|
||||||
1. **Configure GCP authentication** by creating a new service account in the Google Cloud Console (or with Terraform itself!) with the necessary roles (Cloud Storage, Cloud Functions, and API Gateway) and a service account key to allow the role to be assumed by Terraform Cloud (the OIDC identity provider). More details on this step can be found in the Stacks User Guide or in the [Dynamic Credentials with the GCP Provider](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/dynamic-provider-credentials/gcp-configuration) guide. | ||||||
2. **Fork this repository** to your own GitHub account, such that you can edit this stack configuration | ||||||
for your purposes. | ||||||
3. **Edit your forked stack configuration** and change `deployments.tfdeploy.hcl` to use the public ssh key url, GCP audience, GCP service account email, and GCP project ID you created, as well as an identity token audience value for GCP. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
4. **Create a new stack** in Terraform Cloud and connect it to your forked configuration repository. | ||||||
5. **Provision away!** |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.