Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-cloudfront-s3): cloudFrontDistributionProps autocomplete is not populating #5

Closed
robertd opened this issue Jun 23, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@robertd
Copy link

robertd commented Jun 23, 2020

cloudFrontDistributionProps autocomplete is not populating

image

Reproduction Steps

import * as acs3 from '@aws-solutions-constructs/aws-cloudfront-s3';

new acs3.CloudFrontToS3(this, "test", {
      deployBucket: true,
      cloudFrontDistributionProps: {
        
      },
      bucketProps: {
        bucketName: "test"
      },
    });

Environment

  • CDK CLI Version : 1.46.0
  • CDK Framework Version: 1.46.0
  • AWS Solutions Constructs Version : 1.46.0
  • OS : MacOS
  • Language : Typescript

Other


This is 🐛 Bug Report

@robertd robertd added the bug Something isn't working label Jun 23, 2020
@robertd
Copy link
Author

robertd commented Jun 23, 2020

When I try to override the property...
image

I'm getting a warning:

WARN AWS_SOLUTIONS_CONSTRUCTS_WARNING: An override has been provided for the property: undefined.

@GerardKetuma
Copy link

There is a bug in the s3-bucket-helper function s3BucketWithLogging on the following line:

Currently it is:
bucketprops = DefaultS3Props;

But it should be:
bucketprops = DefaultS3Props(); as DefaultS3Props is a function that returns an object and bucketprops should be an object.

I'm creating a PR to resolve the issue.

@hnishar
Copy link
Contributor

hnishar commented Jul 7, 2020

robertd@ the PR has been merged and that should fix the override warning message..

Regarding the autocomplete issue, CloudFrontToS3Props has cloudFrontDistributionProps declared as cloudfront.CloudFrontWebDistributionProps | any.. due to the any type the IDE is probably not doing the autocomplete.. the any type is required otherwise the caller will need to set the mandatory originConfigs property of S3 bucket that is yet to be created by the pattern

@hnishar hnishar closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants