You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code.
What is the best method to quickly find the IP address of the resource you deployed?
You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code.
What is the best method to quickly find the IP address of the resource you deployed?
Given that no outputs were created in your Terraform code, running 'terraform output ip_address' will not yield any information. The best method to quickly find the IP address of the deployed resource is to run 'terraform state list' to find the name of the resource and then use 'terraform state show' followed by the resource name to display its attributes, which include the public IP address.
You can find the info in the state. not A because you don't have to outputs defined.
Not A- Since you have not defined Output Not B. You cannot write output from statafile C- works fine Not D -That will destroy the resource
agreed correct answer is C
C is the correct answer.
C is correct answer. https://www.terraform.io/cli/commands/state/show
C is the right one.
Agree with C
C is correct answer
C is correct answer.
C is the only logical answer. A is wrong, since output is not defied
Answer should be "C" instead of "A" You don't have output in the code then how to return from "A"?
"..., you did not create any outputs". So A cannot be an option. It would be it there was an output defined with the desired configuration. With C is posible to get the answer, too. So C.
C- is the correct answer, the question mentioned clearly that no output block is defined. so you can query the state using terraform state list to list down the resources_type.resource.name then use terraform show resource_type.resource_name to list down the state configuration that includes the IP address
The correct answer is C. Can't be A because no output was defined.
100% is C
If there is no output defined for the resource, the "output" command will not show anything. Correct is C.
A cannot be. You don't have any output declared, so there is no default output or something like that where you could find the ip address. On the other hand, terraform state list, and then show specific, contains the state and this includes the ip address
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address is the best method to quickly find the IP address of the resource you deployed. terraform state list will show you the name of all the resources currently tracked in your Terraform state. You can then use terraform state show followed by the resource name to see all the details of the resource, including any attributes like the public IP address.
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes, including the public IP address. Explanation: Not Option A (terraform output ip_address) assumes that there is an output variable named ip_address in your Terraform configuration, but since you mentioned that you did not create any outputs, this option may not be applicable.
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address If you have not created any outputs in your Terraform code, you can still find the public IP address of the resource by using the terraform state commands. First, you can run terraform state list to see a list of all the resources that Terraform is managing in the state file. Look for the resource with a type that matches your webapp, such as "aws_instance" or "google_compute_instance". Once you have found the name of the resource, you can run terraform state show <resource_name> to view all of the attributes of the resource, including the public IP address. For example, if the name of the resource is "webapp", you would run terraform state show webapp. This will display all of the attributes of the resource, including the public IP address.
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including the public IP address.
You can't output what is not defined as an output resource.
I feel even C is not correct, as it will not show you the attribute value. The correct command would be terraform state show
If the output is not defined then you will not get any output using the command mentioned in Option 1. Hence it is better to search the Value in state file.
Answer is C
Answer is C
Answer is C, I have tested it.
C is the correct answer.
correct
C is correct
C is the correct answer
C is correct,
C is the correct the answer. It can't be A as the output isn't defined
C i choose
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
C I choose too
C for sure
The question does not talk about any output defined so you can't expect one
Is it C or A ?
C is the correct answer.
vote for option C
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address. This option allows you to easily find the public IP address of the resource you deployed, without having to destroy and recreate it. The terraform state list command lists all of the resources that have been added to the state, while the terraform state show command displays the attributes of a specific resource, including its public IP address.
Answer C