I am building different aws amis for several AWS projects:
What i am trying to achieve is to fetch the variables from various vault path’s like.
I have ENV defined as an environment variable which defines what environment i am running
{ "variables": { "aws_access_key": "{{ vault `twingate/projects/images/aws-{{env `ENV`}}` `AWS_ACCESS_KEY_ID`}}", "aws_secret_key": "{{ vault `twingate/projects/images/aws-{{env `ENV`}}` `AWS_SECRET_ACCESS_KEY`}}", "vpc_id": "{{ vault `twingate/projects/images/aws-{{env `ENV`}}` `vpc_id`}}", "subnet_id": "{{ vault `twingate/projects/images/aws-{{env `ENV`}}` `subnet_id`}}", }
Error initializing core: error interpolating default value for ‘aws_access_key’: template: root:1: bad character U+0060 ’
Obviously this is not working. Is there a way how that can be achieved ?