# CloudFormationValidatePlugin

Validation plugin that uses the CloudFormation validation engine to evaluate templates against built-in rules.

Extends: CloudFormationValidatePlugin
Implements: IPolicyValidationPlugin

- Source: [`core/lib/validation/cloudformation-validate-plugin.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/validation/cloudformation-validate-plugin.ts#L93)
- Type last changed: v2.262.0 · 22 Jul 2026

## Example

```ts
const app = new App();

// Rules text, read from disk perhaps
declare const myRules: string;

Validations.of(app).addPlugins(new CloudFormationValidatePlugin({
  guardRules: [{
    name: 'My rules',
    content: myRules,
  }],
}));
```

## Initializer

```ts
new CloudFormationValidatePlugin(props?: CloudFormationValidatePluginProps)
```

## Properties

- `name`: string — The name of the plugin that will be displayed in the validation report.

- `PLUGIN_NAME`: string (static) — The default name of this plugin.

- `ruleIds`: string[] — The list of rule IDs that the plugin will evaluate.

  Used for analytics
  purposes.

- `version`: string — The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.

## Methods

- `validate(context: IPolicyValidationContext): PolicyValidationPluginReport` — The method that will be called by the CDK framework to perform validations.

  This is where the plugin will evaluate the CloudFormation
  templates for compliance and report and violations
