Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
NOTE: I wasn't sure if this should be classified as a bug or a feature request.
on .terraform/modules/lambda2/main.tf line 37, in resource "aws_iam_role" "lambda_execution":
37: resource "aws_iam_role" "lambda_execution" {
Expected Behavior
The full name that I expected for the IAM role is alex-nested-1-nested-deploys-lambda2-execution-role which is 51 characters but the actual name was much longer then I expected.
terraform.workspace == "nested-deploys-1"
var.component_name == "this turned out to be too long"
But when I just do the aws_iam_role with that explicit name make plan succeeds. This left me fairly confused.
If the error had contained the full failing name it would have helped me track down what portion of our module structure was causing this failure.
Community Note
NOTE: I wasn't sure if this should be classified as a bug or a feature request.
Terraform Version
terraform -v Terraform v0.12.21
Affected Resource(s)
Terraform Configuration Files
main.tf
Lambda Module Partial
This module is decently large so I'm just including the role and permissions section that's failing.
Our terraform config is
Debug Output
Error: "name" cannot be longer than 64 characters
on .terraform/modules/lambda2/main.tf line 37, in resource "aws_iam_role" "lambda_execution": 37: resource "aws_iam_role" "lambda_execution" {
Expected Behavior
The full name that I expected for the IAM role is
alex-nested-1-nested-deploys-lambda2-execution-role
which is 51 characters but the actual name was much longer then I expected.terraform.workspace == "nested-deploys-1" var.component_name == "this turned out to be too long"
But when I just do the
aws_iam_role
with that explicit namemake plan
succeeds. This left me fairly confused.If the error had contained the full failing name it would have helped me track down what portion of our module structure was causing this failure.
Actual Behavior
Error doesn't contain failing name value.
Steps to Reproduce
terraform plan