Skip to content

ci: conditional plan + artifact upload#5

Merged
awsvkvims merged 2 commits intomainfrom
ci/terraform-plan
Feb 14, 2026
Merged

ci: conditional plan + artifact upload#5
awsvkvims merged 2 commits intomainfrom
ci/terraform-plan

Conversation

@awsvkvims
Copy link
Owner

@awsvkvims awsvkvims commented Feb 14, 2026

What

Enhance Terraform CI workflow to:

  • Run terraform plan only when AWS credentials are configured
  • Skip plan safely when credentials are not present
  • Upload plan artifact only when plan runs successfully

Why

Prevents CI failures when AWS credentials are not configured,
while still allowing full plan + artifact generation when secrets are available.

This keeps PR validation stable (fmt + validate always run)
and prepares the workflow for future credential-based plan enforcement.

Note:

secrets context is not available in an if: conditional at the step level. GitHub blocks this for security reasons to prevent leaking secrets through logic flow.

To check if a secret exists in a conditional, it must first be mapped to an environment variable , then that environment variable can be checked.

@awsvkvims awsvkvims merged commit 1b0b033 into main Feb 14, 2026
2 checks passed
@awsvkvims awsvkvims deleted the ci/terraform-plan branch February 14, 2026 19:53
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.

2 participants