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:
Michael Li authored and GitHub committed 2024-07-08 10:08:34 -04:00
1 parent 92b2d4490e
commit 1909889a6f
8 files changed
+18 -12

No files matched your search

@@ -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" {