Skip to content
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

Each argument may be set only once. #13

Open
wistonk opened this issue Jul 28, 2019 · 2 comments
Open

Each argument may be set only once. #13

wistonk opened this issue Jul 28, 2019 · 2 comments

Comments

@wistonk
Copy link

wistonk commented Jul 28, 2019

Error: Attribute redefined

on modules/ecs/main.tf line 258, in resource "aws_ecs_service" "web":
258: depends_on = ["aws_alb_target_group.alb_target_group"]

The argument "depends_on" was already set at modules/ecs/main.tf:245,3-13.

@mw44118
Copy link

mw44118 commented Oct 4, 2019

I got same error!

I combined the two depends_on lines into one, like this:

-  depends_on = ["aws_alb_target_group.alb_target_group"]
+  depends_on      = ["aws_iam_role_policy.ecs_service_role_policy", "aws_alb_target_group.alb_target_group"]

After I did that, I at least got $ terraform init to finish OK. $ terraform plan now blows up with lots of "unsupported block type" errors like this:

Error: Unsupported block type

  on modules/code_pipeline/main.tf line 17, in data "template_file" "codepipeline_policy":
  17:   vars {

Blocks of type "vars" are not expected here. Did you mean to define argument
"vars"? If so, use the equals sign to assign it a value.

I'm not sure what is going on there yet.

@avoidik
Copy link

avoidik commented Feb 16, 2020

you don't need both depends_on in there, since it is fargate in awsvpc mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants