Skip to content

Commit

Permalink
Try fix flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganeshrockz committed Dec 8, 2023
1 parent 638a29b commit 51218ed
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion examples/api-gateway/controller.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module "ecs_controller" {
consul_server_hosts = module.dc1.dev_consul_server.server_dns
consul_ca_cert_arn = module.dc1.dev_consul_server.ca_cert_arn
launch_type = "FARGATE"
consul_ecs_image = "ganeshrockz/api-gateway"

consul_bootstrap_token_secret_arn = module.dc1.dev_consul_server.bootstrap_token_secret_arn

Expand Down
2 changes: 1 addition & 1 deletion examples/api-gateway/echo-service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ variable "consul_ca_cert_arn" {
variable "consul_ecs_image" {
description = "Consul ECS image to used for the controller task."
type = string
default = "ganeshrockz/api-gateway"
default = "hashicorppreview/consul-ecs:0.8.0-dev"
}

variable "private_subnets" {
Expand Down
2 changes: 0 additions & 2 deletions examples/api-gateway/gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ module "api_gateway" {
container_port = 8443
target_group_arn = aws_lb_target_group.this.arn
}]

consul_ecs_image = "ganeshrockz/api-gateway"
}

# Ingress rule for the API Gateway task that accepts traffic from the API gateway's LB
Expand Down
7 changes: 6 additions & 1 deletion test/acceptance/tests/basic/terraform/basic-install/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ locals {

module "consul_server" {
source = "../../../../../../modules/dev-server"
lb_enabled = false
lb_enabled = true
ecs_cluster_arn = var.ecs_cluster_arn
subnet_ids = var.subnets
vpc_id = var.vpc_id
name = "consul_server_${var.suffix}"
lb_subnets = var.subnets
lb_ingress_rule_cidr_blocks = ["0.0.0.0/0"]
log_configuration = {
logDriver = "awslogs"
options = {
Expand Down Expand Up @@ -134,6 +136,7 @@ resource "aws_security_group_rule" "consul_server_ingress" {

module "ecs_controller" {
count = var.secure ? 1 : 0
depends_on = [module.consul_server]
source = "../../../../../../modules/controller"
log_configuration = {
logDriver = "awslogs"
Expand Down Expand Up @@ -173,6 +176,7 @@ resource "aws_ecs_service" "test_client" {
}

module "test_client" {
depends_on = [module.consul_server]
source = "../../../../../../modules/mesh-task"
// mesh-task will lower case this to `test_client_<suffix>` for the service name.
family = "Test_Client_${var.suffix}"
Expand Down Expand Up @@ -265,6 +269,7 @@ resource "aws_ecs_service" "test_server" {
}

module "test_server" {
depends_on = [module.consul_server]
source = "../../../../../../modules/mesh-task"
family = "test_server_${var.suffix}"
consul_service_name = "${var.server_service_name}_${var.suffix}"
Expand Down

0 comments on commit 51218ed

Please sign in to comment.