Thursday, July 27, 2023

How to Print output from resources using terraform ?

test_output.tf 


provider "aws" {

    region = "us-east-1"

  

}




resource "aws_eip" "eip1" {

    domain = "vpc"

  

}



output "My_Public_ip" {

  

   value = aws_eip.eip1.public_ip

}






Terraform commands


terraform init

terraform plan

terraform apply





No comments:

Post a Comment