hashicorp / terraform-cdk

Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform
https://www.terraform.io/cdktf
Mozilla Public License 2.0
4.84k stars 450 forks source link

Convert: Nested named structs are not properly addressed (JSII upstream issue) #2800

Open ansgarm opened 1 year ago

ansgarm commented 1 year ago

Community Note

Expected Behavior

convert should return:

aws.s3_bucket.S3Bucket(self, "bucket",
    logging=aws.s3_bucket.S3BucketLogging(
        target_bucket="target"
    )
)

Actual Behavior

convert returns no proper access for S3BucketLogging

aws.s3_bucket.S3Bucket(self, "bucket",
    logging=S3BucketLogging(
        target_bucket="target"
    )
)

Steps to Reproduce

Convert the following snippet to e.g. Python

resource "aws_s3_bucket" "bucket" {
  logging {
    target_bucket = "target"
  }
}

Important Factoids

More details (e.g. for other languages) can be found in the upstream issue linked below

References