Terraform: Step #2

After you complete Step #1 you should see URLs for Consul and BIG-IP.



It may take several minutes for the BIG-IP to become available.

Visit these URLS.





You may have to wait a few minutes before you can login.

Deploy AS3 Declaration

On the Ubuntu host run the following commands

$ cd ~/f5-terraform-consul-sd-webinar/as3/
$ terraform init
$ terraform plan
$ terraform apply

In this scenario we are executing a shell script that will deploy the "nginx.json" declaration that is configure to use Consul's API for service discovery.

You should see the following output.


Follow the URL and you should see NGINX.


At this point you should observe that on the BIG-IP there is partition named "Consul_SD". Select the partition (top right of screen).

This partition was created by the "nginx.json" that contains the following.

  "class": "ADC",
  "schemaVersion": "3.7.0",
  "id": "Consul_SD",
  "Consul_SD": {
    "class": "Tenant",
    "Nginx": {
      "class": "Application",
      "template": "http",
      "serviceMain": {
        "class": "Service_HTTP",
        "virtualPort": 8080,
        "virtualAddresses": [
        "pool": "web_pool",
        "persistenceMethods": [],
        "profileMultiplex": {
          "bigip": "/Common/oneconnect"
      "web_pool": {
        "class": "Pool",
        "monitors": [
        "members": [
            "servicePort": 80,
            "addressDiscovery": "consul",
            "updateInterval": 10,
            "uri": ""

Once the partition is selected you should observe there is a pool named "web_pool" and there is a single pool member. In the next step we will increase the number of NGINX nodes and you will see the change reflected on the BIG-IP.