You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have following as part of config in a module to setup an asg. I noticed weird behavior where when i did terraform plan, terraform complained about not being able to find resource names aws_launch_configuration.this. I had already used the module before so this error was unexpected.
To test a theory I removed launch_configuration variable from aws_autoscaling_group resource and re-ran terraform plan. Plan failed again but this time telling me the real problem which was that my user_data length was greater than 16384.
If it fails planning launch config resource, it should through a relevant error like Should module.asg.aws_launch_configuration.this: expected length of user_data to be in the range (1 - 16384), got #! /bin/bash
Actual Behavior
resource 'aws_autoscaling_group.this' config: unknown resource 'aws_launch_configuration.this' referenced in variable aws_launch_configuration.this.id
Steps to Reproduce
Use a simple module to create a launch config and asg Create a userdata script with length greater than 16384 terraform init terraform plan
Additional Context
References
The text was updated successfully, but these errors were encountered:
I believe @bflad is correct that this is the same root cause as #18129. I've added that to the v0.12.0 milestone to be addressed before we get to final, and I'm going to close this one just to consolidate the discussion over there.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Mar 31, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have following as part of config in a module to setup an asg. I noticed weird behavior where when i did terraform plan, terraform complained about not being able to find resource names
aws_launch_configuration.this
. I had already used the module before so this error was unexpected.To test a theory I removed launch_configuration variable from aws_autoscaling_group resource and re-ran terraform plan. Plan failed again but this time telling me the real problem which was that my user_data length was greater than 16384.
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
Expected Behavior
If it fails planning launch config resource, it should through a relevant error like
Should module.asg.aws_launch_configuration.this: expected length of user_data to be in the range (1 - 16384), got #! /bin/bash
Actual Behavior
resource 'aws_autoscaling_group.this' config: unknown resource 'aws_launch_configuration.this' referenced in variable aws_launch_configuration.this.id
Steps to Reproduce
Use a simple module to create a launch config and asg
Create a userdata script with length greater than 16384
terraform init
terraform plan
Additional Context
References
The text was updated successfully, but these errors were encountered: