override parameters in parameter file for cloudformationCloudFormer-generated template failing when running in other regionCloning infrastructure from one region to another: AWS CloudFormationCan I set the parameters in an AWS CloudFormation launch URL?Cloudformation not launching WAF stack in required regionIs it possible to execute a CloudFormation file in Terraform?Regional Opsworks stack can't be found by CloudformationHow to give cloudformation parameter file instead of listing parameters in ansible playbook?Is there a way to clone a Cloudformation stack in the same region?aws aurora custom cluster name through cloudformationHow to move to previous version of stack using cloudformation?
Area of parallelogram = Area of square. Shear transform
3D Statue Park: U shapes
Why was Sauron preparing for war instead of trying to find the ring?
How could a thief buying plane tickets with stolen credit card details benefit personally?
Is it normal practice to screen share with a client?
Why is it considered Acid Rain with pH <5.6
Marrying a second woman behind your wife's back: is it wrong and can Quran/Hadith prove this?
Would this neural network have short term memory?
Giant space birds hatching out of planets; short story
Keeping an "hot eyeball planet" wet
Are there any examples of technologies have been lost over time?
Examples of simultaneous independent breakthroughs
How to handle a player that cannot be convinced his actions are a problem for both GM and party
Where to place an artificial gland in the human body?
How to change the font style (not the size but the style) of algorithimc package
Why are all my history books dividing Chinese history after the Han dynasty?
Print sums of all subsets
This message is flooding my syslog, how to find where it comes from?
Is it legal for private citizens to "impound" e-scooters?
Request for a Latin phrase as motto "God is highest/supreme"
Decreasing star size
Will any serial mouse connect to Classic Macs?
How much were the LMs maneuvered to their landing points?
What is "I bet" in German?
override parameters in parameter file for cloudformation
CloudFormer-generated template failing when running in other regionCloning infrastructure from one region to another: AWS CloudFormationCan I set the parameters in an AWS CloudFormation launch URL?Cloudformation not launching WAF stack in required regionIs it possible to execute a CloudFormation file in Terraform?Regional Opsworks stack can't be found by CloudformationHow to give cloudformation parameter file instead of listing parameters in ansible playbook?Is there a way to clone a Cloudformation stack in the same region?aws aurora custom cluster name through cloudformationHow to move to previous version of stack using cloudformation?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
lets say i have all parameters needed to create a cloudformation stack in a json file but want to override some parameters from the parameters file..is this possible?
aws cloudformation create-stack
--stack-name sample-stack
--template-body file://sample-stack.yaml
--parameters file://sample-stack.json
--capabilities CAPABILITY_IAM
--disable-rollback
--region us-east-1
--output json &&
aws cloudformation wait stack-create-complete
--stack-name sample-stack
so lets say there are like 10 parameters in sample-stack.json
file BUT i have like 2 parameters i want to override from that file.
Is this possible?
Thanks
amazon-web-services amazon-cloudformation
add a comment |
lets say i have all parameters needed to create a cloudformation stack in a json file but want to override some parameters from the parameters file..is this possible?
aws cloudformation create-stack
--stack-name sample-stack
--template-body file://sample-stack.yaml
--parameters file://sample-stack.json
--capabilities CAPABILITY_IAM
--disable-rollback
--region us-east-1
--output json &&
aws cloudformation wait stack-create-complete
--stack-name sample-stack
so lets say there are like 10 parameters in sample-stack.json
file BUT i have like 2 parameters i want to override from that file.
Is this possible?
Thanks
amazon-web-services amazon-cloudformation
add a comment |
lets say i have all parameters needed to create a cloudformation stack in a json file but want to override some parameters from the parameters file..is this possible?
aws cloudformation create-stack
--stack-name sample-stack
--template-body file://sample-stack.yaml
--parameters file://sample-stack.json
--capabilities CAPABILITY_IAM
--disable-rollback
--region us-east-1
--output json &&
aws cloudformation wait stack-create-complete
--stack-name sample-stack
so lets say there are like 10 parameters in sample-stack.json
file BUT i have like 2 parameters i want to override from that file.
Is this possible?
Thanks
amazon-web-services amazon-cloudformation
lets say i have all parameters needed to create a cloudformation stack in a json file but want to override some parameters from the parameters file..is this possible?
aws cloudformation create-stack
--stack-name sample-stack
--template-body file://sample-stack.yaml
--parameters file://sample-stack.json
--capabilities CAPABILITY_IAM
--disable-rollback
--region us-east-1
--output json &&
aws cloudformation wait stack-create-complete
--stack-name sample-stack
so lets say there are like 10 parameters in sample-stack.json
file BUT i have like 2 parameters i want to override from that file.
Is this possible?
Thanks
amazon-web-services amazon-cloudformation
amazon-web-services amazon-cloudformation
asked Mar 26 at 17:21
uberrebuuberrebu
3601 gold badge4 silver badges17 bronze badges
3601 gold badge4 silver badges17 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
This isn't available in the AWS CLI right now, but there is a feature request on GitHub. For now you'll need to script something to generate your overrides prior to creating the stack. Another potential option is to store your values in something that you can dynamically reference, such as Parameter Store, and update them via the API prior to stack creation.
i see...thanks for the answer
– uberrebu
Mar 26 at 19:24
add a comment |
If you want to update a stack and specify only the list of parameters that changed, you can have a look at this shell script that I wrote.
Usage:
▶ bash update_stack.sh -h
Usage: update_stack.sh [-h] STACK_NAME KEY1=VAL1 [KEY2=VAL2 ...]
Updates CloudFormation stacks based on parameters passed here as key=value pairs. All
other parameters are based on existing values.
To solve your problem, you could borrow the edit()
function:
PARAMS='sample-stack.json'
edit() .ParameterValue)
cp $PARAMS $PARAMS.bak
edit param1=newval1 param2=newval2
And then create your stack as normal.
what if i want to replace like 3 parameter values from theparameters.json
file? how will thejq
command look?..like param-key1, param-key2, param-key3 => param-value1, param-value2, param-value3 for example
– uberrebu
Apr 2 at 18:45
@uberrebu, I have updated the answer to show a shell script that I wrote that handles the case of more than 1 parameter. Let me know what you think!
– Alex Harvey
Apr 4 at 9:07
i really will like to run a single command that will not involve creating another json file..will like to usejq
power to replace..use case is just to modify a few parameters
– uberrebu
Apr 4 at 15:23
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55362900%2foverride-parameters-in-parameter-file-for-cloudformation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This isn't available in the AWS CLI right now, but there is a feature request on GitHub. For now you'll need to script something to generate your overrides prior to creating the stack. Another potential option is to store your values in something that you can dynamically reference, such as Parameter Store, and update them via the API prior to stack creation.
i see...thanks for the answer
– uberrebu
Mar 26 at 19:24
add a comment |
This isn't available in the AWS CLI right now, but there is a feature request on GitHub. For now you'll need to script something to generate your overrides prior to creating the stack. Another potential option is to store your values in something that you can dynamically reference, such as Parameter Store, and update them via the API prior to stack creation.
i see...thanks for the answer
– uberrebu
Mar 26 at 19:24
add a comment |
This isn't available in the AWS CLI right now, but there is a feature request on GitHub. For now you'll need to script something to generate your overrides prior to creating the stack. Another potential option is to store your values in something that you can dynamically reference, such as Parameter Store, and update them via the API prior to stack creation.
This isn't available in the AWS CLI right now, but there is a feature request on GitHub. For now you'll need to script something to generate your overrides prior to creating the stack. Another potential option is to store your values in something that you can dynamically reference, such as Parameter Store, and update them via the API prior to stack creation.
answered Mar 26 at 18:51
bwestbwest
7,0953 gold badges21 silver badges48 bronze badges
7,0953 gold badges21 silver badges48 bronze badges
i see...thanks for the answer
– uberrebu
Mar 26 at 19:24
add a comment |
i see...thanks for the answer
– uberrebu
Mar 26 at 19:24
i see...thanks for the answer
– uberrebu
Mar 26 at 19:24
i see...thanks for the answer
– uberrebu
Mar 26 at 19:24
add a comment |
If you want to update a stack and specify only the list of parameters that changed, you can have a look at this shell script that I wrote.
Usage:
▶ bash update_stack.sh -h
Usage: update_stack.sh [-h] STACK_NAME KEY1=VAL1 [KEY2=VAL2 ...]
Updates CloudFormation stacks based on parameters passed here as key=value pairs. All
other parameters are based on existing values.
To solve your problem, you could borrow the edit()
function:
PARAMS='sample-stack.json'
edit() .ParameterValue)
cp $PARAMS $PARAMS.bak
edit param1=newval1 param2=newval2
And then create your stack as normal.
what if i want to replace like 3 parameter values from theparameters.json
file? how will thejq
command look?..like param-key1, param-key2, param-key3 => param-value1, param-value2, param-value3 for example
– uberrebu
Apr 2 at 18:45
@uberrebu, I have updated the answer to show a shell script that I wrote that handles the case of more than 1 parameter. Let me know what you think!
– Alex Harvey
Apr 4 at 9:07
i really will like to run a single command that will not involve creating another json file..will like to usejq
power to replace..use case is just to modify a few parameters
– uberrebu
Apr 4 at 15:23
add a comment |
If you want to update a stack and specify only the list of parameters that changed, you can have a look at this shell script that I wrote.
Usage:
▶ bash update_stack.sh -h
Usage: update_stack.sh [-h] STACK_NAME KEY1=VAL1 [KEY2=VAL2 ...]
Updates CloudFormation stacks based on parameters passed here as key=value pairs. All
other parameters are based on existing values.
To solve your problem, you could borrow the edit()
function:
PARAMS='sample-stack.json'
edit() .ParameterValue)
cp $PARAMS $PARAMS.bak
edit param1=newval1 param2=newval2
And then create your stack as normal.
what if i want to replace like 3 parameter values from theparameters.json
file? how will thejq
command look?..like param-key1, param-key2, param-key3 => param-value1, param-value2, param-value3 for example
– uberrebu
Apr 2 at 18:45
@uberrebu, I have updated the answer to show a shell script that I wrote that handles the case of more than 1 parameter. Let me know what you think!
– Alex Harvey
Apr 4 at 9:07
i really will like to run a single command that will not involve creating another json file..will like to usejq
power to replace..use case is just to modify a few parameters
– uberrebu
Apr 4 at 15:23
add a comment |
If you want to update a stack and specify only the list of parameters that changed, you can have a look at this shell script that I wrote.
Usage:
▶ bash update_stack.sh -h
Usage: update_stack.sh [-h] STACK_NAME KEY1=VAL1 [KEY2=VAL2 ...]
Updates CloudFormation stacks based on parameters passed here as key=value pairs. All
other parameters are based on existing values.
To solve your problem, you could borrow the edit()
function:
PARAMS='sample-stack.json'
edit() .ParameterValue)
cp $PARAMS $PARAMS.bak
edit param1=newval1 param2=newval2
And then create your stack as normal.
If you want to update a stack and specify only the list of parameters that changed, you can have a look at this shell script that I wrote.
Usage:
▶ bash update_stack.sh -h
Usage: update_stack.sh [-h] STACK_NAME KEY1=VAL1 [KEY2=VAL2 ...]
Updates CloudFormation stacks based on parameters passed here as key=value pairs. All
other parameters are based on existing values.
To solve your problem, you could borrow the edit()
function:
PARAMS='sample-stack.json'
edit() .ParameterValue)
cp $PARAMS $PARAMS.bak
edit param1=newval1 param2=newval2
And then create your stack as normal.
edited Apr 4 at 9:59
answered Mar 29 at 2:16
Alex HarveyAlex Harvey
7,2481 gold badge15 silver badges36 bronze badges
7,2481 gold badge15 silver badges36 bronze badges
what if i want to replace like 3 parameter values from theparameters.json
file? how will thejq
command look?..like param-key1, param-key2, param-key3 => param-value1, param-value2, param-value3 for example
– uberrebu
Apr 2 at 18:45
@uberrebu, I have updated the answer to show a shell script that I wrote that handles the case of more than 1 parameter. Let me know what you think!
– Alex Harvey
Apr 4 at 9:07
i really will like to run a single command that will not involve creating another json file..will like to usejq
power to replace..use case is just to modify a few parameters
– uberrebu
Apr 4 at 15:23
add a comment |
what if i want to replace like 3 parameter values from theparameters.json
file? how will thejq
command look?..like param-key1, param-key2, param-key3 => param-value1, param-value2, param-value3 for example
– uberrebu
Apr 2 at 18:45
@uberrebu, I have updated the answer to show a shell script that I wrote that handles the case of more than 1 parameter. Let me know what you think!
– Alex Harvey
Apr 4 at 9:07
i really will like to run a single command that will not involve creating another json file..will like to usejq
power to replace..use case is just to modify a few parameters
– uberrebu
Apr 4 at 15:23
what if i want to replace like 3 parameter values from the
parameters.json
file? how will the jq
command look?..like param-key1, param-key2, param-key3 => param-value1, param-value2, param-value3 for example– uberrebu
Apr 2 at 18:45
what if i want to replace like 3 parameter values from the
parameters.json
file? how will the jq
command look?..like param-key1, param-key2, param-key3 => param-value1, param-value2, param-value3 for example– uberrebu
Apr 2 at 18:45
@uberrebu, I have updated the answer to show a shell script that I wrote that handles the case of more than 1 parameter. Let me know what you think!
– Alex Harvey
Apr 4 at 9:07
@uberrebu, I have updated the answer to show a shell script that I wrote that handles the case of more than 1 parameter. Let me know what you think!
– Alex Harvey
Apr 4 at 9:07
i really will like to run a single command that will not involve creating another json file..will like to use
jq
power to replace..use case is just to modify a few parameters– uberrebu
Apr 4 at 15:23
i really will like to run a single command that will not involve creating another json file..will like to use
jq
power to replace..use case is just to modify a few parameters– uberrebu
Apr 4 at 15:23
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55362900%2foverride-parameters-in-parameter-file-for-cloudformation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown