Skip to content

Instantly share code, notes, and snippets.

@apognu
Created April 14, 2022 13:27
Show Gist options
  • Save apognu/0e7d12193402fde043c2b2ddccd0d399 to your computer and use it in GitHub Desktop.
Save apognu/0e7d12193402fde043c2b2ddccd0d399 to your computer and use it in GitHub Desktop.
cdktf 0.10.1 diff exit code is 0 on error
$ cdktf --version
0.10.0
$ cdktf diff sandbox
sandbox Initializing the backend...
sandbox Initializing provider plugins...
- Reusing previous version of hashicorp/aws from the dependency lock file
sandbox - Using previously-installed hashicorp/aws v4.9.0
[...]
⠦ Processing
[2022-04-14T16:20:15.998] [ERROR] default - ╷
│ Error: multiple EC2 VPCs matched; use additional constraints to reduce matches to a single EC2 VPC
│ with data.aws_vpc.vpc-test,
│ on cdk.tf.json line 149, in data.aws_vpc.vpc-test:
│ 149: }
sandbox ╷
│ Error: multiple EC2 VPCs matched; use additional constraints to reduce matches to a single EC2 VPC
│ with data.aws_vpc.vpc-test (vpc-test),
│ on cdk.tf.json line 149, in data.aws_vpc.vpc-test (vpc-test):
│ 149: }
⠧ Processing
│ Error: multiple EC2 VPCs matched; use additional constraints to reduce matches to a single EC2 VPC
│ with data.aws_vpc.vpc-test,
│ on cdk.tf.json line 149, in data.aws_vpc.vpc-test:
│ 149: }
$ echo $?
1
$ npm install -g cdktf-cli@0.10.1
$ cdktf --version
0.10.1
$ cdktf diff sandbox
sandbox Initializing the backend...
sandbox Initializing provider plugins...
- Reusing previous version of hashicorp/aws from the dependency lock file
sandbox - Using previously-installed hashicorp/aws v4.9.0
[...]
⠹ Processing
[2022-04-14T16:26:27.787] [ERROR] default - ╷
│ Error: multiple EC2 VPCs matched; use additional constraints to reduce matches to a single EC2 VPC
│ with data.aws_vpc.vpc-test,
│ on cdk.tf.json line 149, in data.aws_vpc.vpc-test:
│ 149: }
sandbox ╷
│ Error: multiple EC2 VPCs matched; use additional constraints to reduce matches to a single EC2 VPC
│ with data.aws_vpc.vpc-test (vpc-test),
│ on cdk.tf.json line 149, in data.aws_vpc.vpc-test (vpc-test):
│ 149: }
$ echo $?
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment