Skip to content

feat: use compact for prefix and suffix variables in locals#213

Open
bonddim wants to merge 1 commit into
Azure:masterfrom
bonddim:compact-input-lists
Open

feat: use compact for prefix and suffix variables in locals#213
bonddim wants to merge 1 commit into
Azure:masterfrom
bonddim:compact-input-lists

Conversation

@bonddim

@bonddim bonddim commented Jun 24, 2026

Copy link
Copy Markdown

This pull request makes a small but important improvement to how prefixes and suffixes are handled in the main.tf Terraform configuration. The main change ensures that any empty values in the var.prefix and var.suffix lists are removed before being joined, which helps prevent unwanted dashes or empty segments in generated names.

  • Improved name generation:
    • Updated all uses of var.prefix and var.suffix in local variables to use the compact() function, which removes empty values before joining. This results in cleaner, more predictable resource names and avoids issues caused by empty list elements.

Copilot AI review requested due to automatic review settings June 24, 2026 11:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves Terraform name generation in main.tf by ensuring any empty elements in var.prefix and var.suffix are removed before constructing derived local values, preventing accidental empty segments and stray dashes in generated resource names.

Changes:

  • Apply compact() to var.prefix when computing local.prefix and local.prefix_safe.
  • Apply compact() to var.suffix when computing local.suffix, local.suffix_safe, and the *_unique* variants that append local.random.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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