AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::CloudFormation::ModuleDefaultVersion

CfnModuleDefaultVersion

Specifies the default version of a module. The default version of the module will be used in CloudFormation operations for this account and Region. For more information, see [Create reusable resource configurations that can be included across templates with CloudFormation modules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/modules.html) in the *CloudFormation User Guide* . For information about the CloudFormation registry, see [Managing extensions with the CloudFormation registry](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) in the *CloudFormation User Guide* .

Import

import { CfnModuleDefaultVersion } from 'aws-cdk-lib/aws-cloudformation';

Or use the module namespace:

import * as cloudformation from 'aws-cdk-lib/aws-cloudformation';
// cloudformation.CfnModuleDefaultVersion

Properties

Configuration passed to the constructor as CfnModuleDefaultVersionProps.

arnOptional
string | IModuleVersionRef

The Amazon Resource Name (ARN) of the module version to set as the default version. Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .

moduleNameOptional
string

The name of the module. Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .

versionIdOptional
string

The ID for the specific version of the module. Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter