https://github.com/happypathway/gcpdemo
https://github.com/happypathway/gcpdemo
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/happypathway/gcpdemo
- Owner: HappyPathway
- Created: 2018-10-03T22:52:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-03T23:10:52.000Z (almost 8 years ago)
- Last Synced: 2025-01-08T06:16:51.877Z (over 1 year ago)
- Language: HCL
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GCPDemo
## Usage
In order to use this demo, first clone it... duh! ;)
Then create an organization in Terraform Enterprise; make sure it's one you dont care about it as you will be deleting it afterwards.
### Import your organization
Then import your organization into the current Terraform workspace
```bash
terraform import tfe_organization.gcp_infrastructure
```
### Create your terraform.tfvars file
```
admin_email="darnold@hashicorp.com"
gcp_credentials_file="/Users/davearnold/.google.json"
gcp_project=""
github_organization="HappyPathway"
organization="GCPDemo"
```
### Run Terraform
```bash
terraform apply
```
### Import private modules
The private modules cannot be imported during the first run as the repositories will not have been setup yet.
Importing of the private modules uses a data source where as the github repos uses resources. Since Data Sources
run before Resources, it's necessary to not run all configurations during the first pass.
Rename the modules.tf.phase2 file to modules.tf and then re-run terraform apply
```
terraform apply
```
Now you should have everything setup properly.