aws / aws-sam-cli-pipeline-init-templates

MIT No Attribution
44 stars 39 forks source link

'Invalid question key' exception during pipeline init #57

Closed bockstaller closed 1 year ago

bockstaller commented 1 year ago

I am getting the following exception after running sam pipeline init --bootstrap

Error: 'Invalid question key "shared_values" referenced in default answer of question permissions_provider'

This started happening after creating the first two pipeline stages.

It seems to be related with this addition. But my experience here is limited

Full shell output ``` ❯ sam pipeline init --bootstrap 22:07:00 sam pipeline init generates a pipeline configuration file that your CI/CD system can use to deploy serverless applications using AWS SAM. We will guide you through the process to bootstrap resources for each stage, then walk through the details necessary for creating the pipeline config file. Please ensure you are in the root folder of your SAM application before you begin. Select a pipeline template to get started: 1 - AWS Quick Start Pipeline Templates 2 - Custom Pipeline Template Location Choice: 1 Cloning from https://github.com/aws/aws-sam-cli-pipeline-init-templates.git (process may take a moment) Select CI/CD system 1 - Jenkins 2 - GitLab CI/CD 3 - GitHub Actions 4 - Bitbucket Pipelines 5 - AWS CodePipeline Choice: 3 You are using the 2-stage pipeline template. _________ _________ | | | | | Stage 1 |->| Stage 2 | |_________| |_________| Checking for existing stages... This template configures a pipeline that deploys a serverless application to a testing and a production stage. Error: 'Invalid question key "shared_values" referenced in default answer of question permissions_provider' ```
.aws-sam/pipeline/pipelineconfig.toml Note: Identifiers are redacted. Same redaction letter means equal identifier. ``` version = 0.1 [default] [default.pipeline_bootstrap] [default.pipeline_bootstrap.parameters] pipeline_user = "arn:aws:iam::XXXXXXXXXXX:user/aws-sam-cli-managed-dev-pipeline-reso-PipelineUser-CCCCCCCC" [dev] [dev.pipeline_bootstrap] [dev.pipeline_bootstrap.parameters] pipeline_execution_role = "arn:aws:iam::XXXXXXXX:role/aws-sam-cli-managed-dev-pipe-PipelineExecutionRole-GGGGGGGGGG" cloudformation_execution_role = "arn:aws:iam::XXXXXXXXX:role/aws-sam-cli-managed-dev-p-CloudFormationExecutionR-FFFFFFFFF" artifacts_bucket = "aws-sam-cli-managed-dev-pipeline-artifactsbucket-BBBBBBBBB" image_repository = "" region = "eu-central-1" [prod] [prod.pipeline_bootstrap] [prod.pipeline_bootstrap.parameters] pipeline_execution_role = "arn:aws:iam::XXXXXXXX:role/aws-sam-cli-managed-prod-pip-PipelineExecutionRole-EEEEEEEEE" cloudformation_execution_role = "arn:aws:iam::XXXXXXXXX:role/aws-sam-cli-managed-prod-CloudFormationExecutionR-DDDDDDDDD" artifacts_bucket = "aws-sam-cli-managed-prod-pipeline-artifactsbucket-AAAAAAAAAAA" image_repository = "" region = "eu-central-1" ```
xazhao commented 1 year ago

Hello! Would you mind letting me know what version of SAM CLI you're currently using? SAM CLI 1.60.0 was released with changes in init templates. Could you please update SAM CLI and try again?

bockstaller commented 1 year ago

A must have missed it. Upgrading SAM CLI did the trick - thank you very much!