aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[ AWS::Cloudformation::Stack ] Support for custom-named NestedStacks

Open
#1,836 1 comment 19 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::CloudFormation::Stack

### Resource name

_No response_

### Description

Currently, it seems that there is no way to apply custom naming conventions to NestedStacks. They default to the following convention: ```{ParentStackName}-{LogicalId}-{GUID}```

The [StackName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html#cfn-cloudformation-stack-stackname) is documented, and found in the resource type's schema:

Upon deployment, the parent stack fails to create NestedStack with:
```Encountered unsupported property StackName```

**Kindly consider allowing customized NestedStack names**

**Schema**
```aws cloudformation describe-type --type-name AWS::CloudFormation::Stack --type RESOURCE --output json > aws-cloudformation-stack.json```

```
{
"typeName": "AWS::CloudFormation::Stack",
"description": "The AWS::CloudFormation::Stack resource nests a stack as a resource in a top-level template.",
"additionalProperties": false,
"properties": {
"Capabilities": {
"type": "array",
"uniqueItems": false,
"items": {
"type": "string",
"enum": [
"CAPABILITY_IAM",
"CAPABILITY_NAMED_IAM",
"CAPABILITY_AUTO_EXPAND"
]
}
},
"RoleARN": {
"type": "string"
},
"Outputs": {
"type": "array",
"uniqueItems": false,
"items": {
"$ref": "#/definitions/Output"
}
},
"Description": {
"type": "string",
"minLength": 1,
"maxLength": 1024
},
"DisableRollback": {
"type": "boolean"
},
"EnableTerminationProtection": {
"type": "boolean"
},
"NotificationARNs": {
"type": "array",
"uniqueItems": false,
"items": {
"type": "string"
},
"maxItems": 5
},
"Parameters": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"[a-zA-Z0-9]+": {
"type": "string"
}
}
},
"ParentId": {
"type": "string"
},
"RootId": {
"type": "string"
},
"ChangeSetId": {
"type": "string"
},
"StackName": {
"type": "string"
},
"StackId": {
"type": "string"
},
"StackPolicyBody": {
"type": "object"
},
"StackPolicyURL": {
"type": "string"
},
"StackStatus": {
"type": "string",
"enum": [
"CREATE_IN_PROGRESS",
"CREATE_FAILED",
"CREATE_COMPLETE",
"ROLLBACK_IN_PROGRESS",
"ROLLBACK_FAILED",
"ROLLBACK_COMPLETE",
"DELETE_IN_PROGRESS",
"DELETE_FAILED",
"DELETE_COMPLETE",
"UPDATE_IN_PROGRESS",
"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS",
"UPDATE_COMPLETE",
"UPDATE_FAILED",
"UPDATE_ROLLBACK_IN_PROGRESS",
"UPDATE_ROLLBACK_FAILED",
"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS",
"UPDATE_ROLLBACK_COMPLETE",
"REVIEW_IN_PROGRESS",
"IMPORT_IN_PROGRESS",
"IMPORT_COMPLETE",
"IMPORT_ROLLBACK_IN_PROGRESS",
"IMPORT_ROLLBACK_FAILED",
"IMPORT_ROLLBACK_COMPLETE"
]
},
"StackStatusReason": {
"type": "string"
},
"Tags": {
"type": "array",
"uniqueItems": false,
"insertionOrder": false,
"items": {
"$ref": "#/definitions/Tag"
},
"maxItems": 50
},
"TemplateBody": {
"type": "object"
},
"TemplateURL": {
"type": "string",
"minLength": 1,
"maxLength": 1024
},
"TimeoutInMinutes": {
"type": "integer",
"minimum": 1
},
"LastUpdateTime": {
"type": "string"
},
"CreationTime": {
"type": "string"
}
},
"definitions": {
"Tag": {
"type": "object",
"additionalProperties": false,
"properties": {
"Key": {
"type": "string"
},
"Value": {
"type": "string"
}
},
"required": [
"Value",
"Key"
]
},
"Output": {
"type": "object",
"additionalProperties": false,
"properties": {
"Description": {
"type": "string"
},
"ExportName": {
"type": "string"
},
"OutputKey": {
"type": "string"
},
"OutputValue": {
"type": "string"
}
}
}
},
"required": [
"StackName"
],
"readOnlyProperties": [
"/properties/StackId",
"/properties/StackStatus",
"/properties/CreationTime",
"/properties/RootId",
"/properties/ParentId",
"/properties/ChangeSetId",
"/properties/Outputs",
"/properties/LastUpdateTime"
],
"writeOnlyProperties": [
"/properties/TemplateURL",
"/properties/StackPolicyURL"
],
"createOnlyProperties": [
"/properties/StackName"
],
"primaryIdentifier": [
"/properties/StackId"
],
"additionalIdentifiers": [
[
"/properties/StackName"
]
],
"tagging": {
"taggable": true,
"tagOnCreate": true,
"tagUpdatable": true,
"cloudFormationSystemTags": true,
"tagProperty": "/properties/Tags"
},
"handlers": {
"create": {
"permissions": [
"cloudformation:DescribeStacks",
"cloudformation:CreateStack",
"iam:PassRole"
]
},
"update": {
"permissions": [
"cloudformation:DescribeStacks",
"cloudformation:UpdateStack",
"cloudformation:UpdateTerminationProtection",
"cloudformation:SetStackPolicy",
"iam:PassRole"
]
},
"delete": {
"permissions": [
"cloudformation:DescribeStacks",
"cloudformation:DeleteStack"
]
},
"read": {
"permissions": [
"cloudformation:DescribeStacks",
"cloudformation:GetStackPolicy",
"cloudformation:GetTemplate"
]
},
"list": {
"permissions": [
"cloudformation:ListStacks"
]
}
}
}

```

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

No repository files or tests are named in the issue. Start by reviewing the AWS::CloudFormation::Stack schema, the documented StackName property, and the supplied aws cloudformation describe-type command; done means the requested custom naming behavior for nested stacks is supported and the unsupported-property failure is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.