全て書くと以下のようになります。 output "instance_ip_addr" { value = aws_instance.server.private_ip description = "The private IP address of the main server instance." sensitive = true depends_on = [ # Security group rule must be created before this IP address could # actually be used, otherwise the services will be unreachable. aws_security_group_rule.local_access, ] } 補足ですが、valueはlist形式でもOKです。 他のModuleの値を参照する O
![[Terraform]Module間の値の受け渡しについて | DevelopersIO](https://cdn-ak-scissors.b.st-hatena.com/image/square/8a77b081e14c8d61a2e80498092f8ffb9b60da03/height=288;version=1;width=512/https%3A%2F%2Fdevio2023-media.developers.io%2Fwp-content%2Fuploads%2F2019%2F05%2Fterraform-eyecatch.png)