Skip to content

fix(outputs): conditionally output#49

Merged
saidsef merged 2 commits intomainfrom
tf-output-conditional
Mar 10, 2026
Merged

fix(outputs): conditionally output#49
saidsef merged 2 commits intomainfrom
tf-output-conditional

Conversation

@saidsef
Copy link
Copy Markdown
Owner

@saidsef saidsef commented Mar 10, 2026

This pull request makes a minor improvement to the output handling in the Terraform module. The change ensures that the role_id and role_arn outputs return empty strings when the module is disabled, preventing potential errors or confusion.

  • Conditional logic added to role_id and role_arn outputs in outputs.tf so they return empty strings if var.enabled is false.

@saidsef saidsef added the enhancement New feature or request label Mar 10, 2026
@saidsef saidsef self-assigned this Mar 10, 2026
@saidsef saidsef force-pushed the tf-output-conditional branch from 75be541 to ccdd17c Compare March 10, 2026 08:03
@saidsef
Copy link
Copy Markdown
Owner Author

saidsef commented Mar 10, 2026

/code pr

Copy link
Copy Markdown
Owner Author

@saidsef saidsef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖
The changes to conditionally output an empty string when the module is disabled are necessary and correct. This prevents Terraform from attempting to reference a non-existent resource when var.enabled is false, which would cause an error. The ternary expressions are properly formatted and maintain type consistency (strings).

> deepseek-reasoner [pr | 1]

@saidsef saidsef merged commit 2e4b081 into main Mar 10, 2026
20 checks passed
@saidsef saidsef deleted the tf-output-conditional branch March 10, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant