Skip to content
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::RDS::DBCluster does not support CopyTagsToSnapshot #238

Closed
ctaintor opened this issue Oct 22, 2019 · 11 comments
Closed

AWS::RDS::DBCluster does not support CopyTagsToSnapshot #238

ctaintor opened this issue Oct 22, 2019 · 11 comments
Labels
database RDS, DynamoDB, ElastiCache, Neptune, Amazon Redshift, Amazon QLDB, Amazon DocumentDB
Milestone

Comments

@ctaintor
Copy link

AWS::RDS::DBCluster does not support CopyTagsToSnapshot

Scope of Request

AWS::RDS::DBCluster does not support CopyTagsToSnapshot

Expected behavior

In Create, I should be able to be able to set the CopyTagsToSnapshot attribute

Links to existing API doc

https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-cluster.html copy-tags-to-snapshot

Category tag

RDS

@TheDanBlanco TheDanBlanco added the database RDS, DynamoDB, ElastiCache, Neptune, Amazon Redshift, Amazon QLDB, Amazon DocumentDB label Oct 24, 2019
@craigataws craigataws added this to the cov milestone Jul 21, 2020
@rrezino
Copy link

rrezino commented Dec 21, 2020

Any news about it?

@tvb
Copy link

tvb commented Jan 13, 2021

Yes, I would like to know this as well @craigataws

@LukeHuston03878
Copy link

This has been available via CLI/API/AWS Console for two years now. Is there a reason why it has not been made available via CloudFormation?

@craigataws
Copy link

@tvb @LukeHuston03878 I have a coverage status meeting this week, I'll bring it up and advise here on the details

@craigataws craigataws added this to We're working on it in coverage-roadmap Apr 5, 2021
@craigataws
Copy link

Spoke to the dev team, they are picking this one up in an upcoming sprint. Moving this to 'We're working on it' status

@LukeHuston03878
Copy link

LukeHuston03878 commented Apr 6, 2021 via email

@mattvanstone
Copy link

I know this is not what this issue is about, but just recently learned about this and wanted to share for those who didn't know. You can use a custom resource to make any JavaScript API call. The custom resource below calls the modifyDBCluster action to set the CopyTagsToSnapshot to true when this resource is created. Since it is dependent on DatabaseB269D8BB for the the DBClusterIdentifier parameter it will execute after the cluster is created.

So it doesn't solve this, but it is a good workaround which avoids those manual changes outside of your IaC that drive me crazy. VPC Endpoints (#196) and CloudWatch Event Rules are other resources that don't currently support tagging through CloudFormation. This should work for those too.

This sample code was pulled out of a cdk synthesized CloudFormation template, but hopefully you get the idea.

    "copytags0C4036F5": {
      "Type": "Custom::AWS",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "AWS679f53fac002430cb0da5b7982bd22872D164C4C",
            "Arn"
          ]
        },
        "Create": {
          "Fn::Join": [
            "",
            [
              "{\"action\":\"modifyDBCluster\",\"service\":\"RDS\",\"parameters\":{\"CopyTagsToSnapshot\":true,\"DBClusterIdentifier\":\"",
              {
                "Ref": "DatabaseB269D8BB"
              },
              "\"},\"physicalResourceId\":{\"id\":\"copy-tags\"}}"
            ]
          ]
        },
        "InstallLatestAwsSdk": true
      },
      "DependsOn": [
        "copytagsCustomResourcePolicyD8D3C92E"
      ],
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "RdsCdkStack/copy-tags/Resource/Default"
      }
    }

Full template:
RdsCdkStack.template.txt

@LukeHuston03878
Copy link

LukeHuston03878 commented Apr 22, 2021 via email

@craigataws
Copy link

@LukeHuston03878, the dev team is actively working in it and on track for deployment in Q2.

@ascar73
Copy link

ascar73 commented May 6, 2021

Hi, @craigataws, any chance that the planned resolution will include handling AWS::DocDB::DBCluster?
If not, do you know if there's already a ticket opened for that related work (I didn't find one but may have missed it)?

@craigataws
Copy link

The CopyTagsToSnapshot property has been added to AWS::RDS::DBCluster: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-copytagstosnapshot

@ascar01973, AWS::DocDB::DBCluster would be a separate issue. Can you open an issue for that so we can track it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database RDS, DynamoDB, ElastiCache, Neptune, Amazon Redshift, Amazon QLDB, Amazon DocumentDB
Projects
coverage-roadmap
  
We're working on it
Development

No branches or pull requests

8 participants