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

Incorrect documentation on overriding resource properties #2174

Closed
aaronbrashears opened this issue Apr 3, 2019 · 5 comments
Closed

Incorrect documentation on overriding resource properties #2174

aaronbrashears opened this issue Apr 3, 2019 · 5 comments

Comments

@aaronbrashears
Copy link

The documentation on https://docs.aws.amazon.com/CDK/latest/userguide/cfn_layer.html under the section "Overriding Resource Properties" does not work. The documentation specfies:

bucketResource.propertyOverrides.analyticsConfigurations = [
    {
        id: 'config1',
        storageClassAnalysis: {
            dataExport: {
                outputSchemaVersion: '1',
                destination: {
                    format: 'html',
                    bucketArn: otherBucket.bucketArn // use tokens freely
                }
            }
        }
    }
];

Someone found you can use addPropertyOverride() though the capitalization becomes important so this block would become:

bucketResource.addPropertyOverride('AnalyticsConfigurations', [
    {
        Id: 'config1',
        StorageClassAnalysis: {
            dataExport: {
                OutputSchemaVersion: '1',
                Destination: {
                    Format: 'html',
                    BucketArn: otherBucket.bucketArn // use tokens freely
                }
            }
        }
    }
]);
@aaronbrashears
Copy link
Author

Somewhat related: #1595

@otterley
Copy link
Contributor

otterley commented Apr 3, 2019

@Doug-AWS

@eladb
Copy link
Contributor

eladb commented Apr 3, 2019

When you say "does not work", what's the error message?

@Doug-AWS
Copy link
Contributor

Doug-AWS commented Apr 3, 2019

On it. I'm slowly replacing these hard-coded code examples with snippets (a system of adding tags within comments to identify the beginning and end of a chunk of code to put in the docs). This enables me to test my doc code examples with every release. and avoid making users feel the pain.

@Doug-AWS
Copy link
Contributor

Doug-AWS commented Apr 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants