# Allow ec2 instances outbound Internet connectivity
egress_cidr_blocks=["0.0.0.0/0"]
egress_rules=["all-all"]
}
#
# Create and place the inventory.yml file for the ansible demo
#
resource"null_resource""transfer"{
count=length(var.azs)
provisioner"file"{
content=templatefile(
"${path.module}/hostvars_template.yml",
{
bigip_host_ip=join(",",element(module.bigip.mgmt_addresses,count.index))#bigip_host_ip = module.bigip.mgmt_public_ips[count.index] the ip address that the bigip has on the management subnet
bigip_host_dns=module.bigip.mgmt_public_dns[count.index]# the DNS name of the bigip on the public subnet
bigip_external_self_ip=element(flatten(data.aws_network_interface.bar[count.index].private_ips),0)# the ip address that the bigip has on the public subnet
bigip_internal_self_ip=join(",",element(module.bigip.private_addresses,count.index))# the ip address that the bigip has on the private subnet