EnabledBaseline
The EnabledBaseline resource allows you to manage AWS ControlTower EnabledBaselines which are essential for enforcing governance and compliance across your AWS accounts.
Minimal Example
Section titled “Minimal Example”Create a basic EnabledBaseline with required properties and one optional parameter.
import AWS from "alchemy/aws/control";
const baseline = await AWS.ControlTower.EnabledBaseline("defaultBaseline", { BaselineVersion: "1.0.0", Parameters: [ { key: "encryptionEnabled", value: "true" } ], BaselineIdentifier: "myBaselineIdentifier", TargetIdentifier: "myTargetIdentifier"});
Advanced Configuration
Section titled “Advanced Configuration”Configure an EnabledBaseline with additional parameters and tags to enhance its functionality.
const advancedBaseline = await AWS.ControlTower.EnabledBaseline("advancedBaseline", { BaselineVersion: "1.1.0", Parameters: [ { key: "encryptionEnabled", value: "true" }, { key: "loggingLevel", value: "verbose" } ], BaselineIdentifier: "myAdvancedBaselineIdentifier", TargetIdentifier: "myAdvancedTargetIdentifier", Tags: [ { key: "Environment", value: "Production" }, { key: "Owner", value: "DevTeam" } ]});
Adoption of Existing Resources
Section titled “Adoption of Existing Resources”If you want to adopt existing resources instead of failing when the resource already exists, you can set the adopt property to true.
const adoptExistingBaseline = await AWS.ControlTower.EnabledBaseline("adoptExistingBaseline", { BaselineVersion: "1.0.0", BaselineIdentifier: "existingBaselineIdentifier", TargetIdentifier: "existingTargetIdentifier", adopt: true});