Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit b51d47f

Browse files
committed
v1.3.1
1 parent a12b360 commit b51d47f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

agents/awsEc2/agent.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,11 @@ resource "aws_instance" "agent" {
141141
}
142142

143143
locals {
144-
_instances = var.spot ? aws_spot_instance_request.agent : aws_instance.agent
145-
# IP address, needs to handle the case instance was terminated by timeout
146-
ip_address = length(local._instances) > 0 ? lookup(local._instances[0], "public_ip") : null
144+
ip_address = length(local._ip_address) == 0 ? null : local._ip_address[0]
145+
_ip_address = flatten([
146+
aws_spot_instance_request.agent[*].public_ip,
147+
aws_instance.agent[*].public_ip
148+
])
147149
user = local.image["user"]
148150
image_version = data.aws_ami.agent.name
149151
}

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.3.0
1+
v1.3.1

0 commit comments

Comments
 (0)