aws / aws-toolkit-azure-devops

AWS Toolkit for Azure DevOps
Other
247 stars 104 forks source link

CDK bootstrapping fail, unable to parse environment specification #444

Open Fitmavincent opened 2 years ago

Fitmavincent commented 2 years ago

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'
  2. 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

bryceitoc9 commented 2 years ago

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?