Skip to content
GitHubXDiscordRSS

EnabledBaseline

Learn how to create, update, and manage AWS ControlTower EnabledBaselines using Alchemy Cloud Control.

The EnabledBaseline resource allows you to manage AWS ControlTower EnabledBaselines which are essential for enforcing governance and compliance across your AWS accounts.

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"
});

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"
}
]
});

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
});