aws-toolkit-azure-devops icon indicating copy to clipboard operation
aws-toolkit-azure-devops copied to clipboard

CDK bootstrapping fail, unable to parse environment specification

Open Fitmavincent opened this issue 2 years ago • 1 comments

CDK bootstrap fail, unable to parse environment specification using AWSShellScript@1

Reproduction

  1. Prepare a pipeline script for cdk bootstrap e.g.
- task: AWSShellScript@1
      inputs:
        awsCredentials: 'prod'
        regionName: 'ap-southeast-2'
        scriptType: 'inline'
        inlineScript: |
          echo "Bootstrapping environment"
          cdk bootstrap aws://$(ACCOUNT)/$(REGION)

      displayName: 'Deploying Project Infrastructure on Production'
  1. Run the pipeline

Expected behavior

It should be able to go through the bootstrapping process without errors as awsCredentials, account and regions specification provided

image

However, after aws shell script task upgrade to 1.11.0, it no longer be able to cdk bootstrap and keep throwing errors on unable to parse environment specification

image

Your Environment

  • On-prem or cloud based?: Cloud base
  • Azure DevOps version: Version Dev18.M194.1 (AzureDevOps_M194_20211112.8)
  • AWS Toolkit for Azure DevOps version: AWS CDK latest

Fitmavincent avatar Nov 18 '21 01:11 Fitmavincent

This code shouldn't have changed between the two versions, and this should use whatever version of CDK is present on your Azure Pipelines Agent (the toolkit shouldn't install the CDK CLI). Just making sure, did you change any of your agents/the software they're running?

bryceitoc9 avatar Dec 01 '21 00:12 bryceitoc9