My Bamboo plan runs a terraform to create a Centos VM and it outputs the IP address and I need it

William Flow September 9, 2021

My Bamboo plan runs a terraform script to create a Centos VM and it outputs the IP address and I need it so I can SSH to it in the next steps

 

I am a noob and have no idea how to get it

1 answer

1 accepted

0 votes
Answer accepted
DamCoder
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2021

 

Find the provider reference for your cloud provider.

And see what they offer for output values of instances.

Make an output.tf file with the value of the VM's IP address

 

AWS Example


output "instance_ip_addr" {
  value = aws_instance.server.private_ip
}

After you run the terraform plan, the IP address should be listed in the output.

I hope this helps get you on the right path to find the IP.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events