Open curtkersey opened 3 years ago
@curtkersey we just create DO json file in working directory, it is left to user to push DO config onto BIGIP VE as of now. this can be achieved by using : https://registry.terraform.io/providers/F5Networks/bigip/latest/docs/resources/bigip_do
It'd be great to document integration between this module and the bigip provider for automation of AS3/DO without having to do separate curls after terraform apply. I'm using the bigip_aws_3nic_deploy example as a starting point and having a tough time passing outputs of the bigip module to the provider:
provider "bigip"{
address = module.bigip[0].mgmtPublicDNS[0]
username = module.bigip[0].f5_username
password = module.bigip[0].bigip_password
}
resource "bigip_do" "bigip" {
provider = bigip
do_json = "${file("DO_3nic-instance-${var.region}-0.json")}"
timeout = 15
}
For one, this is hard to scale with instance_count since terraform doesn't allow providers to have variable aliases, but I'm even having a hard time statically keying in index [0] upon the initial terraform apply, and I get the below error:
Error: BigIP provider requires address, username and password
on bigip-vpc/main.tf line 199, in provider "bigip":
199: provider "bigip"{
Error: BigIP provider requires address, username and password
on bigip-vpc/main.tf line 199, in provider "bigip":
199: provider "bigip"{
If I comment out the provider and bigip_do blocks, run terraform apply, uncomment the blocks and run terraform apply again, it works.
When using the example and looking at the log file /var/log/startup-script.log, I can see all the packages installed: AS3, DO, TS, FAST, CFE. In the directory on my host where I am running TF, I can see the DO JSON file that is generated to do the initial configuration; however, the networking configuration (DNS, NTP, VLANs, self-IPs) is not present on the VE. Is sending to DO file meant to be a part of the TF, or is that exercise left for the user?