Skip to content

Allow Fn::GetAZs in Fn::Join values - #4677

Open
0xTaoZ wants to merge 1 commit into
aws-cloudformation:mainfrom
0xTaoZ:agent/allow-join-getazs
Open

Allow Fn::GetAZs in Fn::Join values#4677
0xTaoZ wants to merge 1 commit into
aws-cloudformation:mainfrom
0xTaoZ:agent/allow-join-getazs

Conversation

@0xTaoZ

@0xTaoZ 0xTaoZ commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • allow Fn::GetAZs as the second argument to Fn::Join
  • add regression coverage for the reported Fn::Join/Fn::GetAZs false positive

Rationale

CloudFormation documents Fn::GetAZs as supported in the list-of-values argument for Fn::Join, and Fn::Select already allows the same array-producing function. Without this, cfn-lint reports E1022 for a valid pattern such as joining all AZs into a comma-delimited string.

Validation

  • .venv/bin/python -m pytest test/unit/rules/functions/test_join.py -q
  • .venv/bin/python -m pytest test/unit/rules/functions -q
  • .venv/bin/ruff check test/unit/rules/functions/test_join.py
  • .venv/bin/ruff format --check test/unit/rules/functions/test_join.py
  • .venv/bin/python -m json.tool src/cfnlint/data/schemas/other/functions/join.json
  • .venv/bin/cfn-lint -r us-east-1 -- /tmp/cfn-join-getazs-XXXX.yaml

Fixes #4674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E1022 rejects Fn::GetAZs inside Fn::Join, which the docs and select.json allow

1 participant