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

Bug: CF documentation syntax invalid #3019

Closed
1 of 5 tasks
rmalecky opened this issue Jun 23, 2019 · 0 comments Β· Fixed by #3021 or MechanicalRock/tech-radar#14 Β· May be fixed by MechanicalRock/cdk-constructs#5, MechanicalRock/cdk-constructs#6 or MechanicalRock/cdk-constructs#7
Closed
1 of 5 tasks

Comments

@rmalecky
Copy link
Contributor

rmalecky commented Jun 23, 2019

  • I'm submitting a ...
    • πŸͺ² bug report
    • πŸš€ feature request
    • πŸ“š construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.

Version: 0.35 (current)

The documentation for the CloudFront/CloudFrontWebDistribution construct appears have a few typos.

  • The code references CloudFrontDistribution but it looks like the construct has been renamed to CloudFrontWebDistribution

  • {isDefaultBehavior} results in an error, I think it should be {isDefaultBehavior: true}

    import { CloudFront } from '@aws-cdk/aws-cloudfront'
    
    const sourceBucket = new Bucket(this, 'Bucket');
    
    const distribution = new CloudFrontDistribution(this, 'MyDistribution', {
     originConfigs: [
       {
        s3OriginSource: {
        s3BucketSource: sourceBucket
         },
         behaviors : [ {isDefaultBehavior}]
       }
     ]
    });

rmalecky added a commit to rmalecky/aws-cdk that referenced this issue Jun 24, 2019
Fixes small typos in the CloudFrontWebDistribution construct example.

Fixes aws#3019
eladb pushed a commit that referenced this issue Jun 24, 2019
Fixes small typos in the CloudFrontWebDistribution construct example.

Fixes #3019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment