-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to
stacks
. Add import
to all configs. Remove hardcoded set…
…tings. Add Terraform S3 backend generation (#6) * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI * Update CLI
- Loading branch information
Showing
54 changed files
with
941 additions
and
1,515 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 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,15 +1,9 @@ | ||
#!/usr/bin/env variant | ||
# vim: filetype=hcl | ||
|
||
option "region" { | ||
default = "us-east-2" | ||
description = "AWS region" | ||
type = string | ||
} | ||
|
||
option "dry-run" { | ||
default = false | ||
description = "Disable execution of any commands and echo the commands instead" | ||
description = "Disable execution of any commands and echo the command instead" | ||
type = bool | ||
} | ||
|
||
|
@@ -20,42 +14,43 @@ option "kubeconfig-path" { | |
} | ||
|
||
option "kubeconfig-profile-pattern" { | ||
default = "eg-gbl-$$stage-helm" | ||
default = "{namespace}-{environment}-{stage}-helm" | ||
description = "AWS profile pattern for kubeconfig" | ||
type = string | ||
} | ||
|
||
option "cluster-name-pattern" { | ||
default = "eg-$$environment-$$stage-eks-cluster" | ||
default = "{namespace}-{environment}-{stage}-eks-cluster" | ||
description = "Cluster name pattern" | ||
type = string | ||
} | ||
|
||
option "terraform-dir" { | ||
default = "./" | ||
description = "Terraform projects directory" | ||
default = "./components/terraform" | ||
description = "Terraform components directory" | ||
type = string | ||
} | ||
|
||
option "helmfile-dir" { | ||
default = "./helmfiles" | ||
description = "Helmfile projects directory" | ||
default = "./components/helmfiles" | ||
description = "Helmfile components directory" | ||
type = string | ||
} | ||
|
||
option "config-dir" { | ||
default = "../config" | ||
description = "Config directory" | ||
default = "./stacks" | ||
description = "Stacks config directory" | ||
type = string | ||
} | ||
|
||
option "vendor-config-path" { | ||
default = "../vendor/vendir.yml" | ||
default = "./vendir.yml" | ||
description = "Path to the vendor configuration file" | ||
type = string | ||
} | ||
|
||
imports = [ | ||
"git::https://[email protected]/cloudposse/atmos@modules/utils?ref=master", | ||
"git::https://[email protected]/cloudposse/atmos@modules/shell?ref=master", | ||
"git::https://[email protected]/cloudposse/atmos@modules/kubeconfig?ref=master", | ||
"git::https://[email protected]/cloudposse/atmos@modules/terraform?ref=master", | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
namespace: eg | ||
|
||
terraform_backend_environment: ue2 | ||
|
||
terraform_backend_stage: root | ||
|
||
terraform_backend_role_environment: gbl | ||
|
||
terraform_backend_role_stage: root | ||
|
||
kubeconfig_profile_environment: gbl |
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
4 changes: 3 additions & 1 deletion
4
example/config/ue2-globals.yaml → example/stacks/ue2-globals.yaml
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,3 +1,5 @@ | ||
namespace: eg | ||
region: us-east-2 | ||
|
||
environment: ue2 | ||
|
||
account_id: "" |
10 changes: 8 additions & 2 deletions
10
example/config/ue2-prod.yaml → example/stacks/ue2-prod.yaml
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,20 +1,26 @@ | ||
projects: | ||
import: | ||
- globals | ||
- ue2-globals | ||
|
||
components: | ||
globals: | ||
stage: prod | ||
|
||
terraform: | ||
vpc: | ||
terraform_backend_assume_role: true | ||
vars: | ||
cidr_block: "10.102.0.0/18" | ||
# ... | ||
|
||
eks: | ||
terraform_backend_assume_role: true | ||
command: "/usr/bin/terraform-0.13" | ||
vars: | ||
cluster_kubernetes_version: "1.17" | ||
# ... | ||
|
||
helmfile: | ||
ingress-nginx: | ||
nginx-ingress: | ||
vars: | ||
installed: true |
10 changes: 8 additions & 2 deletions
10
example/config/ue2-staging.yaml → example/stacks/ue2-staging.yaml
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,20 +1,26 @@ | ||
projects: | ||
import: | ||
- globals | ||
- ue2-globals | ||
|
||
components: | ||
globals: | ||
stage: staging | ||
|
||
terraform: | ||
vpc: | ||
terraform_backend_assume_role: true | ||
vars: | ||
cidr_block: "10.104.0.0/18" | ||
# ... | ||
|
||
eks: | ||
command: "/usr/bin/terraform-0.13" | ||
terraform_backend_assume_role: true | ||
vars: | ||
cluster_kubernetes_version: "1.17" | ||
# ... | ||
|
||
helmfile: | ||
ingress-nginx: | ||
nginx-ingress: | ||
vars: | ||
installed: true |
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,29 @@ | ||
workflows: | ||
deploy-all: | ||
description: Deploy terraform project and helmfiles for a stack (provided as a command-line argument) | ||
steps: | ||
- job: terraform deploy vpc | ||
- job: terraform deploy eks | ||
- job: helmfile deploy nginx-ingress | ||
|
||
plan-all: | ||
description: Run 'terraform plan' and 'helmfile diff' on all components | ||
steps: | ||
- job: terraform plan vpc | ||
stack: ue2-dev | ||
- job: terraform plan eks | ||
stack: ue2-dev | ||
- job: helmfile diff nginx-ingress | ||
stack: ue2-dev | ||
- job: terraform plan vpc | ||
stack: ue2-staging | ||
- job: terraform plan eks | ||
stack: ue2-staging | ||
- job: helmfile diff nginx-ingress | ||
stack: ue2-staging | ||
- job: terraform plan vpc | ||
stack: ue2-prod | ||
- job: terraform plan eks | ||
stack: ue2-prod | ||
- job: helmfile diff nginx-ingress | ||
stack: ue2-prod |
Oops, something went wrong.