F5 Public Cloud Solutions > Event-Driven Service Discovery w/ HashiCorp Consul Terraform Sync and BIG-IP > Deploy AS3 FAST template on BIG-IP Source | Edit on
Learn about AS3 FAST template¶
Below is an example FAST template yaml we are using for this lab.
The definitions
section lists out the objects which are templatized
for example tenant, app, virtualAddress and virtualPort are templatized
below and the values can be specified in the parameters
as shown
Below in the template section you can see how tenant is templatized as {{tenant}}
title: Consul Service Discovery
description: This template will create a virtual server that will use event driven service discovery
definitions:
tenant:
title: Name of tenant
description: give a unique name for this tenant
app:
title: Application
description: give a unique name for this application
virtualAddress:
title: Virtual Address
description: IP addresses of virtual addresses (will create 80/443)
virtualPort:
title: Virtual Port
description: Port that will be used
type: integer
parameters:
virtualAddress: 10.0.0.200
virtualPort: 8080
tenant: "Consul_SD"
app: "Nginx"
template: |
{
"class": "AS3",
"action": "deploy",
"persist": true,
"declaration": {
"class": "ADC",
"schemaVersion": "3.0.0",
"id": "urn:uuid:940bdb69-9bcd-4c5c-9a34-62777210b581",
"label": "Consul Webinar",
"remark": "Consul Webinar",
"{{tenant}}": {
"class": "Tenant",
"{{app}}": {
"class": "Application",
"webserver_vs": {
"class": "Service_HTTP",
"virtualPort": {{virtualPort}},
"virtualAddresses": [
"{{virtualAddress}}"
],
"pool": "nginx_pool",
"persistenceMethods": [],
"profileMultiplex": {
"bigip": "/Common/oneconnect"
}
},
"nginx_pool": {
"class": "Pool",
"monitors": [
"http"
],
"members": [{
"servicePort": 80,
"addressDiscovery": "event"
}]
}
}
}
}
}