Skip to content

Commit 1ad12e0

Browse files
Fix terraform outputs (#82)
* output instance ids * Bring Terraform up to date --------- Co-authored-by: Adam Ciarciński <[email protected]>
1 parent 5dbcf4e commit 1ad12e0

File tree

8 files changed

+24
-16
lines changed

8 files changed

+24
-16
lines changed

terraform/examples/basic/main.tf.example

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ terraform {
144144
required_providers {
145145
aws = {
146146
source = "hashicorp/aws"
147-
version = "~> 5.0"
147+
version = "~> 6.0"
148148
}
149149
}
150150
}
@@ -536,31 +536,31 @@ resource "aws_security_group" "defguard_db_sg" {
536536
###########################################################################
537537

538538
output "defguard_core_private_address" {
539-
description = "The IP address of the Defguard Core instance in the internal network"
539+
description = "IP address of Defguard Core instance in the internal network"
540540
value = aws_network_interface.defguard_core_network_interface.private_ip
541541
}
542542

543543
output "defguard_core_public_address" {
544-
description = "The public IP address of the Defguard Core instance"
544+
description = "Public IP address of Defguard Core instance"
545545
value = aws_eip.defguard_core_endpoint.public_ip
546546
}
547547

548548
output "defguard_proxy_public_address" {
549-
description = "The public IP address of the Defguard Proxy instance"
549+
description = "Public IP address of Defguard Proxy instance"
550550
value = aws_eip.defguard_proxy_endpoint.public_ip
551551
}
552552

553553
output "defguard_proxy_private_address" {
554-
description = "The private IP address of the Defguard Proxy instance"
554+
description = "Private IP address of Defguard Proxy instance"
555555
value = aws_network_interface.defguard_proxy_network_interface.private_ip
556556
}
557557

558558
output "defguard_gateway_public_addresses" {
559-
description = "The public IP addresses of the Defguard Gateway instances"
559+
description = "Public IP addresses of Defguard Gateway instances"
560560
value = [for gw in aws_eip.defguard_gateway_endpoint : gw.public_ip]
561561
}
562562

563563
output "defguard_gateway_private_addresses" {
564-
description = "The private IP addresses of the Defguard Gateway instances"
564+
description = "Private IP addresses of Defguard Gateway instances"
565565
value = [for gw in aws_network_interface.defguard_gateway_network_interface : gw.private_ip]
566566
}

terraform/modules/core/main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ resource "aws_instance" "defguard_core" {
2424
})
2525
user_data_replace_on_change = true
2626

27-
network_interface {
27+
primary_network_interface {
2828
network_interface_id = var.network_interface_id
29-
device_index = 0
3029
}
3130

3231
tags = {
3332
Name = "defguard-core-instance"
3433
}
3534
}
36-

terraform/modules/core/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
output "instance_id" {
2+
description = "ID of Defguard Core instance"
3+
value = aws_instance.defguard_core.id
4+
}

terraform/modules/gateway/main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ resource "aws_instance" "defguard_gateway" {
1616
})
1717
user_data_replace_on_change = true
1818

19-
network_interface {
19+
primary_network_interface {
2020
network_interface_id = var.network_interface_id
21-
device_index = 0
2221
}
2322

2423
tags = {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
output "instance_id" {
2+
description = "ID of Defguard Gateway instance"
3+
value = aws_instance.defguard_gateway.id
4+
}

terraform/modules/proxy/main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ resource "aws_instance" "defguard_proxy" {
1212
})
1313
user_data_replace_on_change = true
1414

15-
network_interface {
15+
primary_network_interface {
1616
network_interface_id = var.network_interface_id
17-
device_index = 0
1817
}
1918

2019
tags = {

terraform/modules/proxy/outputs.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
output "proxy_private_address" {
2-
description = "The private IP address of the Defguard Proxy instance"
2+
description = "Private IP address of Defguard Proxy instance"
33
value = aws_instance.defguard_proxy.private_ip
44
}
5+
6+
output "instance_id" {
7+
description = "ID of Defguard Proxy instance"
8+
value = aws_instance.defguard_proxy.id
9+
}

terraform/modules/proxy/setup.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ rm -f /tmp/defguard-proxy.deb
4545

4646
log "Setup completed."
4747
) 2>&1 | tee -a "$LOG_FILE"
48-

0 commit comments

Comments
 (0)