This gist shows a prompt to analyze terraform plan output according to plain english rules.
An example is given for a pass scenario and a fail scenario with the same ruleset.
This gist shows a prompt to analyze terraform plan output according to plain english rules.
An example is given for a pass scenario and a fail scenario with the same ruleset.
Role: You are an expert in infrastructure-as-code and Terraform. Your task is to evaluate a Terraform plan output to ensure it complies with defined expectations. | |
Input Parameters: | |
1. Terraform Plan Output: | |
<TFPLAN_CONTENT> # EDIT | |
2. Business Context: | |
<BUSINESS_CONTEXT> # EDIT | |
3. Evaluation Rules: | |
- Name: <RULE_NAME> # EDIT | |
Description: <RULE_DESCRIPTION> # EDIT | |
Severity: <ERROR|WARN> # EDIT | |
----LLM INSTRUCTIONS---- | |
Instructions: | |
1. Compare the Terraform plan output against each rule. | |
2. Verify that all expected changes are present in the plan. | |
3. Identify any changes in the plan that weren't listed in expected changes. | |
4. Apply rules based on their severity: | |
- ERROR: Must pass for overall success | |
- WARN: Generate warning but don't cause failure | |
5. Provide specific reasons for any rule violations. | |
Output Format(IMPORTANT - OUTPUT MUST BE IN THIS FORMAT, NO EXTRA): | |
Rule Evaluations: | |
- Rule: <RULE_NAME> | |
Status: <PASS|FAIL|WARN> | |
Details: <Not present if passed, explanation if failed/warning> | |
Expected Changes Review: | |
- All expected changes present: <YES|NO> | |
- Unexpected changes found: <YES|NO> | |
- Details: <List any missing or unexpected changes> | |
Overall Result: <PASS|FAIL> |
Role: You are an expert in infrastructure-as-code and Terraform. Your task is to evaluate a Terraform plan output to ensure it complies with defined expectations. | |
Input Parameters: | |
1. Terraform Plan Output: | |
module.compute_nodegroup_az[0].aws_eks_node_group.this[0] will be updated in-place | |
resource "aws_eks_node_group" "this" { | |
id = "mitchellturner-stg-cluster:compute-1a-20241222161614381000000015" | |
~ labels = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (3 unchanged elements hidden) | |
} | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (18 unchanged elements hidden) | |
} | |
# (14 unchanged attributes hidden) | |
~ launch_template { | |
id = "lt-r3d4ct3d7414d9d" | |
name = "compute-1a-eks-node-group-2024122216160806680000000f" | |
~ version = "3" -> (known after apply) | |
} | |
# (4 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[0].aws_iam_role.this[0] will be updated in-place | |
resource "aws_iam_role" "this" { | |
id = "compute-1a-eks-node-group-20241222161606514700000002" | |
name = "compute-1a-eks-node-group-20241222161606514700000002" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (11 unchanged attributes hidden) | |
} | |
module.compute_nodegroup_az[0].aws_launch_template.this[0] will be updated in-place | |
resource "aws_launch_template" "this" { | |
~ default_version = 3 -> (known after apply) | |
id = "lt-r3d4ct3d7414d9d" | |
~ image_id = "ami-00a2c6fcb070edafc" -> "ami-013a08cedb97e8b25" | |
~ latest_version = 3 -> (known after apply) | |
name = "compute-1a-eks-node-group-2024122216160806680000000f" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (15 unchanged attributes hidden) | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
# (3 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[1].aws_eks_node_group.this[0] will be updated in-place | |
resource "aws_eks_node_group" "this" { | |
id = "mitchellturner-stg-cluster:compute-1b-20241222161614381000000013" | |
~ labels = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (3 unchanged elements hidden) | |
} | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (18 unchanged elements hidden) | |
} | |
# (14 unchanged attributes hidden) | |
~ launch_template { | |
id = "lt-r3d4ct3d86298b2" | |
name = "compute-1b-eks-node-group-20241222161608066900000011" | |
~ version = "3" -> (known after apply) | |
} | |
# (4 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[1].aws_iam_role.this[0] will be updated in-place | |
resource "aws_iam_role" "this" { | |
id = "compute-1b-eks-node-group-20241222161606514800000003" | |
name = "compute-1b-eks-node-group-20241222161606514800000003" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (11 unchanged attributes hidden) | |
} | |
module.compute_nodegroup_az[1].aws_launch_template.this[0] will be updated in-place | |
resource "aws_launch_template" "this" { | |
~ default_version = 3 -> (known after apply) | |
id = "lt-r3d4ct3d86298b2" | |
~ image_id = "ami-00a2c6fcb070edafc" -> "ami-013a08cedb97e8b25" | |
~ latest_version = 3 -> (known after apply) | |
name = "compute-1b-eks-node-group-20241222161608066900000011" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (15 unchanged attributes hidden) | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
# (3 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[2].aws_eks_node_group.this[0] will be updated in-place | |
resource "aws_eks_node_group" "this" { | |
id = "mitchellturner-stg-cluster:compute-1c-20241222161614381000000017" | |
~ labels = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (3 unchanged elements hidden) | |
} | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (18 unchanged elements hidden) | |
} | |
# (14 unchanged attributes hidden) | |
~ launch_template { | |
id = "lt-r3d4ct3d9ac322b" | |
name = "compute-1c-eks-node-group-2024122216160806680000000d" | |
~ version = "3" -> (known after apply) | |
} | |
# (4 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[2].aws_iam_role.this[0] will be updated in-place | |
resource "aws_iam_role" "this" { | |
id = "compute-1c-eks-node-group-20241222161606514700000001" | |
name = "compute-1c-eks-node-group-20241222161606514700000001" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (11 unchanged attributes hidden) | |
} | |
module.compute_nodegroup_az[2].aws_launch_template.this[0] will be updated in-place | |
resource "aws_launch_template" "this" { | |
~ default_version = 3 -> (known after apply) | |
id = "lt-r3d4ct3d9ac322b" | |
~ image_id = "ami-00a2c6fcb070edafc" -> "ami-013a08cedb97e8b25" | |
~ latest_version = 3 -> (known after apply) | |
name = "compute-1c-eks-node-group-2024122216160806680000000d" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (15 unchanged attributes hidden) | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
# (3 unchanged blocks hidden) | |
} | |
2. Business Context: | |
We perform weekly node refreshes | |
3. Evaluation Rules: | |
- Name: NodeRefreshMesssageUpdated | |
Description: "Node refresh message should be updated to todays date" | |
Severity: ERROR | |
Examples: | |
- Provided: jan-12-2025 | |
Result: PASS | |
- Provided: jan-5-2025 | |
Result: PASS | |
- Provided: January 12, 2025 | |
Result: FAIL | |
- Provided: January 5, 2025 | |
Result: FAIL | |
- Provided: 1736709342 | |
Result: FAIL | |
- Name: AMIUpdated | |
Description: "AMI ID should be updated" | |
Severity: ERROR | |
- Name: LaunchTemplateUpdates | |
Description: "Launch templates should be updated with new tag and AMI ID" | |
Severity: ERROR | |
- Name: NoUnexpectedChanges | |
Description: "No unexpected changes should be present in the plan" | |
Severity: ERROR | |
Instructions: | |
1. Compare the Terraform plan output against each rule. | |
2. Verify that all expected changes are present in the plan. | |
3. Identify any changes in the plan that weren't listed in expected changes. | |
4. Apply rules based on their severity: | |
- ERROR: Must pass for overall success | |
- WARN: Generate warning but don't cause failure | |
5. Provide specific reasons for any rule violations. | |
Output Format(IMPORTANT - OUTPUT MUST BE IN THIS FORMAT, NO EXTRA): | |
```yaml | |
Rule Evaluations: | |
- Rule: <RULE_NAME> | |
Status: <PASS|FAIL|WARN> | |
Details: <"OK" if passed, explanation if failed/warning> | |
Expected Changes Review: | |
- All expected changes present: <YES|NO> | |
- Unexpected changes found: <YES|NO> | |
- Details: <List any missing or unexpected changes> | |
Overall Result: <PASS|FAIL> | |
``` |
Rule Evaluations: | |
- Rule: NodeRefreshMesssageUpdated | |
Status: PASS | |
Details: OK | |
- Rule: AMIUpdated | |
Status: PASS | |
Details: OK | |
- Rule: LaunchTemplateUpdates | |
Status: PASS | |
Details: OK | |
- Rule: NoUnexpectedChanges | |
Status: PASS | |
Details: OK | |
Expected Changes Review: | |
- All expected changes present: YES | |
- Unexpected changes found: NO | |
- Details: All changes are related to the node refresh, AMI id update and refresh message update. No unexpected changes found | |
Overall Result: PASS |
Role: You are an expert in infrastructure-as-code and Terraform. Your task is to evaluate a Terraform plan output to ensure it complies with defined expectations. | |
Input Parameters: | |
1. Terraform Plan Output: | |
module.compute_nodegroup_az[0].aws_eks_node_group.this[0] will be updated in-place | |
resource "aws_eks_node_group" "this" { | |
id = "mitchellturner-stg-cluster:compute-1a-20241222161614381000000015" | |
~ labels = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
~ "stackName" = "staging-cluster" -> "stg-cluster" | |
# (3 unchanged elements hidden) | |
} | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
~ "stackName" = "staging-cluster" -> "stg-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (18 unchanged elements hidden) | |
} | |
# (14 unchanged attributes hidden) | |
~ launch_template { | |
id = "lt-r3d4ct3d7414d9d" | |
name = "compute-1a-eks-node-group-2024122216160806680000000f" | |
~ version = "3" -> (known after apply) | |
} | |
# (4 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[0].aws_iam_role.this[0] will be updated in-place | |
resource "aws_iam_role" "this" { | |
id = "compute-1a-eks-node-group-20241222161606514700000002" | |
name = "compute-1a-eks-node-group-20241222161606514700000002" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (11 unchanged attributes hidden) | |
} | |
module.compute_nodegroup_az[0].aws_launch_template.this[0] will be updated in-place | |
resource "aws_launch_template" "this" { | |
~ default_version = 3 -> (known after apply) | |
id = "lt-r3d4ct3d7414d9d" | |
~ image_id = "ami-00a2c6fcb070edafc" -> "ami-013a08cedb97e8b25" | |
~ latest_version = 3 -> (known after apply) | |
name = "compute-1a-eks-node-group-2024122216160806680000000f" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (15 unchanged attributes hidden) | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1a" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
# (3 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[1].aws_eks_node_group.this[0] will be updated in-place | |
resource "aws_eks_node_group" "this" { | |
id = "mitchellturner-stg-cluster:compute-1b-20241222161614381000000013" | |
~ labels = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (3 unchanged elements hidden) | |
} | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (18 unchanged elements hidden) | |
} | |
# (14 unchanged attributes hidden) | |
~ launch_template { | |
id = "lt-r3d4ct3d86298b2" | |
name = "compute-1b-eks-node-group-20241222161608066900000011" | |
~ version = "3" -> (known after apply) | |
} | |
# (4 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[1].aws_iam_role.this[0] will be updated in-place | |
resource "aws_iam_role" "this" { | |
id = "compute-1b-eks-node-group-20241222161606514800000003" | |
name = "compute-1b-eks-node-group-20241222161606514800000003" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (11 unchanged attributes hidden) | |
} | |
module.compute_nodegroup_az[1].aws_launch_template.this[0] will be updated in-place | |
resource "aws_launch_template" "this" { | |
~ default_version = 3 -> (known after apply) | |
id = "lt-r3d4ct3d86298b2" | |
~ image_id = "ami-00a2c6fcb070edafc" -> "ami-013a08cedb97e8b25" | |
~ latest_version = 3 -> (known after apply) | |
name = "compute-1b-eks-node-group-20241222161608066900000011" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (15 unchanged attributes hidden) | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1b" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
# (3 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[2].aws_eks_node_group.this[0] will be updated in-place | |
resource "aws_eks_node_group" "this" { | |
id = "mitchellturner-stg-cluster:compute-1c-20241222161614381000000017" | |
~ labels = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (3 unchanged elements hidden) | |
} | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (18 unchanged elements hidden) | |
} | |
# (14 unchanged attributes hidden) | |
~ launch_template { | |
id = "lt-r3d4ct3d9ac322b" | |
name = "compute-1c-eks-node-group-2024122216160806680000000d" | |
~ version = "3" -> (known after apply) | |
} | |
# (4 unchanged blocks hidden) | |
} | |
module.compute_nodegroup_az[2].aws_iam_role.this[0] will be updated in-place | |
resource "aws_iam_role" "this" { | |
id = "compute-1c-eks-node-group-20241222161606514700000001" | |
name = "compute-1c-eks-node-group-20241222161606514700000001" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (11 unchanged attributes hidden) | |
} | |
module.compute_nodegroup_az[2].aws_launch_template.this[0] will be updated in-place | |
resource "aws_launch_template" "this" { | |
~ default_version = 3 -> (known after apply) | |
id = "lt-r3d4ct3d9ac322b" | |
~ image_id = "ami-00a2c6fcb070edafc" -> "ami-013a08cedb97e8b25" | |
~ latest_version = 3 -> (known after apply) | |
name = "compute-1c-eks-node-group-2024122216160806680000000d" | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
~ tags_all = { | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
# (17 unchanged elements hidden) | |
} | |
# (15 unchanged attributes hidden) | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
~ tag_specifications { | |
~ tags = { | |
"mitchellId" = "d34d-b33f" | |
"Name" = "compute-1c" | |
"VantaContainsEPHI" = "false" | |
"VantaContainsUserData" = "false" | |
"VantaDescription" = "Testing and development" | |
"VantaNoAlert" = "Testing and development" | |
"VantaNonProd" = "true" | |
"VantaOwner" = "[email protected]" | |
"VantaUserDataStored" = "none" | |
"k8s.io/cluster-autoscaler/enabled" = "TRUE" | |
"k8s.io/cluster-autoscaler/mitchellturner-stg-cluster" = "owned" | |
"k8s.io/cluster-autoscaler/node-template/label/compute" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/coresvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/label/vpnsvcs" = "true" | |
"k8s.io/cluster-autoscaler/node-template/taint/compute" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/coresvcs" = "true:NoSchedule" | |
"k8s.io/cluster-autoscaler/node-template/taint/vpnsvcs" = "true:NoSchedule" | |
~ "mitchellturner.tld/node-refresh-message" = "jan-5-2025" -> "jan-12-2025" | |
"stackName" = "staging-cluster" | |
} | |
# (1 unchanged attribute hidden) | |
} | |
# (3 unchanged blocks hidden) | |
} | |
2. Business Context: | |
We perform weekly node refreshes | |
3. Evaluation Rules: | |
- Name: NodeRefreshMesssageUpdated | |
Description: "Node refresh message should be updated to todays date" | |
Severity: ERROR | |
Examples: | |
- Provided: jan-12-2025 | |
Result: PASS | |
- Provided: jan-5-2025 | |
Result: PASS | |
- Provided: January 12, 2025 | |
Result: FAIL | |
- Provided: January 5, 2025 | |
Result: FAIL | |
- Provided: 1736709342 | |
Result: FAIL | |
- Name: AMIUpdated | |
Description: "AMI ID should be updated" | |
Severity: ERROR | |
- Name: LaunchTemplateUpdates | |
Description: "Launch templates should be updated with new tag and AMI ID" | |
Severity: ERROR | |
- Name: NoUnexpectedChanges | |
Description: "No unexpected changes should be present in the plan" | |
Severity: ERROR | |
Instructions: | |
1. Compare the Terraform plan output against each rule. | |
2. Verify that all expected changes are present in the plan. | |
3. Identify any changes in the plan that weren't listed in expected changes. | |
4. Apply rules based on their severity: | |
- ERROR: Must pass for overall success | |
- WARN: Generate warning but don't cause failure | |
5. Provide specific reasons for any rule violations. | |
Output Format(IMPORTANT - OUTPUT MUST BE IN THIS FORMAT, NO EXTRA): | |
```yaml | |
Rule Evaluations: | |
- Rule: <RULE_NAME> | |
Status: <PASS|FAIL|WARN> | |
Details: <"OK" if passed, explanation if failed/warning> | |
Expected Changes Review: | |
- All expected changes present: <YES|NO> | |
- Unexpected changes found: <YES|NO> | |
- Details: <List any missing or unexpected changes> | |
Overall Result: <PASS|FAIL> | |
``` |
```yaml | |
Rule Evaluations: | |
- Rule: NodeRefreshMesssageUpdated | |
Status: PASS | |
Details: "OK" | |
- Rule: AMIUpdated | |
Status: PASS | |
Details: "OK" | |
- Rule: LaunchTemplateUpdates | |
Status: PASS | |
Details: "OK" | |
- Rule: NoUnexpectedChanges | |
Status: FAIL | |
Details: "Unexpected changes detected in the 'stackName' label and tag values. The 'stackName' is being updated from 'staging-cluster' to 'stg-cluster', which was not listed as an expected change." | |
Expected Changes Review: | |
- All expected changes present: YES | |
- Unexpected changes found: YES | |
- Details: "The 'stackName' label and tag values are being updated from 'staging-cluster' to 'stg-cluster', which was not listed as an expected change." | |
Overall Result: FAIL | |
``` |