PePe Amengual
08/06/2025, 10:57 PMatmos describe affected --include-settings=false --include-dependents=true --stack=dev-wus3 --logs-level=Debug will include process all stacks. include-dependents is not respecting the --stack optionAndriy Knysh (Cloud Posse)
08/06/2025, 11:06 PMPePe Amengual
08/06/2025, 11:23 PMAndriy Knysh (Cloud Posse)
08/06/2025, 11:55 PMGabriela Campana (Cloud Posse)
08/07/2025, 12:13 AMEd
08/13/2025, 4:02 PMEd
08/13/2025, 4:03 PMAndriy Knysh (Cloud Posse)
08/13/2025, 4:03 PMEd
08/13/2025, 4:16 PMAndriy Knysh (Cloud Posse)
08/13/2025, 7:05 PMdescribe affected does not execute terraform init (nor other terraform commands) - it works with the stack manifests (from two diff commits or branches) and compares the stack configs from bothAndriy Knysh (Cloud Posse)
08/13/2025, 7:06 PMterraform init is executedAndriy Knysh (Cloud Posse)
08/13/2025, 7:08 PM!terraform.outputAndriy Knysh (Cloud Posse)
08/13/2025, 7:09 PMAndriy Knysh (Cloud Posse)
08/13/2025, 7:10 PM!terraform.output will execute terraform initAndriy Knysh (Cloud Posse)
08/13/2025, 7:12 PM!terraform.state will not since it reads directly from the state storage (s3 bucket for AWS)Andriy Knysh (Cloud Posse)
08/13/2025, 7:12 PMAndriy Knysh (Cloud Posse)
08/13/2025, 7:13 PMAndriy Knysh (Cloud Posse)
08/13/2025, 7:13 PMdescribe affected, you can use these flags
--process-templates
Enable/disable processing of all Go templates in Atmos stacks manifests when executing the command. If the flag is not provided, it's set to true by default.
atmos describe affected --process-templates=false
--process-functions
Enable/disable processing of all Atmos YAML functions in Atmos stacks manifests when executing the command. If the flag is not provided, it's set to true by default.
atmos describe affected --process-functions=falseAndriy Knysh (Cloud Posse)
08/13/2025, 7:13 PMAndriy Knysh (Cloud Posse)
08/13/2025, 7:14 PMdescribe affectedEd
08/13/2025, 7:42 PM$ atmos describe affected --logs-level=Debug --repo-path base-ref/ --include-settings=true --include-dependents=true --process-functions=false --process-templates=false
Leads to the following logs:
DEBU Set logs-level=debug logs-file=/dev/stderr
DEBU Atmos JSON Schema is not configured. Using the default embedded schema
DEBU Validating all YAML files in the folder and all subfolders (excluding template files) folder=stacks
DEBU Current HEAD="aa58502e43011913d5fa7439b041b8493bcca4d2 refs/heads/main"
DEBU Current BASE="27356168dbf0622eca8ba9290215351f37e0a5b7 HEAD"
...
DEBU Finding difference between the current working branch and remote target branch
DEBU Found difference between the current working branch and remote target branch
DEBU Changed
files=
│ .github/workflows/affected-stacks.yml | 3 +--
DEBU ProcessTmplWithDatasources template=describe-stacks-all-sections
DEBU ProcessTmplWithDatasources template=describe-stacks-all-sections evaluation=1
DEBU Executing template function function="atmos.Component(blob, test-default-dev)"
DEBU Found component 'blob' in the stack 'test-default-dev' in the stack manifest 'orgs/test/test-default-dev'
DEBU ProcessTmplWithDatasources template=templates-all-atmos-sections
DEBU ProcessTmplWithDatasources template=templates-all-atmos-sections evaluation=1
DEBU ProcessTmplWithDatasources: processed template=templates-all-atmos-sections
DEBU Writing backend config file=components/terraform/blob/backend.tf.json
DEBU Wrote backend config file=components/terraform/blob/backend.tf.json
DEBU Writing provider overrides file=components/terraform/blob/providers_override.tf.json
DEBU Wrote provider overrides file=components/terraform/blob/providers_override.tf.json
DEBU Terraform environment file not found. No action needed. file=components/terraform/blob/.terraform/environment
DEBU Executing terraform command="terraform init blob -s test-default-dev" component=blob stack=test-default-dev
As is apparent in the logs, my stackfile does contain atmos.Component(...) so is that the cause of the issue? Is there a flag which would prevent this from evaluating? All I want to do is generate a stack dependency JSON (i.e. just looking at the stacks and their depends_on settings)Andriy Knysh (Cloud Posse)
08/13/2025, 7:45 PMatmos.Component(...) executes terraform init and other terraform commandsAndriy Knysh (Cloud Posse)
08/13/2025, 7:46 PM--process-templates=false was suppossed to disable executing templates and template functions, which it apparently does not do anymore - prob related to the similar issue that @PePe Amengual pointed outAndriy Knysh (Cloud Posse)
08/13/2025, 7:47 PMAndriy Knysh (Cloud Posse)
08/13/2025, 7:49 PMinclude-dependents is not respecting the --stack option, will review --process-templates=false as wellAndriy Knysh (Cloud Posse)
08/13/2025, 7:50 PMEd
08/13/2025, 7:51 PMEd
08/19/2025, 7:29 AMAndriy Knysh (Cloud Posse)
08/19/2025, 1:49 PMAndriy Knysh (Cloud Posse)
08/19/2025, 1:49 PMAndriy Knysh (Cloud Posse)
08/19/2025, 1:51 PMEd
08/19/2025, 7:17 PM--upload flag. From the atmos codebase I can see this is equivalent to:
atmos describe affected ... --include-dependents=true --include-settings=true
In total, the command I'm running is:
atmos describe affected --pager=off --verbose=true --repo-path base-ref/ --include-dependents=true --include-settings=true --process-functions=false
In spite of the process-functions flag I see that, as in the logs I shared above, the atmos.Component(...) is executed:
DEBU Executing template function function="atmos.Component(web_application_firewall_policy, test-default-dev)"
The same happens if I pass --stack=test-default-dev and this is breaking for my use case.
I don't know if this really helps, but here is my `atmos.yaml`:
base_path: "./"
components:
terraform:
command: "terraform"
base_path: "components/terraform"
apply_auto_approve: false
deploy_run_init: true
init_run_reconfigure: true
auto_generate_backend_file: true
stacks:
base_path: "stacks"
included_paths:
- "orgs/**/*"
excluded_paths:
- "**/_defaults.yaml"
name_pattern: "{tenant}-{namespace}-{stage}"
logs:
file: "/dev/stderr"
level: Info
workflows:
base_path: "workflows/"
templates:
settings:
enabled: true
integrations:
github:
gitops:
terraform-version: 1.9.8
infracost-enabled: false
matrix:
sort-by: .stack_slug
group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-")
I'm on atmos v1.186.0 on linux/amd64Andriy Knysh (Cloud Posse)
08/19/2025, 7:41 PMEd
08/19/2025, 7:58 PMEd
08/19/2025, 8:20 PMdescribe affected command executes this method:
// Execute executes `describe affected` command.
func (d *describeAffectedExec) Execute(a *DescribeAffectedCmdArgs) error {
var affected []schema.Affected
var headHead, baseHead *plumbing.Reference
var repoUrl string
var err error
...
Which has a switch for repo/clone etc. These function calls respect the DescribeAffectedCmdArgs
After that we hit the addDependentsToAffected method:
// Add dependent components and stacks for each affected component
if len(affected) > 0 && a.IncludeDependents {
err = d.addDependentsToAffected(a.CLIConfig, &affected, a.IncludeSettings)
if err != nil {
return err
}
}
Which does not pass the e.g. ProcessYamlFunctions
Ultimately this calls ExecuteDescribeStacks which has the process yaml functions arg hardcoded to true (see code):
stacks, err := ExecuteDescribeStacks(atmosConfig, "", nil, nil, nil, false, true, true, false, nil)
if err != nil {
return nil, err
}
Below is the function signature:
func ExecuteDescribeStacks(
atmosConfig *schema.AtmosConfiguration,
filterByStack string,
components []string,
componentTypes []string,
sections []string,
ignoreMissingFiles bool,
processTemplates bool,
processYamlFunctions bool,
includeEmptyStacks bool,
skip []string,
) (map[string]any, error)PePe Amengual
08/19/2025, 8:20 PMDownload action repository 'cloudposse/github-action-atmos-affected-stacks@e6a7d6ed50b769266e2356dc96d5bd1db8bd5350' (SHA:e6a7d6ed50b769266e2356dc96d5bd1db8bd5350)
Setup atmos version spec 1.186.0
Attempting to download 1.186.0...
Run base_cmd="atmos describe affected --include-settings=false --file affected-stacks.json --repo-path \"$GITHUB_WORKSPACE/base-ref\""
base_cmd="atmos describe affected --include-settings=false --file affected-stacks.json --repo-path \"$GITHUB_WORKSPACE/base-ref\""
if [[ "false" == "true" ]]; then
base_cmd+=" --include-spacelift-admin-stacks=true"
elif [[ "true" == "true" ]]; then
base_cmd+=" --include-dependents=true"
fi
if [[ -n "dev-wus3" ]]; then
base_cmd+=" --stack=dev-wus3"
fi
if [[ "false" == "true" ]]; then
base_cmd+=" --skip=terraform.output"
fi
if [[ "true" == "false" ]]; then
base_cmd+=" --process-templates=false"
fi
if [[ "true" == "false" ]]; then
base_cmd+=" --process-functions=false"
fi
eval "$base_cmd"
affected=$(jq -c '.' affected-stacks.json)
printf "%s" "affected=$affected" >> $GITHUB_OUTPUT
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
ATMOS_CLI_CONFIG_PATH: /runner/_work/pepe-iac/pepe-iac/config
ATMOS_BASE_PATH: ./
ATMOS_VERSION: 1.186.0
ARM_USE_OIDC: true
ENVIRONMENT: DEV
ARM_CLIENT_ID: ***
ARM_SUBSCRIPTION_ID: ***
ARM_TENANT_ID: ***
✗ Fetching api_management_identity output from apimanagement/be in prod-wus3
# Error
failed to execute terraform output for the component apimanagement/be in the stack prod-wus3. Error: exit status 1
Error: retrieving Storage Account (Subscription: "***" Resource Group Name: "prod-wus3-tfstate-rg" Storage Account Name: "prodwus3tfstatestvaom"): unexpected status 404 (404 Not Found) with error: ResourceGroupNotFound: Resource group 'prod-wus3-tfstate-rg' could not be found.Andriy Knysh (Cloud Posse)
08/19/2025, 8:31 PM--include-dependents - we'll fix itAndriy Knysh (Cloud Posse)
08/19/2025, 8:31 PMPePe Amengual
08/19/2025, 8:32 PMEd
08/19/2025, 8:36 PMprovidedComponentSection, err := ExecuteDescribeComponent(component, stack, true, true, nil)
I've amended ExecuteDescribeDependents to accept two more args:
processTemplates bool,
processYamlFunctions bool,
Which I pass to ExecuteDescribeStacks and ExecuteDescribeComponent. Running this locally gives me exactly what I need. Do you want me to fix the tests and submit a PR or will you guys handle it internally? 🙂Andriy Knysh (Cloud Posse)
08/19/2025, 8:50 PMdesxcribe dependents needs the same flags as describe affected (including updating the docs) - we'll handle thatAndriy Knysh (Cloud Posse)
08/20/2025, 6:42 PM--include-dependents is specified for atmos describe affected.
Also added a flag --exclude-locked to atmos describe affected to explicitly exclude the locked components (metadata.locked: true).
Will be released in a day or twoPePe Amengual
08/20/2025, 6:42 PMEd
08/20/2025, 6:54 PMmetadata.locked. I was looking for something exactly like that today 🙂Andriy Knysh (Cloud Posse)
08/25/2025, 3:52 AMPePe Amengual
08/26/2025, 3:20 AMAcquiring v1.188.0 from https://github.com/cloudposse/atmos/releases/download/v1.188.0/atmos_1.188.0_linux_amd64
Renaming downloaded file...
Successfully renamed atmos from /runner/_work/_temp/76576576575 to /runner/_work/_actions/cloudposse/github-action-setup-atmos/atmos/atmos
Successfully installed atmos to /runner/_work/_actions/cloudposse/github-action-setup-atmos/atmos
Cached version v1.188.0 for x64 in /opt/hostedtoolcache/atmos/1.188.0/x64
Run base_cmd="atmos describe affected --include-settings=false --file affected-stacks.json --repo-path \"$GITHUB_WORKSPACE/base-ref\""
base_cmd="atmos describe affected --include-settings=false --file affected-stacks.json --repo-path \"$GITHUB_WORKSPACE/base-ref\""
if [[ "false" == "true" ]]; then
base_cmd+=" --include-spacelift-admin-stacks=true"
elif [[ "true" == "true" ]]; then
base_cmd+=" --include-dependents=true"
fi
if [[ -n "dev-wus3" ]]; then
base_cmd+=" --stack=dev-wus3"
fi
if [[ "false" == "true" ]]; then
base_cmd+=" --skip=terraform.output"
fi
if [[ "true" == "false" ]]; then
base_cmd+=" --process-templates=false"
fi
if [[ "true" == "false" ]]; then
base_cmd+=" --process-functions=false"
fi
eval "$base_cmd"
affected=$(jq -c '.' affected-stacks.json)
printf "%s" "affected=$affected" >> $GITHUB_OUTPUT
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
ATMOS_CLI_CONFIG_PATH: /runner/_work/pepe-iac/pepe-iac/config
ATMOS_BASE_PATH: ./
ATMOS_VERSION: 1.188.0
ARM_USE_OIDC: true
ENVIRONMENT: DEV
✓ Fetching storage_account_primary_web_hostname output from web-app-storage in dev-wus3
✓ Fetching .frontdoor_custom_domain_validation_tokens["dev.pepe.cloud"] output from frontdoor in dev-wus3
✓ Fetching api_management_identity output from apimanagement/be in dev-wus3
✗ Fetching api_management_identity output from apimanagement/be in sbox-wus3
# Error
failed to execute terraform output for the component apimanagement/be in the stack sbox-wus3. Error: exit status 1
Error: retrieving Storage Account (Subscription: "***" Resource Group Name: "sbox-wus3-tfstate-rg" Storage Account Name: "sboxwus3stateetc"): unexpected status 404 (404 Not Found) with error: ResourceGroupNotFound: Resource group 'sbox-wus3-tfstate-rg' could not be found.Andriy Knysh (Cloud Posse)
08/26/2025, 4:14 AMPePe Amengual
08/26/2025, 4:15 AMAndriy Knysh (Cloud Posse)
08/26/2025, 4:17 AMPePe Amengual
08/26/2025, 4:18 AMPePe Amengual
08/26/2025, 4:18 AMPePe Amengual
08/26/2025, 4:20 AMapimanagement/bePePe Amengual
08/26/2025, 4:20 AMsystem_managed_identity: !terraform.output apimanagement/be api_management_identityAndriy Knysh (Cloud Posse)
08/26/2025, 4:25 AMPePe Amengual
08/26/2025, 4:25 AMAndriy Knysh (Cloud Posse)
08/26/2025, 4:26 AMPePe Amengual
08/26/2025, 4:26 AMPePe Amengual
08/26/2025, 4:34 AMPePe Amengual
08/26/2025, 4:34 AMAndriy Knysh (Cloud Posse)
08/26/2025, 4:35 AMPePe Amengual
08/26/2025, 4:36 AMPePe Amengual
08/26/2025, 4:37 AMPePe Amengual
08/26/2025, 4:37 AMPePe Amengual
08/26/2025, 4:38 AMFetching api_management_identity output from apimanagement/be in sbox-wus3.....
in the output I sharedPePe Amengual
08/26/2025, 4:39 AMAndriy Knysh (Cloud Posse)
08/26/2025, 5:22 AMAndriy Knysh (Cloud Posse)
08/26/2025, 2:35 PMAndriy Knysh (Cloud Posse)
08/26/2025, 2:36 PMatmos describe affected --include-dependents, Atmos will process all components in ALL stacks to find the affected and then all component in all stacks to find the dependents of all affected componentsAndriy Knysh (Cloud Posse)
08/26/2025, 2:37 PMatmos describe affected --include-dependents --stack <stack>, Atmos will process all components in the provided stack to find the affected and then all component in ALL stacks to find the dependents of all affected componentsAndriy Knysh (Cloud Posse)
08/26/2025, 2:37 PMdescribe dependents, let's consider it (since it's easier to understand):Andriy Knysh (Cloud Posse)
08/26/2025, 2:39 PMatmos describe dependents component --stack stack - will find the dependents (from all stacks) of the provided component in the provided stackAndriy Knysh (Cloud Posse)
08/26/2025, 2:42 PM--stack), and it would work for your case, but the general case will be broken. Here's why:
if we make atmos describe dependents component --stack stack to search for dependents in the provided stack stack only, we'll never be able to specify to search for dependents in all stack.
So here we have two different 'stacks':
• The stack provided on the command line (to specify that the provided component is from that stack)
• And some new stack to filter the dependents byAndriy Knysh (Cloud Posse)
08/26/2025, 2:42 PM--dependents-stackAndriy Knysh (Cloud Posse)
08/26/2025, 2:44 PMatmos describe dependents component --stack stack - will find the dependents from ALL stacks for the specified component in the specified stack
atmos describe dependents component --stack stack --dependents-stack stack - will find the dependents in the stack stack onlt for the the specified component in the specified stackAndriy Knysh (Cloud Posse)
08/26/2025, 2:45 PMdescribe affectedAndriy Knysh (Cloud Posse)
08/26/2025, 2:47 PMatmos describe affected component --stack stack --include-dependents - will find the affected components from the specified stack and the dependents of the affected components from all stacks
atmos describe affected component --stack stack --include-dependents --dependents-stack stack - will find the affected components from the specified stack and the dependents of the affected components from the specified stack (this is your case)Andriy Knysh (Cloud Posse)
08/26/2025, 2:47 PMAndriy Knysh (Cloud Posse)
08/26/2025, 2:48 PM--dependents-stack flag to atmos describe affected and atmos describe dependents commands to filter the dependents by the provided stackPePe Amengual
08/26/2025, 4:17 PMGabriela Campana (Cloud Posse)
08/26/2025, 6:01 PMEd
09/02/2025, 6:05 PMmetadata.enabled: false field isn't always respected by the atmos describe affected command
To be more specific, I have something like this:
# stacks/catalog/federated_identity_credentials/defaults.yaml
components:
terraform:
federated_identity_credential:
settings:
depends_on:
"0":
component: "resource_group"
"1":
component: "user_assigned_identity"
"2":
component: "cross_tenant_application"
metadata:
component: federated_identity_credential
vars:
resource_group_name: "rg-{{ .vars.tenant }}-{{ .vars.namespace }}-{{ .vars.stage }}"
application_federated_identity_credentials:
container_app_identity:
application_name: "<blah>"
audiences: ["api://AzureADTokenExchange"]
display_name: "fic-container-app"
user_assigned_identity_name: "<blah>"
# stacks/orgs/example/example-default-dev.yaml
import:
- catalog/federated_identity_credentials/defaults
vars:
tenant: "example"
namespace: "default"
stage: "dev"
components:
terraform:
federated_identity_credentials:
metadata:
enabled: false
component: federated_identity_credentials
When I run atmos describe affected I pass --exclude-locked but I still see that federated_identity_credentials ends up being caught in the output JSON. I may have missed something here, but is that the expected behaviour?Andriy Knysh (Cloud Posse)
09/02/2025, 6:27 PMPePe Amengual
09/10/2025, 4:17 PMEd
09/10/2025, 4:51 PMAndriy Knysh (Cloud Posse)
09/10/2025, 5:04 PMmetadata.enabled: false is respected in the affected components, but it was not respected in the dependents (when using the flag --include-dependents
This is already fixed and will be available in the next release (today/tomorrow). Unless you are having a diff issue, this should fix it for youAndriy Knysh (Cloud Posse)
09/10/2025, 5:05 PM--dependents-stack to filter the dependent components by he stackAndriy Knysh (Cloud Posse)
09/10/2025, 5:06 PMatmos describe affected --stack stack --include-dependents --dependents-stack stackAndriy Knysh (Cloud Posse)
09/10/2025, 5:07 PM--stack - is to filter the affected by the stack
--dependents-stack - is to filter th dependents by the same stackAndriy Knysh (Cloud Posse)
09/10/2025, 5:07 PMEd
09/10/2025, 5:40 PMPePe Amengual
10/03/2025, 4:23 AMGabriela Campana (Cloud Posse)
10/03/2025, 8:28 PMAndriy Knysh (Cloud Posse)
10/03/2025, 10:56 PMPePe Amengual
10/03/2025, 11:03 PMPePe Amengual
10/03/2025, 11:07 PMAndriy Knysh (Cloud Posse)
10/04/2025, 5:54 PMAndriy Knysh (Cloud Posse)
10/08/2025, 5:52 PMAndriy Knysh (Cloud Posse)
10/15/2025, 3:05 PMatmos describe affected?PePe Amengual
10/15/2025, 3:20 PMAndriy Knysh (Cloud Posse)
10/15/2025, 3:33 PMPePe Amengual
10/15/2025, 4:24 PMEd
10/15/2025, 6:47 PM