Skip to content

Pr/module optional defaults#6

Open
asarkar157 wants to merge 2 commits into
stackgenhq:mainfrom
asarkar157:pr/module-optional-defaults
Open

Pr/module optional defaults#6
asarkar157 wants to merge 2 commits into
stackgenhq:mainfrom
asarkar157:pr/module-optional-defaults

Conversation

@asarkar157
Copy link
Copy Markdown

added default value fields to subset of azure modules

asarkar157 added 2 commits May 6, 2026 14:04
Variables with nullable:true but no default are treated as required by
Terraform, forcing callers to explicitly pass null. This adds default:null
(or default:[] for list types in dynamic blocks) to 39 optional variables.

Also adds missing resource_group_name/location variable declarations to
azurerm_app_service_certificate and azurerm_cdn_frontdoor_profile.

Modules fixed:
- azurerm_mssql_database (14 fields)
- azurerm_service_plan (1 field)
- azurerm_app_service_certificate (7 fields + 2 missing vars)
- azurerm_app_configuration (6 fields)
- azurerm_linux_web_app (3 fields)
- azurerm_cdn_frontdoor_profile (3 fields + 1 missing var)
- azurerm_key_vault (1 field)
- azurerm_cosmosdb_account (4 fields)
Add "default": null to 150 optional variables across 9 AWS modules that
were missing defaults. Without a default, Terraform treats them as required
even when nullable=true, causing false-positive 'missing field' errors in
StackGen provisioning.

Modules fixed:
- aws_launch_template (31 fields)
- aws_instance (40 fields)
- aws_db_instance (53 fields)
- aws_iam_role (7 fields)
- aws_iam_user (2 fields)
- aws_security_group (3 fields)
- aws_db_parameter_group (6 fields)
- aws_db_subnet_group (3 fields)
- aws_ec2_transit_gateway (5 fields)

Cross-referenced against official Terraform AWS provider docs to confirm
all 150 fields are Optional. 4 Required fields (allocated_storage, engine,
username on db_instance; subnet_ids on db_subnet_group) were correctly
excluded.
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