F5 Per applications AS3 Declarations via Terraform

F5 Per applications AS3 Declarations via Terraform.

Good evening all,

I would like to put together a proof of concept surrounding using Terraform (the clients preferred automation platform) to populate and manage AS3 declarations. I am attempting to follow the following F5 docs page in my lab, and it is not working as I would have expected. https://clouddocs.f5.com/products/orchestration/terraform/latest/BIG-IP/per-app-as3.html#example2

I have two separate files such is suggested in the article. One with two applications (app1-2.json) that acts as the base line for the first push, then a second file (app3.json) with a third application that I would like to ADD to the existing AS3 deceleration leaving my F5 with 3 total applications.

I have one file main.tf that looks like the following:

resource “bigip_as3” “as3-example” {

as3_json = file(“app1-2.json”)

tenant_filter = var.tenant

tenant_name = “Tenant”

}

I use that main.tf file to push the original app1-2 file to produce the initial declaration with two applications. Then, I edit that file to look like

resource “bigip_as3” “as3-example” {

# as3_json = data.template_file.init.rendered

as3_json = file(“app3.json”)

tenant_filter = var.tenant

tenant_name = “Tenant”

}

Since per-application declarations are enabled, I assumed editing this file and applying it would push the third application and leave the other two in tact. That is not the case. When I push this edited main.tf file, it edits the existing declaration deleting app1 and app 2 and creating app3.

Can anyone shed some light on how we are supposed to use Terraform in per application deployments? I feel like I have to be missing something silly.