-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
spacelift
module and example (#42)
* Update `spacelift` module * Update `spacelift` module
- Loading branch information
Showing
52 changed files
with
453 additions
and
773 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
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ terraform { | |
} | ||
utils = { | ||
source = "cloudposse/utils" | ||
version = ">= 0.17.0" | ||
version = ">= 0.17.4" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ terraform { | |
} | ||
utils = { | ||
source = "cloudposse/utils" | ||
version = ">= 0.17.0" | ||
version = ">= 0.17.4" | ||
} | ||
} | ||
} |
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,50 @@ | ||
# CLI config is loaded from the following locations (from lowest to highest priority): | ||
# system dir (`/usr/local/etc/atmos` on Linux, `%LOCALAPPDATA%/atmos` on Windows) | ||
# home dir (~/.atmos) | ||
# current directory | ||
# ENV vars | ||
# Command-line arguments | ||
# | ||
# It supports POSIX-style Globs for file names/paths (double-star `**` is supported) | ||
# https://en.wikipedia.org/wiki/Glob_(programming) | ||
|
||
components: | ||
terraform: | ||
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_BASE_PATH` ENV var, or `--terraform-dir` command-line argument | ||
# Supports both absolute and relative paths | ||
base_path: "./components/terraform" | ||
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_APPLY_AUTO_APPROVE` ENV var | ||
apply_auto_approve: false | ||
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_DEPLOY_RUN_INIT` ENV var, or `--deploy-run-init` command-line argument | ||
deploy_run_init: true | ||
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_AUTO_GENERATE_BACKEND_FILE` ENV var, or `--auto-generate-backend-file` command-line argument | ||
auto_generate_backend_file: false | ||
helmfile: | ||
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_BASE_PATH` ENV var, or `--helmfile-dir` command-line argument | ||
# Supports both absolute and relative paths | ||
base_path: "./components/helmfile" | ||
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH` ENV var | ||
kubeconfig_path: "/dev/shm" | ||
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_HELM_AWS_PROFILE_PATTERN` ENV var | ||
helm_aws_profile_pattern: "{namespace}-{tenant}-gbl-{stage}-helm" | ||
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_CLUSTER_NAME_PATTERN` ENV var | ||
cluster_name_pattern: "{namespace}-{tenant}-{environment}-{stage}-eks-cluster" | ||
|
||
stacks: | ||
# Can also be set using `ATMOS_STACKS_BASE_PATH` ENV var, or `--config-dir` and `--stacks-dir` command-line arguments | ||
# Supports both absolute and relative paths | ||
base_path: "./stacks" | ||
# Can also be set using `ATMOS_STACKS_INCLUDED_PATHS` ENV var (comma-separated values string) | ||
included_paths: | ||
- "**/*" | ||
# Can also be set using `ATMOS_STACKS_EXCLUDED_PATHS` ENV var (comma-separated values string) | ||
excluded_paths: | ||
- "globals/**/*" | ||
- "catalog/**/*" | ||
- "**/*globals*" | ||
# Can also be set using `ATMOS_STACKS_NAME_PATTERN` ENV var | ||
name_pattern: "{tenant}-{environment}-{stage}" | ||
|
||
logs: | ||
verbose: false | ||
colors: 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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
components: | ||
helmfile: | ||
echo-server: | ||
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,5 @@ | ||
components: | ||
helmfile: | ||
"infra/infra-server": | ||
vars: | ||
installed: true |
13 changes: 13 additions & 0 deletions
13
examples/spacelift/stacks/catalog/terraform/services/service-1-override.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
components: | ||
terraform: | ||
"test/test-component-override": | ||
vars: | ||
service_1_name: "service-1-override" | ||
service_1_map: | ||
a: 1 | ||
b: 2 | ||
c: 3 | ||
service_1_list: | ||
- 1 | ||
- 2 | ||
- 3 |
5 changes: 5 additions & 0 deletions
5
examples/spacelift/stacks/catalog/terraform/services/service-1.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
components: | ||
terraform: | ||
"test/test-component": | ||
vars: | ||
service_1_name: "service-1" |
13 changes: 13 additions & 0 deletions
13
examples/spacelift/stacks/catalog/terraform/services/service-2-override.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
components: | ||
terraform: | ||
"test/test-component-override": | ||
vars: | ||
service_2_name: "service-2-override" | ||
service_2_map: | ||
a: 1 | ||
b: 2 | ||
c: 3 | ||
service_2_list: | ||
- 1 | ||
- 2 | ||
- 3 |
5 changes: 5 additions & 0 deletions
5
examples/spacelift/stacks/catalog/terraform/services/service-2.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
components: | ||
terraform: | ||
"test/test-component": | ||
vars: | ||
service_2_name: "service-2" |
5 changes: 5 additions & 0 deletions
5
examples/spacelift/stacks/catalog/terraform/services/top-level-service-1.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
components: | ||
terraform: | ||
top-level-component1: | ||
vars: | ||
service_1_name: "top-level-service-1" |
5 changes: 5 additions & 0 deletions
5
examples/spacelift/stacks/catalog/terraform/services/top-level-service-2.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
components: | ||
terraform: | ||
top-level-component1: | ||
vars: | ||
service_2_name: "top-level-service-2" |
5 changes: 5 additions & 0 deletions
5
examples/spacelift/stacks/catalog/terraform/tenant1-ue2-dev.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
components: | ||
terraform: | ||
"test/test-component-override": | ||
vars: | ||
service_1_name: "service-1-override-2" |
26 changes: 26 additions & 0 deletions
26
examples/spacelift/stacks/catalog/terraform/test-component-override.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# `import` supports POSIX-style Globs for file names/paths (double-star `**` is supported) | ||
# https://en.wikipedia.org/wiki/Glob_(programming) | ||
# https://pkg.go.dev/gopkg.in/godo.v2/glob | ||
# https://github.com/bmatcuk/doublestar | ||
# File extensions are optional (if not specified, `.yaml` is used by default) | ||
import: | ||
- catalog/terraform/services/service-?-override.* | ||
|
||
components: | ||
terraform: | ||
"test/test-component-override": | ||
# Specify terraform binary to run | ||
command: "/usr/local/bin/terraform" | ||
# By using `component` attribute, `test-component-override` inherits from `test-component` and can override its variables | ||
# In this example, variables for each service are overridden in `catalog/services/service-?-override.*` | ||
component: "test/test-component" | ||
# Other variables can be overridden here | ||
vars: {} | ||
# Override remote state backend for this component | ||
remote_state_backend_type: static # s3, remote, vault, static, etc. | ||
remote_state_backend: | ||
static: | ||
val1: true | ||
val2: "2" | ||
val3: 3 | ||
val4: null |
22 changes: 22 additions & 0 deletions
22
examples/spacelift/stacks/catalog/terraform/test-component.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# `import` supports POSIX-style Globs for file names/paths (double-star `**` is supported) | ||
# https://en.wikipedia.org/wiki/Glob_(programming) | ||
# https://pkg.go.dev/gopkg.in/godo.v2/glob | ||
# https://github.com/bmatcuk/doublestar | ||
# File extensions are optional (if not specified, `.yaml` is used by default) | ||
import: | ||
- catalog/terraform/services/service-?.* | ||
|
||
components: | ||
terraform: | ||
"test/test-component": | ||
backend: | ||
s3: | ||
workspace_key_prefix: test-test-component | ||
remote_state_backend: | ||
s3: | ||
workspace_key_prefix: test-test-component | ||
settings: | ||
spacelift: | ||
workspace_enabled: true | ||
vars: | ||
enabled: true |
22 changes: 22 additions & 0 deletions
22
examples/spacelift/stacks/catalog/terraform/top-level-component1.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# `import` supports POSIX-style Globs for file names/paths (double-star `**` is supported) | ||
# https://en.wikipedia.org/wiki/Glob_(programming) | ||
# https://pkg.go.dev/gopkg.in/godo.v2/glob | ||
# https://github.com/bmatcuk/doublestar | ||
# File extensions are optional (if not specified, `.yaml` is used by default) | ||
import: | ||
- catalog/terraform/services/top-level-service-?.* | ||
|
||
components: | ||
terraform: | ||
top-level-component1: | ||
backend: | ||
s3: | ||
workspace_key_prefix: top-level-component1 | ||
remote_state_backend: | ||
s3: | ||
workspace_key_prefix: top-level-component1 | ||
settings: | ||
spacelift: | ||
workspace_enabled: true | ||
vars: | ||
enabled: 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,19 @@ | ||
components: | ||
terraform: | ||
"infra/vpc": | ||
backend: | ||
s3: | ||
workspace_key_prefix: infra-vpc | ||
remote_state_backend: | ||
s3: | ||
workspace_key_prefix: infra-vpc | ||
settings: | ||
spacelift: | ||
workspace_enabled: true | ||
vars: | ||
enabled: true | ||
name: "common" | ||
subnet_type_tag_key: eg.io/subnet/type | ||
nat_gateway_enabled: true | ||
nat_instance_enabled: false | ||
max_subnet_count: 3 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.