chore(e2e): Define docker attributes to prevent forced replacement on second launch (#4918)
* chore(e2e): Define settings to prevent forced replacement On a second `terraform apply`, there were a few attributes forcing the replacement (i.e. regeneration) of the resource. This commit defines some attributes explicitly to prevent the regeneration from occurring. * chore(e2e): Add extra timeout for openssh server
This commit is contained in:
1 parent
92b2d4490e
commit
1909889a6f
8 files changed
+18
-12
No files matched your search
@@ -130,8 +130,9 @@ resource "docker_container" "boundary" {
|
||||
timeout = "5s"
|
||||
retries = 5
|
||||
}
|
||||
wait = true
|
||||
must_run = true
|
||||
wait = true
|
||||
must_run = true
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
|
||||
@@ -67,13 +67,12 @@ resource "docker_container" "ldap" {
|
||||
})
|
||||
file = "/tmp/ldap/group.ldif"
|
||||
}
|
||||
|
||||
|
||||
healthcheck {
|
||||
test = ["CMD", "ldapsearch", "-H", "ldap://localhost", "-b", "${local.domain_dn}", "-D", "${local.admin_dn}", "-w", "${local.admin_password}"]
|
||||
}
|
||||
wait = true
|
||||
must_run = true
|
||||
wait = true
|
||||
must_run = true
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
|
||||
@@ -115,7 +115,8 @@ resource "docker_container" "minio_server" {
|
||||
timeout = "5s"
|
||||
retries = 5
|
||||
}
|
||||
wait = true
|
||||
wait = true
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
|
||||
@@ -66,6 +66,7 @@ resource "docker_container" "openssh_server" {
|
||||
"USER_NAME=${var.target_user}",
|
||||
"PUBLIC_KEY=${local.public_key}",
|
||||
]
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
|
||||
@@ -76,6 +76,7 @@ resource "docker_container" "openssh_server" {
|
||||
"USER_NAME=${var.target_user}",
|
||||
"PUBLIC_KEY=${local.ssh_public_key}",
|
||||
]
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
@@ -105,7 +106,7 @@ resource "enos_local_exec" "wait" {
|
||||
docker_container.openssh_server
|
||||
]
|
||||
|
||||
inline = ["timeout 30s bash -c 'until ssh -t -t -i ${var.private_key_file_path} -p 2222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes ${var.target_user}@localhost hostname; do sleep 2; done'"]
|
||||
inline = ["timeout 60s bash -c 'until ssh -t -t -i ${var.private_key_file_path} -p 2222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes ${var.target_user}@localhost hostname; do sleep 2; done'"]
|
||||
}
|
||||
|
||||
output "user" {
|
||||
|
||||
@@ -79,8 +79,9 @@ resource "docker_container" "postgres" {
|
||||
timeout = "5s"
|
||||
retries = 5
|
||||
}
|
||||
wait = true
|
||||
must_run = true
|
||||
wait = true
|
||||
must_run = true
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
|
||||
@@ -59,6 +59,7 @@ resource "docker_container" "vault" {
|
||||
capabilities {
|
||||
add = ["IPC_LOCK"]
|
||||
}
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
|
||||
@@ -122,8 +122,9 @@ resource "docker_container" "worker" {
|
||||
timeout = "5s"
|
||||
retries = 5
|
||||
}
|
||||
wait = var.worker_led_registration ? false : true
|
||||
must_run = true
|
||||
wait = var.worker_led_registration ? false : true
|
||||
must_run = true
|
||||
network_mode = "bridge"
|
||||
dynamic "networks_advanced" {
|
||||
for_each = var.network_name
|
||||
content {
|
||||
|
||||
Reference in new issue
Block a user