最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin5浏览0评论

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
}
发布评论

评论列表(0)

  1. 暂无评论