All,
I am using the aws-cloudformation-deploy to deploy my code. But I want to put the stack parameters in a separate JSON file to keep the bitbucket-pipelines.yaml file a bit cleaner.
when I add: STACK_PARAMETERS: "./cloudformation/test.json"
content of file:
[{ "ParameterKey": "COUNT",
"ParameterValue": "20"
}]
I get this error:
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter Parameters, value: ./cloudformation/test.json, type: <class 'str'>, valid types: <class 'list'>, <class 'tuple'>
The value for STACK_PARAMETERS has to be a json string, not a path to a json document. You can read the json document from a file and assign it to a variable to be used in the pipe:
script:
- export PARAMETERS=$(cat ./cloudformation/test.json)
- pipe: atlassian/aws-cloudformation-deploy:0.6.4
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-1'
STACK_NAME: 'my-stack-name'
TEMPLATE: 'https://s3.amazonaws.com/cfn-deploy-pipe/cfn-template.json'
STACK_PARAMETERS: PARAMETERS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would love examples like this in the documentation. Thank you!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the final line of the example is missing a dollar sign and should be:
STACK_PARAMETERS: $PARAMETERS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.