amazon web services - Step function not deployable through terraform - Stack Overflow

I am trying to deploy AWS Step Function using Terraform but the deployment is failing with the below er

I am trying to deploy AWS Step Function using Terraform but the deployment is failing with the below error

Failed to execute "terraform init"
fork/exec /usr/local/bin/terraform: argument list too long

Terragrunt code I'm executing

terragrunt init --terragrunt-non-interactive -terragrunt-log-level error
terragrunt plan --terragrunt-non-interactive -terragrunt-log-level error

The problem is I have a step function which is of 10900 lines

Please provide me some help. Am I right in identifying the problem? or is there any other issue?

I am trying to deploy AWS Step Function using Terraform but the deployment is failing with the below error

Failed to execute "terraform init"
fork/exec /usr/local/bin/terraform: argument list too long

Terragrunt code I'm executing

terragrunt init --terragrunt-non-interactive -terragrunt-log-level error
terragrunt plan --terragrunt-non-interactive -terragrunt-log-level error

The problem is I have a step function which is of 10900 lines

Please provide me some help. Am I right in identifying the problem? or is there any other issue?

Share Improve this question edited Mar 18 at 4:12 Sathish Pandurangan asked Mar 17 at 9:55 Sathish PanduranganSathish Pandurangan 387 bronze badges 2
  • 2 There's probably something else you added to the command, I'm just guessing. Would you mind posting the exact command you are running in the terminal? – Marko E Commented Mar 17 at 10:33
  • Do you mind adding the tf code you wrote? – Bert Cafecito Commented Mar 17 at 18:21
Add a comment  | 

1 Answer 1

Reset to default 0

I had the same issue as that of https://github/gruntwork-io/terragrunt/issues/2132

The problem was the step function's definition was getting as an command line argument which hit the kernel's limit of 128KB (ref)

Tweaked the solution posted in https://github/gruntwork-io/terragrunt/issues/2132#issuecomment-1188287900

Created a *.tfvars.json file instead of *.tfvars file using the generate function and the definition variable gets created on the fly and this definition is used by the parent terraform module.(ref)

generate "vars_input" {
  path              = "variables.auto.tfvars.json"
  if_exists         = "overwrite"
  disable_signature = true
  contents          = <<EOF
{
  "definition": ${file("${get_path_to_repo_root()}/step_function_file.json")}
}
EOF
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744568669a4581322.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信