Skip to content

Commit 0900bb4

Browse files
Update to use latest stacks and components features. Add static backend type. Improve examples and tests (#39)
* Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Updates for new `terraform-provider-utils` * Auto Format Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
1 parent a03b604 commit 0900bb4

71 files changed

Lines changed: 491 additions & 319 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/auto-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ version-resolver:
1717
- 'bugfix'
1818
- 'bug'
1919
- 'hotfix'
20+
- 'no-release'
2021
default: 'minor'
2122

2223
categories:

.github/workflows/auto-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ jobs:
1818
github_token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
1919
# Drafts your next Release notes as Pull Requests are merged into "main"
2020
- uses: release-drafter/release-drafter@v5
21-
if: "!contains(steps.get-merged-pull-request.outputs.labels, 'no-release')"
2221
with:
23-
publish: true
22+
publish: ${{ !contains(steps.get-merged-pull-request.outputs.labels, 'no-release') }}
2423
prerelease: false
2524
config-name: auto-release.yml
2625
env:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,13 @@ Available targets:
346346
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
347347
| <a name="requirement_external"></a> [external](#requirement\_external) | >= 2.0 |
348348
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.3 |
349-
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.14.0 |
349+
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.16.0 |
350350

351351
## Providers
352352

353353
| Name | Version |
354354
|------|---------|
355-
| <a name="provider_utils"></a> [utils](#provider\_utils) | >= 0.14.0 |
355+
| <a name="provider_utils"></a> [utils](#provider\_utils) | >= 0.16.0 |
356356

357357
## Modules
358358

docs/terraform.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
77
| <a name="requirement_external"></a> [external](#requirement\_external) | >= 2.0 |
88
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.3 |
9-
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.14.0 |
9+
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.16.0 |
1010

1111
## Providers
1212

1313
| Name | Version |
1414
|------|---------|
15-
| <a name="provider_utils"></a> [utils](#provider\_utils) | >= 0.14.0 |
15+
| <a name="provider_utils"></a> [utils](#provider\_utils) | >= 0.16.0 |
1616

1717
## Modules
1818

examples/complete/main.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ module "vars" {
1212
module "backend" {
1313
source = "../../modules/backend"
1414

15-
stack_config_local_path = var.stack_config_local_path
16-
stack = var.stack
17-
component_type = var.component_type
18-
component = var.component
15+
stack = var.stack
16+
component = var.component
1917

2018
context = module.this.context
2119
}

examples/complete/outputs.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ output "backend" {
1313
description = "Backend configuration for the component"
1414
}
1515

16-
output "base_component" {
17-
value = module.backend.base_component
18-
description = "Base component name"
19-
}
20-
2116
output "settings" {
2217
value = module.settings.settings
2318
description = "Settings for the component"

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ terraform {
1212
}
1313
utils = {
1414
source = "cloudposse/utils"
15-
version = ">= 0.14.0"
15+
version = ">= 0.16.0"
1616
}
1717
}
1818
}

examples/remote-state/atmos.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# CLI config is loaded from the following locations (from lowest to highest priority):
2+
# system dir (`/usr/local/etc/atmos` on Linux, `%LOCALAPPDATA%/atmos` on Windows)
3+
# home dir (~/.atmos)
4+
# current directory
5+
# ENV vars
6+
# Command-line arguments
7+
#
8+
# It supports POSIX-style Globs for file names/paths (double-star `**` is supported)
9+
# https://en.wikipedia.org/wiki/Glob_(programming)
10+
11+
components:
12+
terraform:
13+
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_BASE_PATH` ENV var, or `--terraform-dir` command-line argument
14+
# Supports both absolute and relative paths
15+
base_path: "./components/terraform"
16+
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_APPLY_AUTO_APPROVE` ENV var
17+
apply_auto_approve: false
18+
# Can also be set using `ATMOS_COMPONENTS_TERRAFORM_DEPLOY_RUN_INIT` ENV var, or `--deploy-run-init` command-line argument
19+
deploy_run_init: true
20+
helmfile:
21+
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_BASE_PATH` ENV var, or `--helmfile-dir` command-line argument
22+
# Supports both absolute and relative paths
23+
base_path: "./components/helmfile"
24+
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH` ENV var
25+
kubeconfig_path: "/dev/shm"
26+
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_HELM_AWS_PROFILE_PATTERN` ENV var
27+
helm_aws_profile_pattern: "{namespace}-{tenant}-gbl-{stage}-helm"
28+
# Can also be set using `ATMOS_COMPONENTS_HELMFILE_CLUSTER_NAME_PATTERN` ENV var
29+
cluster_name_pattern: "{namespace}-{tenant}-{environment}-{stage}-eks-cluster"
30+
31+
stacks:
32+
# Can also be set using `ATMOS_STACKS_BASE_PATH` ENV var, or `--config-dir` and `--stacks-dir` command-line arguments
33+
# Supports both absolute and relative paths
34+
base_path: "./stacks"
35+
# Can also be set using `ATMOS_STACKS_INCLUDED_PATHS` ENV var (comma-separated values string)
36+
included_paths:
37+
- "**/*"
38+
# Can also be set using `ATMOS_STACKS_EXCLUDED_PATHS` ENV var (comma-separated values string)
39+
excluded_paths:
40+
- "globals/**/*"
41+
- "catalog/**/*"
42+
- "**/*globals*"
43+
# Can also be set using `ATMOS_STACKS_NAME_PATTERN` ENV var
44+
name_pattern: "{tenant}-{environment}-{stage}"
45+
46+
logs:
47+
verbose: false
48+
colors: true
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
enabled = true
2-
3-
stack_config_local_path = "./stacks"
4-
5-
stack = "my-stack"

examples/remote-state/main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
module "remote_state_my_vpc" {
1+
module "remote_state_using_stack" {
22
source = "../../modules/remote-state"
33

4-
stack_config_local_path = var.stack_config_local_path
5-
stack = var.stack
6-
component = "my-vpc"
4+
component = "test/test-component-override"
5+
stack = "tenant1-ue2-dev"
76

87
context = module.this.context
98
}
109

11-
module "remote_state_eks" {
10+
module "remote_state_using_context" {
1211
source = "../../modules/remote-state"
1312

14-
stack_config_local_path = var.stack_config_local_path
15-
stack = var.stack
16-
component = "eks"
13+
component = "test/test-component-override"
14+
tenant = "tenant1"
15+
environment = "ue2"
16+
stage = "dev"
1717

1818
context = module.this.context
1919
}

0 commit comments

Comments
 (0)