-
Notifications
You must be signed in to change notification settings - Fork 50
[AVM Module Issue]: custom_data validation rejects gzipped cloud-init #207
Copy link
Copy link
Open
Labels
Language: Terraform 🌐This is related to the Terraform IaC languageThis is related to the Terraform IaC languageNeeds: Immediate Attention ‼️Immediate attention of module owner / AVM team is neededImmediate attention of module owner / AVM team is neededNeeds: Triage 🔍Maintainers need to triage stillMaintainers need to triage stillStatus: Response Overdue 🚩When an issue/PR has not been responded to for X amount of daysWhen an issue/PR has not been responded to for X amount of daysType: Bug 🐛Something isn't workingSomething isn't working
Metadata
Metadata
Assignees
Labels
Language: Terraform 🌐This is related to the Terraform IaC languageThis is related to the Terraform IaC languageNeeds: Immediate Attention ‼️Immediate attention of module owner / AVM team is neededImmediate attention of module owner / AVM team is neededNeeds: Triage 🔍Maintainers need to triage stillMaintainers need to triage stillStatus: Response Overdue 🚩When an issue/PR has not been responded to for X amount of daysWhen an issue/PR has not been responded to for X amount of daysType: Bug 🐛Something isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
0.19.3
(Optional) Correlation Id
No response
Description
When passing gzipped, base64-encoded cloud-init user data (via data.cloudinit_config.rendered with gzip = true) to the module’s custom_data input, variable validation fails. Azure VMs and cloud-init support gzipped user-data, so the module should accept it.
Example
Actual behavior
Terraform fails during variable validation for custom_data, indicating the value is invalid because the decoded bytes are not valid UTF-8 when gzip is enabled.
Expected behavior
The module should accept gzipped, base64-encoded custom_data and pass it to the VM resource unchanged so cloud-init can decompress and process it on first boot.
Gzip is commonly used with cloud-init to stay under Azure’s 64 KB customData limit after decoding, so blocking gzip prevents standard usage patterns.
Azure/cloud-init handle gzip automatically on supported Linux images, so the module’s validation should not prohibit this.