[AWSCORE-511] Add cloud formation template for CUR 2.0#261
Conversation
RaphaelAllier
left a comment
There was a problem hiding this comment.
Would you mind also updating this doc https://datadoghq.atlassian.net/wiki/spaces/AWS/pages/3085599235/Deploy+Cloudformation+Templates once the PR is merged ?
Made a new nit comments, I think someone from core with some CFN knowledge should review the template
| @@ -0,0 +1,3 @@ | |||
| ## 0.0.1 | |||
There was a problem hiding this comment.
Very nit: Since the repo is for cloudformation mentioning aws in the path doesn't bring much
aws_cloud_cost_cur2/main.yaml
Outdated
| LoggingConfig: | ||
| ApplicationLogLevel: "INFO" | ||
| LogFormat: "JSON" | ||
| Runtime: "python3.11" |
There was a problem hiding this comment.
💬 suggestion: Let's start not in the past and pick a runtime that doesn't make it obsolete like Python 3.14, see https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
| @@ -0,0 +1,3 @@ | |||
| ## 0.0.1 | |||
There was a problem hiding this comment.
Not sure if this matters: you're using aws_cloud_cost_cur2 in the bucket everywhere, but the folder where this is located is called cloud_cost_cur2. Also, all other folder in this repo start with aws_.
Should we make it aws_cloud_cost_cur2 as well?
There was a problem hiding this comment.
Makes sense, I'll change it to aws_cloud_cost_cur2 for consistency in the repo.
Note: Please remember to review the contribution guidelines
if you have not yet done so.
What does this PR do?
This PR adds a new cloud formation template for using CUR 2.0 for AWS accounts. The template creates an S3 bucket (if not existing) and sets up the data exports which transfers billing files to the bucket. Additionally, it calls the Datadog API to update the AWS account with CCM configs provided from the parameters.
Testing Guidelines
I tested the release script by uploading it to a private bucket (on the playground sandbox account). For testing functionality, I created a stack with the template using the AWS CLI. I was able to confirm that it properly sets up the S3 bucket and the Data Export with the given bucket. I was also able to confirm that the
data_export_configsfor the account was properly set through this workflow.Additional Notes
Anything else we should know when reviewing?