-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fargate aws_iam_role throwing error due to long cluster_name #1268
Comments
I did something similar you have tested the |
@stijndehaes yes! In this case the |
That sounds perfect :) I have approved your PR. Not that I can merge it but I also need this change :) |
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. |
Description
When trying to add a Fargate profile to our cluster we are getting an error thrown by the Fargate module. Apparently, the
aws_iam_role
resource has a char limit on thename_prefix
attribute.Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Fargate
Reproduction
Steps to reproduce the behavior:
cd examples/fargate/
main.tf
changelocals.cluster_name
from"test-eks-${random_string.suffix.result}"
to"cluster-name-will-have-lot"
terraform init
terraform plan
Code Snippet to Reproduce
Expected behavior
We expect to see a execution plan with the Fargate IAM Role being created using the cluster name.
Actual behavior
Instead, we get the following error:
Terminal Output Screenshot(s)
Additional context
I would love to open a PR for fixing this. At first I thought of using the
substr(string, offset, length)
to limit the cluster name in thefargate.tf
file. I tested it and it works for long and shortcluster_names
. Any other ideas?The text was updated successfully, but these errors were encountered: