Modify and Destroy App Services ConfigurationΒΆ

In this section you will conduct basic add and delete administration using terraform

  1. Add 2nd Pool Member to service App1

    • use vscode to add the following code to app1.tf
    resource "bigip_ltm_node" "node2" {
      name    = "/Common/10.1.10.10"
      address = "10.1.10.10"
    }
    
    resource "bigip_ltm_pool_attachment" "attach_node2" {
      pool = "/Common/app1_pool"
      node = "/Common/10.1.10.10:80"
    }
    

    Hint

    Follow same syntax and spacing formats for best results. Notice existing bigip_ltm_node and bigip_ltm_pool_attachment resource dependencies.

  2. Redeploy App1 services

    • terraform plan
    • terraform apply -auto-approve
    ../../_images/t1apply.png

    Note

    The apply will most likely result with and error due to resource dependencies. If so, you may simply run terraform apply again. However I recommend you resolve the dependencies as hinted in the previous step to ensure consistency.

  3. Confirm app1_pool now contains 2 pool members

    • Explore BIG-IP GUI Local Traffic -> Network Map to view app1 services
    ../../_images/app1w2pool.png
  4. Destroy app1_vs resource

    • terraform destroy -target=bigip_ltm_virtual_server.http -auto-approve
    ../../_images/vsdestroy.png
  5. Confirm App1 services no longer exist

    • Explore Local Traffic -> Virtual Servers, Pools and Nodes
    ../../_images/vs.png ../../_images/pool.png ../../_images/node.png
  6. Destroy all services

    • terraform destroy -auto-approve
    ../../_images/destroy.png
  7. Confirm all services and network configs no longer exist

    • Explore BIG-IP GUI Local Traffic -> Virtual Servers, Pools and Nodes to view no app services
    • Explore BIG-IP GUI Network -> Self IPs and Network -> VLANs settings to validate they are not configured