Skip to content

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

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
0xTaoZ:agent/allow-join-getazs
Sep 9, 2026
Merged

kddejong merged 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

@codecov

codecov Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.64%. Comparing base (73c89e1) to head (fc16dd1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4677   +/-   ##
=======================================
  Coverage   94.64%   94.64%           
=======================================
  Files         434      434           
  Lines       15530    15530           
  Branches     3012     3012           
=======================================
  Hits        14698    14698           
  Misses        454      454           
  Partials      378      378           
Flag Coverage Δ
unittests 94.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kddejong
kddejong force-pushed the agent/allow-join-getazs branch from 2cfd02d to fc16dd1 Compare September 9, 2026 18:27
@kddejong
kddejong merged commit 59e1aa4 into aws-cloudformation:main Sep 9, 2026
22 checks passed
@0xTaoZ
0xTaoZ deleted the agent/allow-join-getazs branch September 29, 2026 12:17
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

2 participants