forked from kubernetes-sigs/cluster-api-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add README and move TF under hack dir
- Loading branch information
Karen Almog
committed
Sep 18, 2018
1 parent
2fff462
commit 7034500
Showing
12 changed files
with
69 additions
and
469 deletions.
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 |
---|---|---|
|
@@ -19,5 +19,8 @@ | |
*.tfstate | ||
*.tfstate.* | ||
|
||
# Terraform plan file | ||
*.tfplan.* | ||
|
||
# Auto-generated manifests | ||
tfManifests/ |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Your AWS user account | ||
export TF_VAR_aws_user=$(aws iam get-user | jq --raw-output '.User.UserName') | ||
|
||
export TF_VAR_cluster_domain="aos-cloud.eu" | ||
export TF_VAR_cluster_name=$(whoami) | ||
export TF_VAR_cluster_namespace="dev-${TF_VAR_cluster_name}" | ||
|
||
export TF_IN_AUTOMATION="true" | ||
|
||
cd ./prebuild | ||
echo "*** starting terraform" | ||
|
||
terraform init -input=false | ||
if [ $? == "0" ]; then | ||
terraform plan -input=false -out=tfplan.out && terraform apply -input=false -auto-approve tfplan.out | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Building a dev environment using terraform | ||
This directory holds the recipes required in order to deploy a working AWS dev environment using [terraform](https://www.terraform.io/downloads.html). | ||
|
||
## Deployment Instructions | ||
1. Download terraform from the link above and place it into your `$PATH`. | ||
2. The following environment variables need to be set: | ||
1. `TF_VAR_aws_user` your AWS username (`aws iam get-user | jq --raw-output '.User.UserName'`) | ||
2. `TF_VAR_cluster_domain` The Route53 domain name to be used for the cluster. | ||
3. `TF_VAR_cluster_name` (self explanatory...) | ||
4. `TF_VAR_cluster_namespace`: the namespace to deploy the cluster components to (suggestion: `dev-${TF_VAR_cluster_name}`) | ||
|
||
4. Run terraform: | ||
``` | ||
> terraform init | ||
> terraform plan | ||
> terraform apply | ||
``` | ||
|
||
To destroy the environment, simply run `terraform destroy`. |
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.