2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Hi THere
Use update-stack
example
cat <<EOF > cfn.yaml
---
AWSTemplateFormatVersion: "2010-09-09"
Description: an example
Parameters:
Param:
Type: String
Default: '1'
Resources:
SsmParameter:
Type: AWS::SSM::Parameter
Properties:
Name: /example
Type: String
Value: !Ref Param
EOF
aws cloudformation deploy --template-file cfn.yaml --stack-name update-check
aws ssm get-parameter --name /example | jq '.Parameter.Value'
"1"
Now change the template
cat <<EOF > cfn.yaml
---
AWSTemplateFormatVersion: "2010-09-09"
Description: an example
Parameters:
Param:
Type: String
Default: '2'
Resources:
SsmParameter:
Type: AWS::SSM::Parameter
Properties:
Name: /example
Type: String
Value: !Ref Param
EOF
Update the stack
[cloudshell-user@ ~]$ aws cloudformation update-stack --template-body file://cfn.yaml --stack-name update-check
{
"StackId": "arn:aws:cloudformation:us-east-1:#########:stack/update-check/52e8a4f0-303d-11ed-8d03-xxxxxxxxxx"
}
[cloudshell-user@ ~]$ aws ssm get-parameter --name /example | jq '.Parameter.Value'
"2"
1
I also tried it, and indeed reproduced the same issue.
This may be similar to the following GitHub Issue. [1].
[1] SSM Dynamic Reference Change not detected - Issue #844 - aws-cloudformation/cloudformation-coverage-roadmap https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/844
The above Issue is open, so reporting this event may be considered for a fix.
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 10 mois
- AWS OFFICIELA mis à jour il y a 4 mois
Thank you for your quick response. We discussed this internally and from a language point of view this sounds reasonable. When we look at the documentation (aws cloudformation deploy help), we see:
(The line "To update a stack, specify the name of an existing stack" triggered us to call this a bug).
We would highly appreciate it when AWS would fix this.