terraform-ansible-setup
terraform-ansible-setup copied to clipboard
How to define this public_ip variable in output.tf?
- When init:
Error: output 'public_ip': "aws_instance.aws_instance.public_ip" is not a valid output for module "ec2"
- also output.tf:
value = "${module.ec2.aws_instance.aws_instance.public_ip}" Unresolved?
- thirdly we need to change?:
variable "public_ip" { description = "Public IP" default = "52.62.107.101" }
we need to change this correct? I guess they are one of the same thing. Be useful to know how to setup thanks
Hi @scheung38 , Thanks for raising the issue. Will test out the ec2 instance part and get back on the same.
For 3) Yeah, Its a default IP value so it can very well be changed.
still doesn't work after creating an aws instance and specifying my private IP address still getting the same error, plus i test the GCP code got the bellow errors.
Error: module.instance.google_compute_instance.sample[0]: "boot_disk": required field is not set
Error: module.instance.google_compute_instance.sample[0]: "disk": [REMOVED] Use boot_disk, scratch_disk, and attached_disk instead
Error: module.instance.google_compute_instance.sample[1]: "boot_disk": required field is not set
Error: module.instance.google_compute_instance.sample[1]: "disk": [REMOVED] Use boot_disk, scratch_disk, and attached_disk instead
Error: module.instance.google_compute_instance.sample[2]: "boot_disk": required field is not set
Error: module.instance.google_compute_instance.sample[2]: "disk": [REMOVED] Use boot_disk, scratch_disk, and attached_disk instead
not sure if am doing something wrong please advise?
thanks in advance