• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Is it possible to insert a value into a file before it gets used in a terraform resource?

Resolved: Is it possible to insert a value into a file before it gets used in a terraform resource?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I’m deploying an Amazon Connect instance with an attached contact flow, following this documentation: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/connect_contact_flow
My contact flow is stored in a file, so I’m using the following:
However my contact flow requires me to specify the ARN of an AWS Lambda function in one particular section:
…
…
the value I would like to substitute into the json file at <lambda function arn> before the contact flow is created is accessible at
Is there any way to achieve this? Or will I have to use the ‘content = ‘ method in the documentation linked above to achieve what I need?
Thanks.

Answer:

If you really want to use filename instead of content, you have to write the rendered template to some temporary file using local_file.
But using content with templatefile directly for that would probably be easier. For that you would have to convert your flows/contact_flow.json into a template format:
then, for example:

If you have better answer, please add a comment about this, thank you!

amazon-web-services connect terraform
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: significance letter above bar graphic in wrong order

01/04/2023

Resolved: VBA – Applying border around the areas with value/text

01/04/2023

Resolved: How can I implement a function depending on picked up items?

01/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.