From b10af76d83b3d9adc694ebc2021eaf6e47e43964 Mon Sep 17 00:00:00 2001 From: Jon Udell Date: Tue, 6 Jun 2023 13:18:09 -0700 Subject: [PATCH 1/2] add sustainability pillar --- mod.sp | 4 ++- .../sustainability/sus02.sp | 27 +++++++++++++++++++ .../sustainability/sustainability.sp | 15 +++++++++++ .../well_architected_framework.sp | 3 ++- 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100755 well_architected_framework/sustainability/sus02.sp create mode 100755 well_architected_framework/sustainability/sustainability.sp diff --git a/mod.sp b/mod.sp index 8355ff5..2218860 100644 --- a/mod.sp +++ b/mod.sp @@ -1,7 +1,6 @@ // Benchmarks and controls for specific services should override the "service" tag locals { aws_well_architected_common_tags = { - category = "Compliance" plugin = "aws" service = "AWS" } @@ -87,5 +86,8 @@ mod "aws_well_architected" { tag_dimensions = var.tag_dimensions } } + mod "github.com/turbot/steampipe-mod-aws-thrifty" { + version = "^0.21.0" + } } } diff --git a/well_architected_framework/sustainability/sus02.sp b/well_architected_framework/sustainability/sus02.sp new file mode 100755 index 0000000..ddea09a --- /dev/null +++ b/well_architected_framework/sustainability/sus02.sp @@ -0,0 +1,27 @@ +locals { + well_architected_framework_sus02_common_tags = merge(local.well_architected_framework_sustainability_common_tags, { + question_id = "sus_sus_user" + }) +} + +benchmark "well_architected_framework_sus02" { + title = "SUS02 How do you align cloud resources to your demand?" + description = "Scale infrastructure to continually match demand and verify that you use only the minimum resources required to support your users." + children = [ + benchmark.well_architected_framework_sus02_bp02 + ] + + tags = local.well_architected_framework_sus02_common_tags +} + +benchmark "well_architected_framework_sus02_bp02" { + title = "BP02 Stop the creation and maintenance of unused assets" + description = "Decommission unused assets in your workload to reduce the number of cloud resources required to support your demand and minimize waste." + children = [ + aws_thrifty.control.ecs_cluster_low_utilization, + ] + + tags = merge(local.well_architected_framework_sus02_common_tags, { + choice_id = "sus_sus_user_a4" + }) +} diff --git a/well_architected_framework/sustainability/sustainability.sp b/well_architected_framework/sustainability/sustainability.sp new file mode 100755 index 0000000..6f7ef86 --- /dev/null +++ b/well_architected_framework/sustainability/sustainability.sp @@ -0,0 +1,15 @@ +locals { + well_architected_framework_sustainability_common_tags = merge(local.well_architected_framework_common_tags, { + pillar_id = "sustainability" + }) +} + +benchmark "well_architected_framework_sustainability" { + title = "Sustainability" + description = "The Sustainability pillar addresses the long-term environmental, economic, and societal impact of your business activities." + children = [ + benchmark.well_architected_framework_sus02 + ] + + tags = local.well_architected_framework_sustainability_common_tags +} diff --git a/well_architected_framework/well_architected_framework.sp b/well_architected_framework/well_architected_framework.sp index 4a12e8e..165311a 100644 --- a/well_architected_framework/well_architected_framework.sp +++ b/well_architected_framework/well_architected_framework.sp @@ -12,7 +12,8 @@ benchmark "well_architected_framework" { children = [ benchmark.well_architected_framework_operational_excellence, benchmark.well_architected_framework_reliability, - benchmark.well_architected_framework_security + benchmark.well_architected_framework_security, + benchmark.well_architected_framework_sustainability, ] tags = local.well_architected_framework_common_tags From bca2c59b84b2119bc84b60265d95720632a64771 Mon Sep 17 00:00:00 2001 From: Jon Udell Date: Wed, 7 Jun 2023 17:42:43 -0700 Subject: [PATCH 2/2] bp02 -> bp03, remove unneeded comma --- well_architected_framework/sustainability/sus02.sp | 6 +++--- well_architected_framework/well_architected_framework.sp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/well_architected_framework/sustainability/sus02.sp b/well_architected_framework/sustainability/sus02.sp index ddea09a..fab0c0b 100755 --- a/well_architected_framework/sustainability/sus02.sp +++ b/well_architected_framework/sustainability/sus02.sp @@ -8,14 +8,14 @@ benchmark "well_architected_framework_sus02" { title = "SUS02 How do you align cloud resources to your demand?" description = "Scale infrastructure to continually match demand and verify that you use only the minimum resources required to support your users." children = [ - benchmark.well_architected_framework_sus02_bp02 + benchmark.well_architected_framework_sus02_bp03 ] tags = local.well_architected_framework_sus02_common_tags } -benchmark "well_architected_framework_sus02_bp02" { - title = "BP02 Stop the creation and maintenance of unused assets" +benchmark "well_architected_framework_sus02_bp03" { + title = "BP03 Stop the creation and maintenance of unused assets" description = "Decommission unused assets in your workload to reduce the number of cloud resources required to support your demand and minimize waste." children = [ aws_thrifty.control.ecs_cluster_low_utilization, diff --git a/well_architected_framework/well_architected_framework.sp b/well_architected_framework/well_architected_framework.sp index 165311a..787c954 100644 --- a/well_architected_framework/well_architected_framework.sp +++ b/well_architected_framework/well_architected_framework.sp @@ -13,7 +13,7 @@ benchmark "well_architected_framework" { benchmark.well_architected_framework_operational_excellence, benchmark.well_architected_framework_reliability, benchmark.well_architected_framework_security, - benchmark.well_architected_framework_sustainability, + benchmark.well_architected_framework_sustainability ] tags = local.well_architected_framework_common_tags