Reputation: 115
My buildspec.yml file has the following two env variables, which I am pulling from secrets manager:
Question: I am doing this, because I don't want to have a config file with the url and have it sitting in github. I was hoping to reference it in my buildspec.yml file and then pull it into my react app after build. How can I achieve this?
version: 0.2
env:
secrets-manager:
key: API-Gateway-URL-DEV:URL
key: API-Gateway-URL-DEV:REGION
phases:
install:
runtime-versions:
nodejs: 12
Upvotes: 0
Views: 866
Reputation: 8885
You need to get those values into a file that is being deployed with your app. One way is to use jq to replace a value(s) in a file, or even write out a completely new file. So basically the config file that you didn't want to check in (wise!) should be created/updated in your build.
Upvotes: 1