Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch Public IP address of new Instance from AWS CLI #113

Open
ruaridhg opened this issue Jul 4, 2024 · 3 comments
Open

Fetch Public IP address of new Instance from AWS CLI #113

ruaridhg opened this issue Jul 4, 2024 · 3 comments

Comments

@ruaridhg
Copy link
Contributor

ruaridhg commented Jul 4, 2024

Short Description

Instead of manually finding this on the AWS console, would it be possible to fetch this using the AWS CLI

Acceptance Criteria

No response

Dependencies

No response

Details

No response

@p-j-smith
Copy link
Contributor

You should be able to type terraform output from the /provision directory the list these outputs:

output "ansible_install_xnat" {
description = "Run this command from the `xnat-aws/configure` directory to install and configure XNAT."
value = "./install_xnat.sh"
}
output "xnat_web_url" {
description = "Once XNAT has been installed and configured, the web server will be accessible at this URL."
value = "http://${module.web_server.xnat_web_hostname}"
}

We could add more output if there's something missing here?

@ruaridhg
Copy link
Contributor Author

ruaridhg commented Jul 5, 2024

You should be able to type terraform output from the /provision directory the list these outputs:

output "ansible_install_xnat" {
description = "Run this command from the `xnat-aws/configure` directory to install and configure XNAT."
value = "./install_xnat.sh"
}
output "xnat_web_url" {
description = "Once XNAT has been installed and configured, the web server will be accessible at this URL."
value = "http://${module.web_server.xnat_web_hostname}"
}

We could add more output if there's something missing here?

Ooooh nice, the context is that to SSH into an Instance you need to know the Public IP address which changes so would be nice to avoid the AWS console and use terraform output

@p-j-smith
Copy link
Contributor

Ah yeah that would be a good output to add. It is written to the Ansible host file:

ansible_ip: ${xnat_web_public_ip}

but it would be nice to have it in the outputs too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants