diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-09-23 16:20:57 -0700 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-09-23 16:20:57 -0700 |
| commit | 46c0f8a62b56bb96f8bece5bf05cb3b8a0920d4f (patch) | |
| tree | a6a89c01e4f9f2c77e5c9d8e34636016788ba184 | |
| parent | Initial Commit (diff) | |
| download | site-infra-46c0f8a62b56bb96f8bece5bf05cb3b8a0920d4f.zip | |
Add ipv4 and ipv6 IP to resource creation output
| -rw-r--r-- | main.tf | 2 | ||||
| -rw-r--r-- | outputs.tf | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -26,7 +26,7 @@ resource "hcloud_ssh_key" "default" { public_key = file("~/.ssh/id_rsa.pub") } -resource "hcloud_server" "vm" { +resource "hcloud_server" "web01" { name = "web01" image = data.hcloud_image.openbsd.id server_type = "cx23" diff --git a/outputs.tf b/outputs.tf new file mode 100644 index 0000000..52ca13a --- /dev/null +++ b/outputs.tf @@ -0,0 +1,9 @@ +output "server_ipv4" { + description = "Public IPv4 address" + value = hcloud_server.web01.ipv4_address +} + +output "server_ipv6" { + description = "Public IPv6 address" + value = hcloud_server.web01.ipv6_address +} |