File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,21 @@ resource "time_sleep" "wait_until_metrics_collected" {
9999 depends_on = [module . ec2_setup ]
100100}
101101
102+ # performance_validation.yml is generated above and baked into the validator
103+ # image at build time (the Dockerfile COPYs src/), so the image must be built
104+ # after the config file exists and before the validator container runs.
105+ resource "null_resource" "build_validator_image" {
106+ triggers = {
107+ validation_config = local_file.validation_config_file.content
108+ }
109+
110+ provisioner "local-exec" {
111+ command = " docker build -t aoc-validator:local ../../validator"
112+ }
113+
114+ depends_on = [local_file . validation_config_file ]
115+ }
116+
102117module "validator" {
103118 source = " ../validation"
104119
@@ -107,5 +122,5 @@ module "validator" {
107122 testing_id = module. ec2_setup . testing_id
108123 metric_namespace = var. performance_metric_namespace
109124
110- depends_on = [time_sleep . wait_until_metrics_collected ]
125+ depends_on = [time_sleep . wait_until_metrics_collected , null_resource . build_validator_image ]
111126}
You can’t perform that action at this time.
0 commit comments