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

Added a CF parameter to the InstallerStack to be able to opt in or out of anonymized data collection #294

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ export class InstallerStack extends cdk.Stack {
maxLength: 15,
});

private readonly sendAnonymousDataToAWS = new cdk.CfnParameter(this, 'sendAnonymousDataToAWS', {
type: 'String',
description: 'Whether to send anonymous data to AWS',
default: 'Yes',
allowedValues: ['Yes', 'No'],
});

/**
* Use existing configuration repository name flag
* @private
Expand Down Expand Up @@ -441,6 +448,7 @@ export class InstallerStack extends cdk.Stack {
repositoryOwner: this.repositoryOwner,
repositoryBranchName: this.repositoryBranchName,
repositoryName: this.repositoryName,
sendAnonymousDataToAWS: this.sendAnonymousDataToAWS,
});

// Create Accelerator Installer KMS Key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface SolutionHelperProps {
readonly repositoryOwner: cdk.CfnParameter;
readonly repositoryBranchName: cdk.CfnParameter;
readonly repositoryName: cdk.CfnParameter;
readonly sendAnonymousDataToAWS: cdk.CfnParameter;
}

export class SolutionHelper extends Construct {
Expand All @@ -31,7 +32,7 @@ export class SolutionHelper extends Construct {
const metricsMapping = new cdk.CfnMapping(this, 'AnonymousData', {
mapping: {
SendAnonymizedData: {
Data: 'Yes',
Data: props.sendAnonymousDataToAWS.valueAsString,
},
},
});
Expand Down