// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS CloudFormation */ export interface CloudformationStackSetConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#administration_role_arn CloudformationStackSet#administration_role_arn} */ readonly administrationRoleArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#capabilities CloudformationStackSet#capabilities} */ readonly capabilities?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#description CloudformationStackSet#description} */ readonly description?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#execution_role_name CloudformationStackSet#execution_role_name} */ readonly executionRoleName?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#name CloudformationStackSet#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#parameters CloudformationStackSet#parameters} */ readonly parameters?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#permission_model CloudformationStackSet#permission_model} */ readonly permissionModel?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#tags CloudformationStackSet#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#tags_all CloudformationStackSet#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#template_body CloudformationStackSet#template_body} */ readonly templateBody?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#template_url CloudformationStackSet#template_url} */ readonly templateUrl?: string; /** * auto_deployment block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#auto_deployment CloudformationStackSet#auto_deployment} */ readonly autoDeployment?: CloudformationStackSetAutoDeployment; /** * timeouts block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#timeouts CloudformationStackSet#timeouts} */ readonly timeouts?: CloudformationStackSetTimeouts; } export interface CloudformationStackSetAutoDeployment { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#enabled CloudformationStackSet#enabled} */ readonly enabled?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#retain_stacks_on_account_removal CloudformationStackSet#retain_stacks_on_account_removal} */ readonly retainStacksOnAccountRemoval?: boolean | cdktf.IResolvable; } export function cloudformationStackSetAutoDeploymentToTerraform(struct?: CloudformationStackSetAutoDeploymentOutputReference | CloudformationStackSetAutoDeployment): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { enabled: cdktf.booleanToTerraform(struct!.enabled), retain_stacks_on_account_removal: cdktf.booleanToTerraform(struct!.retainStacksOnAccountRemoval), } } export class CloudformationStackSetAutoDeploymentOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): CloudformationStackSetAutoDeployment | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._retainStacksOnAccountRemoval !== undefined) { hasAnyValues = true; internalValueResult.retainStacksOnAccountRemoval = this._retainStacksOnAccountRemoval; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: CloudformationStackSetAutoDeployment | undefined) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; this._retainStacksOnAccountRemoval = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; this._retainStacksOnAccountRemoval = value.retainStacksOnAccountRemoval; } } // enabled - computed: false, optional: true, required: false private _enabled?: boolean | cdktf.IResolvable; public get enabled() { return this.getBooleanAttribute('enabled') as any; } public set enabled(value: boolean | cdktf.IResolvable) { this._enabled = value; } public resetEnabled() { this._enabled = undefined; } // Temporarily expose input value. Use with caution. public get enabledInput() { return this._enabled; } // retain_stacks_on_account_removal - computed: false, optional: true, required: false private _retainStacksOnAccountRemoval?: boolean | cdktf.IResolvable; public get retainStacksOnAccountRemoval() { return this.getBooleanAttribute('retain_stacks_on_account_removal') as any; } public set retainStacksOnAccountRemoval(value: boolean | cdktf.IResolvable) { this._retainStacksOnAccountRemoval = value; } public resetRetainStacksOnAccountRemoval() { this._retainStacksOnAccountRemoval = undefined; } // Temporarily expose input value. Use with caution. public get retainStacksOnAccountRemovalInput() { return this._retainStacksOnAccountRemoval; } } export interface CloudformationStackSetTimeouts { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html#update CloudformationStackSet#update} */ readonly update?: string; } export function cloudformationStackSetTimeoutsToTerraform(struct?: CloudformationStackSetTimeoutsOutputReference | CloudformationStackSetTimeouts): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { update: cdktf.stringToTerraform(struct!.update), } } export class CloudformationStackSetTimeoutsOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): CloudformationStackSetTimeouts | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: CloudformationStackSetTimeouts | undefined) { if (value === undefined) { this.isEmptyObject = false; this._update = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._update = value.update; } } // update - computed: false, optional: true, required: false private _update?: string; public get update() { return this.getStringAttribute('update'); } public set update(value: string) { this._update = value; } public resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. public get updateInput() { return this._update; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html aws_cloudformation_stack_set} */ export class CloudformationStackSet extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_cloudformation_stack_set"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudformation_stack_set.html aws_cloudformation_stack_set} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options CloudformationStackSetConfig */ public constructor(scope: Construct, id: string, config: CloudformationStackSetConfig) { super(scope, id, { terraformResourceType: 'aws_cloudformation_stack_set', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._administrationRoleArn = config.administrationRoleArn; this._capabilities = config.capabilities; this._description = config.description; this._executionRoleName = config.executionRoleName; this._name = config.name; this._parameters = config.parameters; this._permissionModel = config.permissionModel; this._tags = config.tags; this._tagsAll = config.tagsAll; this._templateBody = config.templateBody; this._templateUrl = config.templateUrl; this._autoDeployment.internalValue = config.autoDeployment; this._timeouts.internalValue = config.timeouts; } // ========== // ATTRIBUTES // ========== // administration_role_arn - computed: false, optional: true, required: false private _administrationRoleArn?: string; public get administrationRoleArn() { return this.getStringAttribute('administration_role_arn'); } public set administrationRoleArn(value: string) { this._administrationRoleArn = value; } public resetAdministrationRoleArn() { this._administrationRoleArn = undefined; } // Temporarily expose input value. Use with caution. public get administrationRoleArnInput() { return this._administrationRoleArn; } // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // capabilities - computed: false, optional: true, required: false private _capabilities?: string[]; public get capabilities() { return this.getListAttribute('capabilities'); } public set capabilities(value: string[]) { this._capabilities = value; } public resetCapabilities() { this._capabilities = undefined; } // Temporarily expose input value. Use with caution. public get capabilitiesInput() { return this._capabilities; } // description - computed: false, optional: true, required: false private _description?: string; public get description() { return this.getStringAttribute('description'); } public set description(value: string) { this._description = value; } public resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. public get descriptionInput() { return this._description; } // execution_role_name - computed: true, optional: true, required: false private _executionRoleName?: string; public get executionRoleName() { return this.getStringAttribute('execution_role_name'); } public set executionRoleName(value: string) { this._executionRoleName = value; } public resetExecutionRoleName() { this._executionRoleName = undefined; } // Temporarily expose input value. Use with caution. public get executionRoleNameInput() { return this._executionRoleName; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // name - computed: false, optional: false, required: true private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // parameters - computed: false, optional: true, required: false private _parameters?: { [key: string]: string } | cdktf.IResolvable; public get parameters() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('parameters') as any; } public set parameters(value: { [key: string]: string } | cdktf.IResolvable) { this._parameters = value; } public resetParameters() { this._parameters = undefined; } // Temporarily expose input value. Use with caution. public get parametersInput() { return this._parameters; } // permission_model - computed: false, optional: true, required: false private _permissionModel?: string; public get permissionModel() { return this.getStringAttribute('permission_model'); } public set permissionModel(value: string) { this._permissionModel = value; } public resetPermissionModel() { this._permissionModel = undefined; } // Temporarily expose input value. Use with caution. public get permissionModelInput() { return this._permissionModel; } // stack_set_id - computed: true, optional: false, required: false public get stackSetId() { return this.getStringAttribute('stack_set_id'); } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // template_body - computed: true, optional: true, required: false private _templateBody?: string; public get templateBody() { return this.getStringAttribute('template_body'); } public set templateBody(value: string) { this._templateBody = value; } public resetTemplateBody() { this._templateBody = undefined; } // Temporarily expose input value. Use with caution. public get templateBodyInput() { return this._templateBody; } // template_url - computed: false, optional: true, required: false private _templateUrl?: string; public get templateUrl() { return this.getStringAttribute('template_url'); } public set templateUrl(value: string) { this._templateUrl = value; } public resetTemplateUrl() { this._templateUrl = undefined; } // Temporarily expose input value. Use with caution. public get templateUrlInput() { return this._templateUrl; } // auto_deployment - computed: false, optional: true, required: false private _autoDeployment = new CloudformationStackSetAutoDeploymentOutputReference(this as any, "auto_deployment", true); public get autoDeployment() { return this._autoDeployment; } public putAutoDeployment(value: CloudformationStackSetAutoDeployment) { this._autoDeployment.internalValue = value; } public resetAutoDeployment() { this._autoDeployment.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get autoDeploymentInput() { return this._autoDeployment.internalValue; } // timeouts - computed: false, optional: true, required: false private _timeouts = new CloudformationStackSetTimeoutsOutputReference(this as any, "timeouts", true); public get timeouts() { return this._timeouts; } public putTimeouts(value: CloudformationStackSetTimeouts) { this._timeouts.internalValue = value; } public resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { administration_role_arn: cdktf.stringToTerraform(this._administrationRoleArn), capabilities: cdktf.listMapper(cdktf.stringToTerraform)(this._capabilities), description: cdktf.stringToTerraform(this._description), execution_role_name: cdktf.stringToTerraform(this._executionRoleName), name: cdktf.stringToTerraform(this._name), parameters: cdktf.hashMapper(cdktf.anyToTerraform)(this._parameters), permission_model: cdktf.stringToTerraform(this._permissionModel), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), template_body: cdktf.stringToTerraform(this._templateBody), template_url: cdktf.stringToTerraform(this._templateUrl), auto_deployment: cloudformationStackSetAutoDeploymentToTerraform(this._autoDeployment.internalValue), timeouts: cloudformationStackSetTimeoutsToTerraform(this._timeouts.internalValue), }; } }