Comments (1)
We can use this example for variables validations:
locals {
is_sns_or_email_set = length(var.cost_anomaly_detection_subscriber_sns_topic_arns) > 0 || length(var.cost_anomaly_detection_subscriber_email_addresses) > 0
is_threshold_set = var.cost_anomaly_detection_threshold != null
should_create = var.create_cost_anomaly_detection_alert
validate_condition = local.should_create && (!local.is_sns_or_email_set || !local.is_threshold_set)
validation_message = "If create_cost_anomaly_detection_alert is set to true, either SNS or email must be set, and the threshold must be non-null."
validate_check = regex(
"^${local.validation_message}$",
( !local.validate_condition
? local.validation_message
: "" ) )
}
from terraform-aws-slack-alerts.
Related Issues (17)
- Fix ci alerts
- Replace module direct module links to registry/github
- Optional object type attributes are experimental [terraform v1.0.9] HOT 1
- Add optional creation of module for anomaly alerts
- Terraform-aws-slack-alerts improvements sugestions HOT 1
- Fix terraform-aws-slack-alerts & publish it to registry HOT 1
- Change cost_anomaly_detection_monitor_name to not interfere with aws created default
- Fix using examples in README
- README, more examples HOT 1
- Savings plans / reservations expiration cloudwatch alerts HOT 1
- Consider automatically creating an SNS topic for every channel configuration
- Consider adding Localstack for testing
- Re check coments/examples/readme, publish HOT 1
- Test & debug aws health events alert HOT 2
- Test custom ChatBot slack notifications
- Create terraform Registry for repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-slack-alerts.