carlos / opentofu Public

Clone
git clone https://amadan.net/carlos/opentofu

Plain git — no account needed to clone.

Download

Download this file

1output "hosts" {
2 value = {
3 for key, instance in aws_instance.host : key => {
4 instance_id = instance.id
5 public_ip = aws_eip.host[key].public_ip
6 availability_zone = instance.availability_zone
7 }
8 }
9}
10
11output "host_count" {
12 value = length(aws_instance.host)
13}
14
15output "storage" {
16 value = {
17 deployment_bucket = var.deployment_bucket_name
18 deployment_region = var.deployment_region
19 data_bucket = var.data_bucket_name
20 data_region = data.aws_region.current.region
21 object_resources = jsondecode(aws_iam_role_policy.buckets.policy).Statement[0].Resource
22 }
23}
24
25output "role_arn" { value = aws_iam_role.host.arn }
26