Pr/module optional defaults#6
Open
asarkar157 wants to merge 2 commits into
Open
Conversation
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.
sks
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added default value fields to subset of azure modules