File tree Expand file tree Collapse file tree 6 files changed +12
-7
lines changed
template/ec2-docker-compose-config Expand file tree Collapse file tree 6 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -72,3 +72,7 @@ output "sample_app_listen_address_ip" {
7272output "sample_app_listen_address_port" {
7373 value = " 4567"
7474}
75+
76+ output "sample_app_lb_port" {
77+ value = " 8080"
78+ }
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ data "template_file" "docker_compose" {
120120
121121 vars = {
122122 data_emitter_image = var.data_emitter_image
123+ sample_app_external_port = module.common.sample_app_lb_port
123124 sample_app_listen_address_port = module.common.sample_app_listen_address_port
124125 listen_address = " ${ module . common . sample_app_listen_address_ip } :${ module . common . sample_app_listen_address_port } "
125126 otel_resource_attributes = " service.namespace=${ module . common . otel_service_namespace } ,service.name=${ module . common . otel_service_name } "
@@ -158,7 +159,7 @@ resource "null_resource" "sample-app-validator" {
158159 }
159160
160161 provisioner "local-exec" {
161- command = " ${ module . common . validator_path } --args='-c ${ var . validation_config } -t ${ module . common . testing_id } --region ${ var . region } --metric-namespace ${ module . common . otel_service_namespace } /${ module . common . otel_service_name } --endpoint http://${ aws_instance . emitter . public_ip } :80 '"
162+ command = " ${ module . common . validator_path } --args='-c ${ var . validation_config } -t ${ module . common . testing_id } --region ${ var . region } --metric-namespace ${ module . common . otel_service_namespace } /${ module . common . otel_service_name } --endpoint http://${ aws_instance . emitter . public_ip } :${ module . common . sample_app_lb_port } '"
162163 working_dir = " ../../"
163164 }
164165}
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ resource "aws_lb_listener" "aoc_lb_listener" {
138138 count = var. sample_app_callable ? 1 : 0
139139
140140 load_balancer_arn = aws_lb. aoc_lb [0 ]. arn
141- port = 80
141+ port = module . common . sample_app_lb_port
142142 protocol = " HTTP"
143143
144144 default_action {
@@ -170,7 +170,7 @@ resource "aws_ecs_service" "aoc" {
170170
171171 provisioner "local-exec" {
172172 working_dir = " ../../"
173- command = " ${ module . common . validator_path } --args='-c ${ var . validation_config } -t ${ module . common . testing_id } --region ${ var . region } --metric-namespace ${ module . common . otel_service_namespace } /${ module . common . otel_service_name } --endpoint http://${ aws_lb . aoc_lb [0 ]. dns_name } :80 '"
173+ command = " ${ module . common . validator_path } --args='-c ${ var . validation_config } -t ${ module . common . testing_id } --region ${ var . region } --metric-namespace ${ module . common . otel_service_namespace } /${ module . common . otel_service_name } --endpoint http://${ aws_lb . aoc_lb [0 ]. dns_name } :${ module . common . sample_app_lb_port } '"
174174 }
175175}
176176
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ variable "aoc_image_repo" {
3838}
3939
4040variable "aoc_version" {
41- default = " v0.1.12-296689894 "
41+ default = " v0.1.0-324996423 "
4242}
4343
4444variable "validation_config" {
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ resource "kubernetes_service" "sample_app_service" {
211211 type = " LoadBalancer"
212212
213213 port {
214- port = 80
214+ port = module . common . sample_app_lb_port
215215 target_port = module. common . sample_app_listen_address_port
216216 }
217217 }
@@ -297,7 +297,7 @@ resource "kubernetes_pod" "aoc_pod" {
297297resource "null_resource" "callable_sample_app_validator" {
298298 count = var. sample_app_callable ? 1 : 0
299299 provisioner "local-exec" {
300- command = " ${ module . common . validator_path } --args='-c ${ var . validation_config } -t ${ module . common . testing_id } --region ${ var . region } --metric-namespace ${ module . common . otel_service_namespace } /${ module . common . otel_service_name } --endpoint http://${ kubernetes_service . sample_app_service [0 ]. load_balancer_ingress . 0 . hostname } :80 '"
300+ command = " ${ module . common . validator_path } --args='-c ${ var . validation_config } -t ${ module . common . testing_id } --region ${ var . region } --metric-namespace ${ module . common . otel_service_namespace } /${ module . common . otel_service_name } --endpoint http://${ kubernetes_service . sample_app_service [0 ]. load_balancer_ingress . 0 . hostname } :${ module . common . sample_app_lb_port } '"
301301 working_dir = " ../../"
302302 }
303303}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ services:
33 sample_app:
44 image: ${ data_emitter_image}
55 ports:
6- - "80 :${ sample_app_listen_address_port} "
6+ - "$ { sample_app_external_port } :${ sample_app_listen_address_port} "
77 environment:
88 LISTEN_ADDRESS: ${ listen_address}
99 OTEL_RESOURCE_ATTRIBUTES: ${ otel_resource_attributes}
You can’t perform that action at this time.
0 commit comments