-
Notifications
You must be signed in to change notification settings - Fork 0
[PLT-1227] Cost Anomaly alert to slack #314
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jdettmannnava <[email protected]>
# Conflicts: # terraform/modules/bucket/main.tf
695b39c
to
74616f9
Compare
850cbaf
to
57c2e14
Compare
runs-on: codebuild-cdap-${{github.run_id}}-${{github.run_attempt}} | ||
defaults: | ||
run: | ||
working-directory: ./terraform/services/cost-anomaly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The working-directory default can be dropped here now that it's specified at the top level.
}), | ||
service = string, | ||
is_ephemeral_env = string | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this change is being made in #316?
terraform = true | ||
} | ||
} | ||
} No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End file with newline
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop blank lines
type = string | ||
validation { | ||
condition = contains(["dev", "test", "mgmt", "sandbox", "prod"], var.env) | ||
error_message = "Valid value for env is dev, test, mgmt, sandbox, or prod." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this should only run in bcda test and prod the environments can be limited to test and prod.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update description and error_message as well.
code = "https://github.com/CMSgov/cdap/tree/main/terraform/services/cost-anomaly" | ||
component = "cost-anomaly" | ||
environment = var.env | ||
terraform = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import the "standards" module and use it to set default tags.
type = string | ||
validation { | ||
condition = contains(["dev", "test", "mgmt", "sandbox", "prod"], var.env) | ||
error_message = "Valid value for env is dev, test, mgmt, sandbox, or prod." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update description and error_message as well.
Co-authored-by: Sean Fern <[email protected]>
Co-authored-by: Sean Fern <[email protected]>
- if: inputs.apply || (github.event_name == 'push' && github.ref == 'refs/heads/main') | ||
run: tofu apply -exclude=module.sns_to_slack_queue.data.aws_iam_policy_document.sns_send_message -exclude=module.sns_to_slack_queue.aws_sns_topic_subscription.this -auto-approve tf.plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This extra apply step appears to be left over from some kind of testing?
@@ -0,0 +1,59 @@ | |||
name: tf-cost-anomaly | |||
run-name: tf-cost-anomaly ${{ (inputs.apply || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'apply' || 'plan' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the cron trigger updates from #313
🎫 Ticket
https://jira.cms.gov/browse/PLT-1227
🛠 Changes
Added a cost anomaly cost monitor and sns topic subscription. This is the first part of required work for this feature. A lambda to push alerts to slack will be completed in PLT-1361
ℹ️ Context
Users want to be alerted in Slack about significant cost fluctuations, so that we can take actions on addressing potential cost anomalies.
🧪 Validation