-
Notifications
You must be signed in to change notification settings - Fork 392
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
CFN Conditions in addons #915
Comments
Hi @FarmaanElahi ! Unfortunately, we don't support conditions yet. |
Then how can we create resource specific to env. Is it possible anyhow? |
I don't think it's possible at the moment 😔🙇. |
Or is there anyway where we can import external cfn stack and put in
output.yaml, so we can use it based on the environment? Or even adding
secrets based on environment?
…On Tue, May 12, 2020, 10:16 PM Efe Karakus ***@***.***> wrote:
I don't think it's possible at the moment 😔🙇.
We should look into creating an easy way of adding the Mappings and
Conditions sections
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#915 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AESIMEFMZV3TY7L6YGUULD3RRF4PHANCNFSM4M6U2RSQ>
.
|
This is possible! secrets:
MY_ENV_VAR_NAME: MY_SSM_PARAM_NAME Here your application container will have the env variable
Mmm good question, I think this could work within the addons Outputs:
MyOutputFromOtherStack:
Value: !ImportValue "MyOtherStack-SomeOutput" Then your application container will receive the value as an environment variable |
Thanks that will definitely help in using the ecs cli v2 based along with
env specific resources.
Will use cfn output resources since that give better flexibility.
Keep up the good work on your on this.
Was able to get the cluster up and running for multiple env in minutes ❤️
…On Tue, May 12, 2020, 11:25 PM Efe Karakus ***@***.***> wrote:
Or even adding secrets based on environment?
This is possible!
You can create a SSM SecureString parameter separately, and then inject it
as environment variable by modifying the manifest
<https://github.com/aws/amazon-ecs-cli-v2/wiki/Manifests>:
secrets:
MY_ENV_VAR_NAME: MY_SSM_PARAM_NAME
Here your application container will have the env variable
"MY_ENV_VAR_NAME" with the value of the secret store in the SSM parameter
"MY_SSM_PARAM_NAME".
Or is there anyway where we can import external cfn stack and put in
output.yaml
Mmm good question, I think this could work within the addons output.yaml
file:
Outputs:
MyOutputFromOtherStack:
Value: !ImportValue "MyOtherStack-SomeOutput"
Then your application container will receive the value as an environment
variable "MY_OUTPUT_FROM_OTHER_STACK"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#915 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AESIMEHNTKUQHGP3ZKOJOFDRRGESHANCNFSM4M6U2RSQ>
.
|
@efekarakus Doesn't exactly work. I am getting the following error
Your suggestion worked when a resource file is added and referencing the created resource in the policy and adding the that in the output file. If I do that and also follow you suggestion of importing only then it works |
Sounds good! Just to provide some visibility, we're still planning on improving the experience for addons templates to support conditionals and mappings. We're also currently working on supporting a new command |
Finally was able to achieve that with a kind of a hack. For somebody who what something like this till addons are fully ready
|
Hi @FarmaanElahi, we're planning to make this experience easier as described here: #994 Let us know if you have any feedback! |
#994 addressed the issue and is now merged! The fix should be out with the next release. |
In the wiki, there is no mention of condition for add ons. Is it supported or not?
The text was updated successfully, but these errors were encountered: