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

Use json_map_encoded instead of deprecated to json_map in examples #132

Closed
wants to merge 1 commit into from

Conversation

nitrocode
Copy link
Member

Fix thanks to #131 (comment)

@nitrocode
Copy link
Member Author

/test all

@DavidGamba
Copy link

DavidGamba commented May 4, 2021

When applying this change:

-  container_definitions    = "[${module.container_definition.json_map_encoded},${module.datadog_container_definition.json_map_encoded}]"
+  container_definitions    = jsonencode([module.container_definition.json_map_encoded, module.datadog_container_definition.json_map_encoded])

I get the error:

Error: ECS Task Definition container_definitions is invalid: Error decoding JSON: json: cannot unmarshal string into Go value of type ecs.ContainerDefinition

  on ../../modules/fargate_container/main.tf line 130, in resource "aws_ecs_task_definition" "this":
 130:   container_definitions    = jsonencode([module.container_definition.json_map_encoded, module.datadog_container_definition.json_map_encoded])

@nitrocode
Copy link
Member Author

If you apply the example terraform module, do you get the same error?

@DavidGamba
Copy link

DavidGamba commented May 5, 2021

If you apply the example terraform module, do you get the same error?

I only tried in my own setup running terraform v0.13.6

@nitrocode
Copy link
Member Author

Can you create a new issue with a minimum viable reproducible example ?

@davidvasandani
Copy link
Contributor

@DavidGamba I'm getting the same error. Were you able to find a fix?

@DavidGamba
Copy link

I just kept the line as it was before, this only affects the tests and the documentation, if you keep using it the old way you won't have any issues.

container_definitions    = "[${module.container_definition.json_map_encoded},${module.datadog_container_definition.json_map_encoded}]"

@mergify
Copy link

mergify bot commented Jun 11, 2021

This pull request is now in conflict. Could you fix it @nitrocode? 🙏

@korenyoni
Copy link
Member

korenyoni commented Jun 11, 2021

Equivalent done via #139

@korenyoni korenyoni closed this Jun 11, 2021
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

Successfully merging this pull request may close these issues.

5 participants