Add CLI flags to `atmos terraform` commands to control processing the templates and YAML functions in Atmos stack manifests @aknysh (#1157)
what
- Add CLI flags to
atmos terraform
commands to control processing (enable/disable) the templates and YAML functions in Atmos stack manifests - Add unit tests
- Update docs
why
Flag | Description | Alias | Required |
---|---|---|---|
--process-templates
| Enable/disable Go template processing in Atmos stack manifests when executing terraform commands. atmos terraform plan <component> -s <stack> --process-templates=false .If the flag is not passed, template procesing is enabled by default. | no | |
--process-functions
| Enable/disable YAML functions processing in Atmos stack manifests when executing terraform commands. atmos terraform apply <component> -s <stack> --process-functions=false If the flag is not passed, functions procesing is enabled by default. | no | |
--skip
| Skip processing a specific Atmos YAML function in Atmos stacks manifests when executing terraform commands. To specify more than one function, use multiple --skip flags, or separate the functions with a comma:atmos terraform plan <component> -s <stack> --skip=eval --skip=include atmos terraform apply <component> -s <stack> --skip=terraform.output,include
| no |
add `terraform plan-diff` command @mcalhoun (#1144)
what
- Create a new command that shows what has changed between two plan files
why
- Helps validate that an "approved plan" hasn't changed prior to deployment
example output
Diff Output
===========
Variables:
----------
~ location: Stockholm => New Jersey
Resources:
-----------
data.http.weather
~ id: https://wttr.in/Stockholm?0&format=&lang=se&u=m => https://wttr.in/New+Jersey?0&format=&lang=se&u=m
~ url: https://wttr.in/Stockholm?0&format=&lang=se&u=m => https://wttr.in/New+Jersey?0&format=&lang=se&u=m
~ response_body: Weather report: Stockholm
\ / Partly cloudy
_ /"".-. -1(-4) °C
\_( ). ↓ 8 km/h
/(___(__) 10 km
0.0 mm
=> Weather report: New+Jersey
Overcast
.--. +8(4) °C
.-( ). ↙ 22 km/h
(___.__)__) 16 km
0.0 mm
~ response_headers: {
~ Content-Length: 350 => 304
~ Date: Thu, 13 Mar 2025 19:28:58 GMT => Thu, 13 Mar 2025 19:29:17 GMT
}
~ body: Weather report: Stockholm
\ / Partly cloudy
_ /"".-. -1(-4) °C
\_( ). ↓ 8 km/h
/(___(__) 10 km
0.0 mm
=> Weather report: New+Jersey
Overcast
.--. +8(4) °C
.-( ). ↙ 22 km/h
(___.__)__) 16 km
0.0 mm
local_file.cache
~ content: Weather report: Stockholm
\ / Partly cloudy
_ /"".-. -1(-4) °C
\_( ). ↓ 8 km/h
/(___(__) 10 km
0.0 mm
=> Weather report: New+Jersey
Overcast
.--. +8(4) °C
.-( ). ↙ 22 km/h
(___.__)__) 16 km
0.0 mm
Outputs:
--------
~ url: https://wttr.in/Stockholm?0&format=&lang=se&u=m => https://wttr.in/New+Jersey?0&format=&lang=se&u=m
~ weather: Weather report: Stockholm
\ / Partly cloudy
_ /"".-. -1(-4) °C
\_( ). ↓ 8 km/h
/(___(__) 10 km
0.0 mm
=> Weather report: New+Jersey
Overcast
.--. +8(4) °C
.-( ). ↙ 22 km/h
(___.__)__) 16 km
0.0 mm
~ location: Stockholm => (sensitive value)
Google secret manager store implementation @shirkevich (#1034)
what
- Added Google Secret Manager (GSM) support as a new store type in Atmos
- Implemented two type identifiers:
google-secret-manager
and its aliasgsm
- Added comprehensive documentation for GSM configuration and usage
- Added test coverage for GSM store implementation
why
- Expands Atmos' store capabilities to support Google Cloud Platform users
- Provides a secure way to manage secrets in GCP environments
references
- Related GCP documentation:
Fix snapshots extra slashes @haitham911 (#1148)
what
- Improved collapseExtraSlashes to normalize URLs by collapsing redundant slashes while preserving http:// and https:// structure.
- Remove
base_path
empty value from atmos.yaml
why
- Ensures valid URL formatting
Add integration tests for templates in Atmos stack manifests @aknysh (#1142)
what
- Add integration/acceptance tests for templates in Atmos stack manifests
- Add unit tests
why
- Ensure the Go templates are evaluated in all Atmos sections
- Ensure the Go templates are evaluated when executing
atmos terraform generate backend
andatmos terraform init
commands - Increase
Codecov
test coverage
Lint check for dogsleds and duplicated code @osterman (#1140)
What
- Raise errors on dogsledding:
_, _, isActive, err := getUserData() // Too many unused return values
- Raise errors on duplicate code
Why
- Too many return values; should use structs.
- Identifies repeated logic that should be refactored.
Change the level and severity of `function-result-limit` @osterman (#1138)
what
- Change severity from error to warning
- Increase limit to 3 from 2
why
- 2 is a bit extreme, many functions return 3-4 arguments.
- 3 return arguments is still intelligible (according to @osterman) ;)
- We should set the guidelines but not enforce it yet as an error since many existing functions return way more than this
Use official `golangci` action together with CodeQL @osterman (#1137)
What
- Replace reviewdog with the official
golangci-lint-action
due to challenges in limiting reports to modified lines usingfilter-mode
. - Output in SARIF format and upload results to GitHub CodeQL for enhanced analysis.
Why
- Achieve better control over which linting issues cause check failures.
- Utilize CodeQL's UI for improved lint review capabilities, including inline annotations and the ability to dismiss findings.
- Enable status checks for linting to be based on CodeQL analysis results, streamlining the workflow.
references
Improve `yq` utils to handle nil config pointers @Cerebrovinny (#1155)
what
- Added handling for nil configuration pointers in the YQ expression evaluation utilities.
why
- When
atmosConfig
is passed as nil toEvaluateYqExpression()
, it would panic with a nil pointer dereference when trying to accessatmosConfig.Logs.Level
. This happens in scenarios where the configuration hasn't been loaded yet or when the function is called from contexts where configuration isn't available.
Update atmos schema @samtholiya (#1123)
what
- We are updating the schema to support dynamic structures. So schemas can support the following schema:
# atmos.yaml
# Validation schemas (for validating atmos stacks and components)
schemas:
# JSON Schema to validate Atmos manifests
atmos: # for backward compatibility
# Can also be set using 'ATMOS_SCHEMAS_ATMOS_MANIFEST' ENV var, or '--schemas-atmos-manifest' command-line arguments
# Supports both absolute and relative paths (relative to the `base_path` setting in `atmos.yaml`)
manifest: "stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json"
stacks:
match:
- stacks/***/**.{yml,yaml}
schema: https://...
config:
match:
- atmos.{yml,yaml}
- atmos.d/***/**.{yml,yaml}
schema: ...
vendor:
match:
- vendor.{yml,yaml}
- vendor.d/***/**.{yml,yaml}
mycustomschema:
match:
- tests/test-cases/**.yaml
schema:
- tests/test-cases/schema.json
gha:
match:
- .github/workflows/*.{yml,yaml}
schema: https://json.schemastore.org/github-workflow.json
anotherschema:
match:
- ...
schema: {
... inline JSON schema
}
why
- We are trying to make our schema validation to extend so that we can validate all the yaml using the schemas provided by the user. This requires some update in atoms configuration. It is better to have this change as a separate pr to reduce the complexity of reviewing.
Fix OCI Tests & Vendoring @haitham911 (#1093)
what
- Ensure atmos exits non-zero when vendoring from OCI fails
- Inject GitHub token on requests to
ghcr.io
- Do not
.gitignore
generated files intest/fixtures
because then we cannot delete untracked files (regression) - Do not commit files vendored in tests (e.g.
tests/fixtures/scenarios/vendor/test-components/
) - Support
tar+gz
OCI artifacts - Respect the
artifact-type: application/vnd.atmos.component.terraform.v1+tar+gzip
- Check that files are actually vendored
- Support backward compatibility
tar
artifacts - Use OCI fixtures managed by atmos for testing
why
- We accidentally deleted the OCI repo that was used for testing fixtures
- The OCI implementation was incomplete, lacking an vendor specific artifact-type
- Files were not checked for OCI vendoring
Fork `go-homedir` into Atmos @haitham911 (#1139)
what
- Forked mitchellh/go-homedir into the Atmos organization.
- Added a LICENSE file to ensure compliance with the original repository's licensing terms.
- Created an ATTRIBUTIONS.md file to credit the original author.
- Updated references in Atmos to use the new forked repository instead of the original
why
- Homedir is abandoned https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc
- Ensures maintainability and control over the
go-homedir
package within the Atmos