aws / aws/aws-toolkit-azure-devops

CDK bootstrapping fail, unable to parse environment specification

Open
#444 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

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

**Reproduction**

1. Prepare a pipeline script for ```cdk bootstrap```
e.g.
```yml
- 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](https://user-images.githubusercontent.com/7020812/142334696-9ef7af6e-7df0-4f4e-a5d5-1949048e1eaf.png)

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](https://user-images.githubusercontent.com/7020812/142334497-73c739fb-0589-4374-b929-cdf876be96fe.png)

**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

Contributor guide

Open the contributing guide

Research direction

Start with the supplied Azure DevOps pipeline and compare AWSShellScript@1 behavior before and after version 1.11.0, then trace the repository's TypeScript task implementation and its CDK bootstrap invocation. Done means the reproduced cdk bootstrap command accepts the supplied account and region environment specification and completes without the parsing error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, yaml
Domain
cli, cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.