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

allow overriding SEMAPHORE_AGENT_STACK_CONFIG values with env vars #87

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

cchristous
Copy link
Contributor

@cchristous cchristous commented Sep 21, 2022

Currently, the stack configuration can be provided either as a JSON file via SEMAPHORE_AGENT_STACK_CONFIG or as environment variables, but you can't combine the two. This changes it so that a user can provide a JSON file and then also provide environment variables. If there are duplicates, the environment variables take precedence.

For my use case, I'd like to supply most of my parameters via the JSON file, but I'd also like to pass the SEMAPHORE_AGENT_AMI environment variable, so I don't have to store my AMI ID in source code.

Testing

I set the SEMAPHORE_AGENT_AMI and SEMAPHORE_AGENT_STACK_CONFIG environment variables then ran a CDK diff and saw:

Resources
 └─ [~] ImageId (requires replacement)
     ├─ [-] ami-****
     └─ [+] ami-****

@cchristous cchristous marked this pull request as ready for review September 21, 2022 18:25
@lucaspin
Copy link
Collaborator

/sem-approve

@lucaspin lucaspin self-requested a review September 21, 2022 18:48
@lucaspin lucaspin merged commit 2e016fe into renderedtext:master Sep 21, 2022
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.

2 participants