We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5b11770 + 428ed0b commit b0837efCopy full SHA for b0837ef
terraform/dev-desktops/aws-region/instances.tf
@@ -1,5 +1,22 @@
1
// Instances
2
3
+resource "aws_eip" "dev_desktop" {
4
+ for_each = var.instances
5
+
6
+ vpc = true
7
8
+ tags = {
9
+ Name = each.key
10
+ }
11
+}
12
13
+resource "aws_eip_association" "dev_desktop" {
14
15
16
+ instance_id = aws_instance.instance[each.key].id
17
+ allocation_id = aws_eip.dev_desktop[each.key].id
18
19
20
resource "aws_instance" "instance" {
21
for_each = var.instances
22
@@ -140,7 +157,7 @@ resource "aws_route53_record" "ipv4" {
140
157
zone_id = data.aws_route53_zone.rust_lang_org.id
141
158
name = "${each.key}.infra.rust-lang.org"
142
159
type = "A"
143
- records = [aws_instance.instance[each.key].public_ip]
160
+ records = [aws_eip.dev_desktop[each.key].public_ip]
144
161
ttl = 60
145
162
}
146
163
0 commit comments