hashicorp / terraform-provider-awscc

Terraform AWS Cloud Control provider
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs
Mozilla Public License 2.0
260 stars 118 forks source link

Bug in awscc upgrade from 0.32.0 to 0.33.0 and onwards #808

Open manojcoupa opened 1 year ago

manojcoupa commented 1 year ago

Community Note

Terraform CLI and Terraform AWS Cloud Control Provider Version

Terraform v1.3.7 on darwin_amd64

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

cdktf.json file :

{ "language": "python", "app": "pipenv run python main.py", "projectId": "2d650884-83c6-444f-9726-094c4a98476f", "sendCrashReports": "false", "terraformProviders": [ { "name": "awscc", "source": "hashicorp/awscc", "version": "0.33.0" } ], "terraformModules": [], "codeMakerOutput": "imports", "context": { "excludeStackIdFromLogicalIds": "true", "allowSepCharsInLogicalIds": "true" } } ``

Debug Output

Panic Output

cdktf get NOTE: Temp directory retained due to an error: /var/folders/y5/nm6gc8rj0p76ds9pwyfz2xym0000gn/T/temp-numPox Error: jsii compilation failed with non-zero exit code: 1 | [2023-01-06T13:38:34.682] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created | warning JSII6: A "peerDependency" on "constructs" at "10.1.183" means you should take a "devDependency" on "constructs" at "10.1.183" (found "undefined") | warning JSII6: A "peerDependency" on "cdktf" at "0.14.3" means you should take a "devDependency" on "cdktf" at "0.14.3" (found "undefined") | warning JSII3: There is no "README.md" file. It is required in order to generate valid PyPI (Python) packages. | providers/awscc/backup-backup-plan/index.ts:94:5 - error TS2740: Type '{ [key: string]: string; }' is missing the following properties from type 'StringMap': terraformResource, terraformAttribute, lookup, computeFqn, and 3 more. | 94 return this.getStringMapAttribute('backup_options'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/databrew-job/index.ts:2089:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 2089 return this.getStringMapAttribute('parameters'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/databrew-job/index.ts:2420:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 2420 return this.getStringMapAttribute('parameters'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/iot-topic-rule/index.ts:2853:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 2853 return this.getStringMapAttribute('client_properties'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/iot-topic-rule/index.ts:7680:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 7680 return this.getStringMapAttribute('client_properties'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---------------------------------------------------------------------------------- | Command: /usr/local/Cellar/cdktf/0.14.3/libexec/lib/node_modules/cdktf-cli/node_modules/jsii/bin/jsii --silence-warnings reserved-word | Workdir: /var/folders/y5/nm6gc8rj0p76ds9pwyfz2xym0000gn/T/temp-numPox +---------------------------------------------------------------------------------- at p (/usr/local/Cellar/cdktf/0.14.3/libexec/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:51:1581) at ChildProcess.<anonymous> (/usr/local/Cellar/cdktf/0.14.3/libexec/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:54:112) at Object.onceWrapper (node:events:628:26) at ChildProcess.emit (node:events:513:28) at ChildProcess.emit (node:domain:489:12) at ChildProcess._handle.onexit (node:internal/child_process:291:12) ⠋ downloading and generating modules and providers... jsii compilation failed with non-zero exit code: 1 | [2023-01-06T13:38:34.682] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created | warning JSII6: A "peerDependency" on "constructs" at "10.1.183" means you should take a "devDependency" on "constructs" at "10.1.183" (found "undefined") | warning JSII6: A "peerDependency" on "cdktf" at "0.14.3" means you should take a "devDependency" on "cdktf" at "0.14.3" (found "undefined") | warning JSII3: There is no "README.md" file. It is required in order to generate valid PyPI (Python) packages. | providers/awscc/backup-backup-plan/index.ts:94:5 - error TS2740: Type '{ [key: string]: string; }' is missing the following properties from type 'StringMap': terraformResource, terraformAttribute, lookup, computeFqn, and 3 more. | 94 return this.getStringMapAttribute('backup_options'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/databrew-job/index.ts:2089:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 2089 return this.getStringMapAttribute('parameters'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/databrew-job/index.ts:2420:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 2420 return this.getStringMapAttribute('parameters'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/iot-topic-rule/index.ts:2853:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 2853 return this.getStringMapAttribute('client_properties'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | providers/awscc/iot-topic-rule/index.ts:7680:5 - error TS2322: Type '{ [key: string]: string; }' is not assignable to type 'StringMap'. | 7680 return this.getStringMapAttribute('client_properties'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---------------------------------------------------------------------------------- | Command: /usr/local/Cellar/cdktf/0.14.3/libexec/lib/node_modules/cdktf-cli/node_modules/jsii/bin/jsii --silence-warnings reserved-word | Workdir: /var/folders/y5/nm6gc8rj0p76ds9pwyfz2xym0000gn/T/temp-numPox +----------------------------------------------------------------------------------

Expected Behavior

cdktf should be able to upgrade the terraform provider awscc from 0.32.0 to 0.33.0 without any issue.

Actual Behavior

upgrading the awscc version from 0.32.0 to 0.33.0( or any higher version) and running cdktf get command is throwing abover error.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

ewbankkit commented 1 year ago

Relates https://github.com/hashicorp/terraform-provider-awscc/pull/667.