-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-resourcegroups) ResourceGroup doesn't properly inherit Tags, causes deploy failure #12986
Comments
I can confirm that this is a bug and still occurring in relevant synth output for ResourceGroup: "Tags": {
"myTagA": "myValueA",
"myTagB": "myValueB"
} I tested to see if the same configuration happens with other Cfn resources (such as Bucket), the issue seems to be isolated to |
The underlying problem is that it configures a TagManager with the wrong type. It's probably a simple fix, and I'd be happy to submit a PR - except that it's in generated code, and I can't see where I'd need to make the change. The following workaround is possible in the meantime: const resourceGroup = new CfnGroup(this, 'ResourceGroup', {
// ...etc.
})
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(resourceGroup as any).tags = new TagManager(TagType.STANDARD, 'AWS::ResourceGroups::Group', undefined, {
tagPropertyName: 'tags'
}) |
For some reason there is a patch to the cfn spec for ResoureGroups which is causing the tag type to be MAP instead of STANDARD: https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/cfnspec/spec-source/530_ResourceGroups_Tags_patch.json If we remove this patch, then the tag type will be STANDARD. The PR where it was added: #6995 (comment) I will consult with the team to see if it can be removed. |
… deploy failure (#16211) This PR removes a patch to the cloudformation spec that is no longer necessary. Without the patch, the correct tag type of STANDARD is generated for CfnResourceGroup. PR where the patch was introduced: #6995 Closes #12986 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
… deploy failure (aws#16211) This PR removes a patch to the cloudformation spec that is no longer necessary. Without the patch, the correct tag type of STANDARD is generated for CfnResourceGroup. PR where the patch was introduced: aws#6995 Closes aws#12986 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… deploy failure (aws#16211) This PR removes a patch to the cloudformation spec that is no longer necessary. Without the patch, the correct tag type of STANDARD is generated for CfnResourceGroup. PR where the patch was introduced: aws#6995 Closes aws#12986 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… deploy failure (aws#16211) This PR removes a patch to the cloudformation spec that is no longer necessary. Without the patch, the correct tag type of STANDARD is generated for CfnResourceGroup. PR where the patch was introduced: aws#6995 Closes aws#12986 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The Question
I get the folllowing error, when I try to deploy a stack including global tags and a ResourceGroup.
Environment
Other information
The text was updated successfully, but these errors were encountered: