-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail during plan if user_data on aws_instance is > 16KB #5525
Comments
Hi @l2ol33rt, There are actually 2 issues here:
I will have a look and see if i can reproduce this |
Hi @l2ol33rt! As @stack72 correctly identifies, the error message here is part of a wider group of issues which is being tracked by a meta-issue over at #5537. We should indeed report an error at the plan phase if possible about the size of the user data however. This is not always possible as the value could be computed based on arbitrary length values in a template, but we can detect the "obvious" case of a static value which is more than 16 kilobytes and deal with that at the planning phase, falling back on the fixed up API error behaviour if this is not possible. I've updated the title of this issue accordingly. Thanks for reporting! |
@stack72 @jen20 I really appreciate all the feedback regarding this! I went ahead and built terraform off master and confirmed that this does resolve the timeout error and reveal a more helpful
This is much more helpful since it appears to have displayed the API error. @jen20 adding detection when user-data's static value >16KB during the
|
👍 |
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. |
From the AWS docs:
When user-data is
>16 KB
the output ofterraform apply
only notifies the user that the state was not applied due totimeout
:Setting
TF_LOG=DEBUG
didn't seem to help in this situation. But taking the size of the file<16 KB
fixes the issue, but it took some digging to realize what was going on initially.I would think an error should be triggered during
terraform plan
when user-data exceeds 16 KB. Let me know what you think!Terraform version: v0.6.11
The text was updated successfully, but these errors were encountered: