diff --git a/bigip/resource_bigip_fast_application_test.go b/bigip/resource_bigip_fast_application_test.go index 3229e3f3f..fad51712f 100644 --- a/bigip/resource_bigip_fast_application_test.go +++ b/bigip/resource_bigip_fast_application_test.go @@ -55,18 +55,18 @@ func TestAccFastAppCreateOnBigip(t *testing.T) { }) } -func testCheckFastAppExists(app, tenant string, exists bool) resource.TestCheckFunc { +func testCheckFastAppExists(app1, tenant1 string, exists bool) resource.TestCheckFunc { return func(s *terraform.State) error { client := testAccProvider.Meta().(*bigip.BigIP) - p, err := client.GetFastApp(tenant, app) + p, err := client.GetFastApp(tenant1, app1) if err != nil { return err } if exists && p == "" { - return fmt.Errorf("fast application %s was not created", app) + return fmt.Errorf("fast application %s was not created", app1) } if !exists && p != "" { - return fmt.Errorf("fast application %s still exists", app) + return fmt.Errorf("fast application %s still exists", app1) } return nil } diff --git a/bigip/resource_bigip_fast_http.go b/bigip/resource_bigip_fast_http.go index 59edadb7b..636acad76 100644 --- a/bigip/resource_bigip_fast_http.go +++ b/bigip/resource_bigip_fast_http.go @@ -77,6 +77,32 @@ func resourceBigipHttpFastApp() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, ConflictsWith: []string{"existing_snat_pool"}, }, + "persistence_profile": { + Type: schema.TypeString, + Optional: true, + Description: "Name of an existing BIG-IP persistence profile to be used.", + ConflictsWith: []string{"persistence_type"}, + }, + "persistence_type": { + Type: schema.TypeString, + Optional: true, + Description: "Type of persistence profile to be created.", + ValidateFunc: validation.StringInSlice([]string{ + "cookie", + "msrdp", + "tls-session-id", + "destination-address", + "source-address"}, false), + ConflictsWith: []string{"persistence_profile"}, + }, + "fallback_persistence": { + Type: schema.TypeString, + Optional: true, + Description: "Type of fallback persistence record to be created for each new client connection.", + ValidateFunc: validation.StringInSlice([]string{ + "destination-address", + "source-address"}, false), + }, "existing_pool": { Type: schema.TypeString, Optional: true, @@ -120,111 +146,10 @@ func resourceBigipHttpFastApp() *schema.Resource { }, "service_discovery": { Type: schema.TypeList, - Computed: true, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, ConflictsWith: []string{"existing_pool"}, }, - // "service_discovery_list": { - // Type: schema.TypeSet, - // Optional: true, - // Elem: &schema.Resource{ - // Schema: map[string]*schema.Schema{ - // "sd_type": { - // Type: schema.TypeString, - // Required: true, - // }, - // "sd_port": { - // Type: schema.TypeInt, - // Required: true, - // }, - // "sd_aws_tag_key": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // "sd_aws_tag_val": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // "sd_aws_region": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // "sd_aws_access_key": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // "sd_aws_secret_access_key": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // "sd_address_realm": { - // Type: schema.TypeString, - // Optional: true, - // Default: "private", - // }, - // "sd_undetectable_action": { - // Type: schema.TypeString, - // Optional: true, - // Default: "remove", - // }, - // "sd_azure_resource_group": { - // Type: schema.TypeString, - // Optional: true, - // Computed: true, - // }, - // "sd_azure_subscription_id": { - // Type: schema.TypeString, - // Optional: true, - // Computed: true, - // }, - // "sd_azure_resource_id": { - // Type: schema.TypeString, - // Optional: true, - // Computed: true, - // // ConflictsWith: []string{"service_discovery.sd_azure_tag_key", "service_discovery.sd_azure_tag_val"}, - // }, - // "sd_azure_directory_id": { - // Type: schema.TypeString, - // Optional: true, - // Computed: true, - // // ConflictsWith: []string{"sd_azure_tag_key", "sd_azure_tag_val"}, - // }, - // "sd_azure_tag_key": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // // ConflictsWith: []string{"sd_azure_resource_id", "sd_azure_directory_id"}, - // }, - // "sd_azure_tag_val": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // // ConflictsWith: []string{"sd_azure_resource_id", "sd_azure_directory_id"}, - // }, - // "sd_gce_tag_key": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // "sd_gce_tag_val": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // "sd_gce_region": { - // Type: schema.TypeString, - // Computed: true, - // Optional: true, - // }, - // }, - // }, - // }, "load_balancing_mode": { Type: schema.TypeString, Optional: true, @@ -486,6 +411,12 @@ func setFastHttpData(d *schema.ResourceData, data bigip.FastHttpJson) error { if _, ok := d.GetOk("endpoint_ltm_policy"); ok { _ = d.Set("endpoint_ltm_policy", data.EndpointPolicyNames) } + if _, ok := d.GetOk("fallback_persistence"); ok { + _ = d.Set("fallback_persistence", data.FallbackPersistenceType) + } + if _, ok := d.GetOk("persistence_profile"); ok { + _ = d.Set("persistence_profile", data.PersistenceProfile) + } if _, ok := d.GetOk("monitor"); ok { if err := d.Set("monitor", []interface{}{flattenFastMonitor(data)}); err != nil { return fmt.Errorf("error setting monitor: %w", err) @@ -645,59 +576,6 @@ func getFastHttpConfig(d *schema.ResourceData) (string, error) { } httpJson.ServiceDiscovery = serviceDiscovery - // if p, ok := d.GetOk("service_discovery"); ok { - // httpJson.SdEnable = true - // httpJson.PoolEnable = true - // httpJson.MakePool = true - // var sdObjs []bigip.ServiceDiscoverObj - // for _, r := range p.(*schema.Set).List() { - // sdObj := bigip.ServiceDiscoverObj{} - // sdObj.SdType = r.(map[string]interface{})["sd_type"].(string) - // sdObj.SdPort = r.(map[string]interface{})["sd_port"].(int) - // sdObj.SdAddressRealm = r.(map[string]interface{})["sd_address_realm"].(string) - // if sdObj.SdType == "aws" { - // if r.(map[string]interface{})["sd_aws_tag_key"].(string) == "" || r.(map[string]interface{})["sd_aws_tag_val"].(string) == "" { - // return "", fmt.Errorf("'sd_aws_tag_key' and 'sd_aws_tag_val' must be specified for aws service discovery") - // } - // sdObj.SdTagKey = r.(map[string]interface{})["sd_aws_tag_key"].(string) - // sdObj.SdTagVal = r.(map[string]interface{})["sd_aws_tag_val"].(string) - // sdObj.SdAwsRegion = r.(map[string]interface{})["sd_aws_region"].(string) - // sdObj.SdAccessKeyId = r.(map[string]interface{})["sd_aws_access_key"].(string) - // sdObj.SdSecretAccessKey = r.(map[string]interface{})["sd_aws_secret_access_key"].(string) - // sdObj.SdUndetectableAction = r.(map[string]interface{})["sd_undetectable_action"].(string) - // sdObjs = append(sdObjs, sdObj) - // } - // if sdObj.SdType == "azure" { - // if r.(map[string]interface{})["sd_azure_resource_group"].(string) == "" || r.(map[string]interface{})["sd_azure_subscription_id"].(string) == "" { - // return "", fmt.Errorf("'sd_azure_resource_group' and 'sd_azure_subscription_id' must be specified for azure service discovery") - // } - // sdObj.SdRg = r.(map[string]interface{})["sd_azure_resource_group"].(string) - // sdObj.SdSid = r.(map[string]interface{})["sd_azure_subscription_id"].(string) - // sdObj.SdRtype = "tag" - // sdObj.SdUseManagedIdentity = true - // if r.(map[string]interface{})["sd_azure_tag_key"].(string) != "" && r.(map[string]interface{})["sd_azure_tag_val"].(string) != "" { - // sdObj.SdAzureTagKey = r.(map[string]interface{})["sd_azure_tag_key"].(string) - // sdObj.SdAzureTagVal = r.(map[string]interface{})["sd_azure_tag_val"].(string) - // } else if r.(map[string]interface{})["sd_azure_resource_id"].(string) != "" { - // sdObj.SdRid = r.(map[string]interface{})["sd_azure_resource_id"].(string) - // // sdObj.SdDirid = r.(map[string]interface{})["sd_azure_directory_id"].(string) - // } - // sdObj.SdUndetectableAction = r.(map[string]interface{})["sd_undetectable_action"].(string) - // sdObjs = append(sdObjs, sdObj) - // } - // if sdObj.SdType == "gce" { - // if r.(map[string]interface{})["sd_gce_tag_key"].(string) == "" || r.(map[string]interface{})["sd_gce_tag_val"].(string) == "" || r.(map[string]interface{})["sd_gce_region"].(string) == "" { - // return "", fmt.Errorf("'sd_gce_tag_key' , 'sd_gce_tag_val' and 'sd_gce_region' must be specified for GCE service discovery") - // } - // sdObj.SdTagKey = r.(map[string]interface{})["sd_gce_tag_key"].(string) - // sdObj.SdTagVal = r.(map[string]interface{})["sd_gce_tag_val"].(string) - // sdObj.SdRegion = r.(map[string]interface{})["sd_gce_region"].(string) - // sdObj.SdUndetectableAction = r.(map[string]interface{})["sd_undetectable_action"].(string) - // sdObjs = append(sdObjs, sdObj) - // } - // } - // httpJson.ServiceDiscovery = sdObjs - // } httpJson.SnatEnable = true httpJson.SnatAutomap = true httpJson.WafPolicyEnable = false @@ -718,6 +596,22 @@ func getFastHttpConfig(d *schema.ResourceData) (string, error) { } httpJson.SnatAddresses = snatAdd } + httpJson.EnablePersistence = false + httpJson.UseExistingPersistence = false + httpJson.EnableFallbackPersistence = false + if v, ok := d.GetOk("persistence_profile"); ok { + httpJson.EnablePersistence = true + httpJson.UseExistingPersistence = true + httpJson.PersistenceProfile = v.(string) + } + if v, ok := d.GetOk("persistence_type"); ok { + httpJson.EnablePersistence = true + httpJson.PersistenceType = v.(string) + } + if v, ok := d.GetOk("fallback_persistence"); ok { + httpJson.EnableFallbackPersistence = true + httpJson.FallbackPersistenceType = v.(string) + } if s, ok := d.GetOk("endpoint_ltm_policy"); ok { var endptPolicy []string for _, policy := range s.([]interface{}) { diff --git a/bigip/resource_bigip_fast_http_test.go b/bigip/resource_bigip_fast_http_test.go index 24ed89270..cbc66f5d8 100644 --- a/bigip/resource_bigip_fast_http_test.go +++ b/bigip/resource_bigip_fast_http_test.go @@ -65,6 +65,32 @@ func TestAccFastHTTPAppCreateTC02(t *testing.T) { }) } +func TestAccFastHTTPAppCreateTC03(t *testing.T) { + var httpApp3Name = "fast_http_apptc3" + var httpTenant3Name = "fast_http_tenanttc3" + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAcctPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testCheckFastHTTPAppDestroyed, + Steps: []resource.TestStep{ + { + Config: getFastHTTPAppConfigTC03(httpTenant3Name, httpApp3Name), + Check: resource.ComposeTestCheckFunc( + //testCheckFastAppExists(httpApp3Name, httpTenant3Name, true), + resource.TestCheckResourceAttr("bigip_fast_http_app.fast_http_app_tc3", "application", httpApp3Name), + resource.TestCheckResourceAttr("bigip_fast_http_app.fast_http_app_tc3", "tenant", httpTenant3Name), + resource.TestCheckResourceAttr("bigip_fast_http_app.fast_http_app_tc3", "virtual_server.0.ip", "10.200.21.2"), + resource.TestCheckResourceAttr("bigip_fast_http_app.fast_http_app_tc3", "virtual_server.0.port", "443"), + resource.TestCheckResourceAttr("bigip_fast_http_app.fast_http_app_tc3", "persistence_profile", "/Common/dest_addr"), + resource.TestCheckResourceAttr("bigip_fast_http_app.fast_http_app_tc3", "fallback_persistence", "source-address"), + ), + }, + }, + }) +} + func getFastHTTPAppConfig() string { return fmt.Sprintf(` resource "bigip_fast_http_app" "fast_http_app" { @@ -97,6 +123,27 @@ resource "bigip_fast_http_app" "fast_http_app_tc2" { `, httpTenantName, httpAppName) } +func getFastHTTPAppConfigTC03(httpTenantName, httpAppName string) string { + return fmt.Sprintf(` +resource "bigip_fast_http_app" "fast_http_app_tc3" { + tenant = "%v" + application = "%v" + virtual_server { + ip = "10.200.21.2" + port = 443 + } + pool_members { + addresses = ["10.1.20.120", "10.1.10.121", "10.1.10.122"] + port = 80 + } + persistence_profile="/Common/dest_addr" + fallback_persistence = "source-address" + load_balancing_mode = "least-connections-member" + endpoint_ltm_policy = ["/Common/testpolicy1"] +} +`, httpTenantName, httpAppName) +} + func testCheckFastHTTPAppDestroyed(s *terraform.State) error { client := testAccProvider.Meta().(*bigip.BigIP) for _, rs := range s.RootModule().Resources { diff --git a/bigip/resource_bigip_fast_https.go b/bigip/resource_bigip_fast_https.go index bf2090462..ec78dbd1c 100644 --- a/bigip/resource_bigip_fast_https.go +++ b/bigip/resource_bigip_fast_https.go @@ -127,6 +127,32 @@ func resourceBigipFastHTTPSApp() *schema.Resource { }, ConflictsWith: []string{"existing_tls_client_profile"}, }, + "persistence_profile": { + Type: schema.TypeString, + Optional: true, + Description: "Name of an existing BIG-IP persistence profile to be used.", + ConflictsWith: []string{"persistence_type"}, + }, + "persistence_type": { + Type: schema.TypeString, + Optional: true, + Description: "Type of persistence profile to be created.", + ValidateFunc: validation.StringInSlice([]string{ + "cookie", + "msrdp", + "tls-session-id", + "destination-address", + "source-address"}, false), + ConflictsWith: []string{"persistence_profile"}, + }, + "fallback_persistence": { + Type: schema.TypeString, + Optional: true, + Description: "Type of fallback persistence record to be created for each new client connection.", + ValidateFunc: validation.StringInSlice([]string{ + "destination-address", + "source-address"}, false), + }, "existing_pool": { Type: schema.TypeString, Optional: true, @@ -170,7 +196,6 @@ func resourceBigipFastHTTPSApp() *schema.Resource { }, "service_discovery": { Type: schema.TypeList, - Computed: true, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, ConflictsWith: []string{"existing_pool"}, @@ -436,6 +461,12 @@ func setFastHTTPSData(d *schema.ResourceData, data bigip.FastHttpJson) error { if _, ok := d.GetOk("endpoint_ltm_policy"); ok { _ = d.Set("endpoint_ltm_policy", data.EndpointPolicyNames) } + if _, ok := d.GetOk("fallback_persistence"); ok { + _ = d.Set("fallback_persistence", data.FallbackPersistenceType) + } + if _, ok := d.GetOk("persistence_profile"); ok { + _ = d.Set("persistence_profile", data.PersistenceProfile) + } _ = d.Set("load_balancing_mode", data.LoadBalancingMode) if _, ok := d.GetOk("slow_ramp_time"); ok { _ = d.Set("slow_ramp_time", data.SlowRampTime) @@ -522,6 +553,22 @@ func getFastHTTPSConfig(d *schema.ResourceData) (string, error) { log.Printf("[DEBUG] waf_secu policy:%+v", vv) } } + httpJson.EnablePersistence = false + httpJson.UseExistingPersistence = false + httpJson.EnableFallbackPersistence = false + if v, ok := d.GetOk("persistence_profile"); ok { + httpJson.EnablePersistence = true + httpJson.UseExistingPersistence = true + httpJson.PersistenceProfile = v.(string) + } + if v, ok := d.GetOk("persistence_type"); ok { + httpJson.EnablePersistence = true + httpJson.PersistenceType = v.(string) + } + if v, ok := d.GetOk("fallback_persistence"); ok { + httpJson.EnableFallbackPersistence = true + httpJson.FallbackPersistenceType = v.(string) + } httpJson.PoolEnable = false if v, ok := d.GetOk("existing_pool"); ok { httpJson.PoolEnable = true @@ -567,59 +614,6 @@ func getFastHTTPSConfig(d *schema.ResourceData) (string, error) { } httpJson.ServiceDiscovery = serviceDiscovery - // if p, ok := d.GetOk("service_discovery"); ok { - // httpJson.SdEnable = true - // httpJson.PoolEnable = true - // httpJson.MakePool = true - // var sdObjs []bigip.ServiceDiscoverObj - // for _, r := range p.(*schema.Set).List() { - // sdObj := bigip.ServiceDiscoverObj{} - // sdObj.SdType = r.(map[string]interface{})["sd_type"].(string) - // sdObj.SdPort = r.(map[string]interface{})["sd_port"].(int) - // sdObj.SdAddressRealm = r.(map[string]interface{})["sd_address_realm"].(string) - // if sdObj.SdType == "aws" { - // if r.(map[string]interface{})["sd_aws_tag_key"].(string) == "" || r.(map[string]interface{})["sd_aws_tag_val"].(string) == "" { - // return "", fmt.Errorf("'sd_aws_tag_key' and 'sd_aws_tag_val' must be specified for aws service discovery") - // } - // sdObj.SdTagKey = r.(map[string]interface{})["sd_aws_tag_key"].(string) - // sdObj.SdTagVal = r.(map[string]interface{})["sd_aws_tag_val"].(string) - // sdObj.SdAwsRegion = r.(map[string]interface{})["sd_aws_region"].(string) - // sdObj.SdAccessKeyId = r.(map[string]interface{})["sd_aws_access_key"].(string) - // sdObj.SdSecretAccessKey = r.(map[string]interface{})["sd_aws_secret_access_key"].(string) - // sdObj.SdUndetectableAction = r.(map[string]interface{})["sd_undetectable_action"].(string) - // sdObjs = append(sdObjs, sdObj) - // } - // if sdObj.SdType == "azure" { - // if r.(map[string]interface{})["sd_azure_resource_group"].(string) == "" || r.(map[string]interface{})["sd_azure_subscription_id"].(string) == "" { - // return "", fmt.Errorf("'sd_azure_resource_group' and 'sd_azure_subscription_id' must be specified for azure service discovery") - // } - // sdObj.SdRg = r.(map[string]interface{})["sd_azure_resource_group"].(string) - // sdObj.SdSid = r.(map[string]interface{})["sd_azure_subscription_id"].(string) - // sdObj.SdRtype = "tag" - // sdObj.SdUseManagedIdentity = true - // if r.(map[string]interface{})["sd_azure_tag_key"].(string) != "" && r.(map[string]interface{})["sd_azure_tag_val"].(string) != "" { - // sdObj.SdAzureTagKey = r.(map[string]interface{})["sd_azure_tag_key"].(string) - // sdObj.SdAzureTagVal = r.(map[string]interface{})["sd_azure_tag_val"].(string) - // } else if r.(map[string]interface{})["sd_azure_resource_id"].(string) != "" { - // sdObj.SdRid = r.(map[string]interface{})["sd_azure_resource_id"].(string) - // // sdObj.SdDirid = r.(map[string]interface{})["sd_azure_directory_id"].(string) - // } - // sdObj.SdUndetectableAction = r.(map[string]interface{})["sd_undetectable_action"].(string) - // sdObjs = append(sdObjs, sdObj) - // } - // if sdObj.SdType == "gce" { - // if r.(map[string]interface{})["sd_gce_tag_key"].(string) == "" || r.(map[string]interface{})["sd_gce_tag_val"].(string) == "" || r.(map[string]interface{})["sd_gce_region"].(string) == "" { - // return "", fmt.Errorf("'sd_gce_tag_key' , 'sd_gce_tag_val' and 'sd_gce_region' must be specified for GCE service discovery") - // } - // sdObj.SdTagKey = r.(map[string]interface{})["sd_gce_tag_key"].(string) - // sdObj.SdTagVal = r.(map[string]interface{})["sd_gce_tag_val"].(string) - // sdObj.SdRegion = r.(map[string]interface{})["sd_gce_region"].(string) - // sdObj.SdUndetectableAction = r.(map[string]interface{})["sd_undetectable_action"].(string) - // sdObjs = append(sdObjs, sdObj) - // } - // } - // httpJson.ServiceDiscovery = sdObjs - // } httpJson.SnatEnable = true httpJson.SnatAutomap = true httpJson.MakeSnatPool = false diff --git a/bigip/resource_bigip_fast_https_test.go b/bigip/resource_bigip_fast_https_test.go index 732155752..f5bab3db7 100644 --- a/bigip/resource_bigip_fast_https_test.go +++ b/bigip/resource_bigip_fast_https_test.go @@ -162,6 +162,31 @@ func TestAccFastHTTPSAppProfileTC5(t *testing.T) { }) } +func TestAccFastHTTPSAppProfileTC6(t *testing.T) { + httpsAppName = "fast_https_apptc6" + httpsTenantName = "fast_https_tenanttc6" + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAcctPreCheck(t) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: getFastHTTPSAppConfigTC6(), + Check: resource.ComposeTestCheckFunc( + testCheckFastAppExists(httpsAppName, httpsTenantName, true), + resource.TestCheckResourceAttr("bigip_fast_https_app.fast_https_app", "application", "fast_https_apptc6"), + resource.TestCheckResourceAttr("bigip_fast_https_app.fast_https_app", "tenant", "fast_https_tenanttc6"), + resource.TestCheckResourceAttr("bigip_fast_https_app.fast_https_app", "virtual_server.0.ip", "10.20.33.1"), + resource.TestCheckResourceAttr("bigip_fast_https_app.fast_https_app", "virtual_server.0.port", "443"), + resource.TestCheckResourceAttr("bigip_fast_https_app.fast_https_app", "persistence_profile", "/Common/source_addr"), + resource.TestCheckResourceAttr("bigip_fast_https_app.fast_https_app", "fallback_persistence", "destination-address"), + ), + }, + }, + }) +} + func getFastHTTPSAppConfig() string { return fmt.Sprintf(` resource "bigip_fast_https_app" "fast_https_app" { @@ -283,6 +308,27 @@ resource "bigip_fast_https_app" "fast_https_app" { `, httpsTenantName, httpsAppName) } +func getFastHTTPSAppConfigTC6() string { + return fmt.Sprintf(` +resource "bigip_fast_https_app" "fast_https_app" { + tenant = "%v" + application = "%v" + virtual_server { + ip = "10.20.33.1" + port = 443 + } + pool_members { + addresses = ["10.11.40.120", "10.11.30.121", "10.11.30.122"] + port = 80 + } + load_balancing_mode = "least-connections-member" + endpoint_ltm_policy = ["/Common/testpolicy1"] + persistence_profile = "/Common/source_addr" + fallback_persistence = "destination-address" +} +`, httpsTenantName, httpsAppName) +} + func testCheckFastHTTPSAppDestroyed(s *terraform.State) error { client := testAccProvider.Meta().(*bigip.BigIP) for _, rs := range s.RootModule().Resources { diff --git a/docs/resources/bigip_fast_http_app.md b/docs/resources/bigip_fast_http_app.md index 13c3c6055..8c12bb04e 100644 --- a/docs/resources/bigip_fast_http_app.md +++ b/docs/resources/bigip_fast_http_app.md @@ -87,6 +87,12 @@ See [Pool Members](#pool-members) below for more details. * `monitor` - (Optional,`set`) `monitor` block takes input for FAST-Generated Pool Monitor. See [Pool Monitor](#pool-monitor) below for more details. +* `persistence_profile` - (Optional,`string`) Name of an existing BIG-IP persistence profile to be used. + +* `persistence_type` - (Optional,`string`) Type of persistence profile to be created. Using this option will enable use of FAST generated persistence profiles. + +* `fallback_persistence` - (Optional,`string`) Type of fallback persistence record to be created for each new client connection. + * `existing_waf_security_policy` - (Optional,`string`) Name of an existing WAF Security policy. * `endpoint_ltm_policy` - (Optional,`list`) List of LTM Policies to be applied FAST HTTP Application. diff --git a/docs/resources/bigip_fast_https_app.md b/docs/resources/bigip_fast_https_app.md index f7824e0de..df64a19cd 100644 --- a/docs/resources/bigip_fast_https_app.md +++ b/docs/resources/bigip_fast_https_app.md @@ -93,6 +93,12 @@ See [TLS Client Profile](#tls-client-profile) below for more details. * `waf_security_policy` - (Optional,`set`) `waf_security_policy` block takes input for FAST-Generated WAF Security Policy. See [WAF Security Policy](#waf-security-policy) below for more details. +* `persistence_profile` - (Optional,`string`) Name of an existing BIG-IP persistence profile to be used. + +* `persistence_type` - (Optional,`string`) Type of persistence profile to be created. Using this option will enable use of FAST generated persistence profiles. + +* `fallback_persistence` - (Optional,`string`) Type of fallback persistence record to be created for each new client connection. + * `existing_pool` - (Optional,`string`) Name of an existing BIG-IP pool. * `pool_members` - (Optional,`set`) `pool_members` block takes input for FAST-Generated Pool. diff --git a/vendor/github.com/f5devcentral/go-bigip/fastbigip.go b/vendor/github.com/f5devcentral/go-bigip/fastbigip.go index 2dde0f228..8c64b2477 100644 --- a/vendor/github.com/f5devcentral/go-bigip/fastbigip.go +++ b/vendor/github.com/f5devcentral/go-bigip/fastbigip.go @@ -110,47 +110,53 @@ type FastUDPJson struct { } type FastHttpJson struct { - Tenant string `json:"tenant_name,omitempty"` - Application string `json:"app_name,omitempty"` - VirtualAddress string `json:"virtual_address,omitempty"` - VirtualPort interface{} `json:"virtual_port,omitempty"` - SnatEnable bool `json:"enable_snat,omitempty"` - SnatAutomap bool `json:"snat_automap"` - MakeSnatPool bool `json:"make_snatpool"` - SnatPoolName string `json:"snatpool_name,omitempty"` - SnatAddresses []string `json:"snat_addresses,omitempty"` - PoolEnable bool `json:"enable_pool"` - MakePool bool `json:"make_pool"` - TlsServerEnable bool `json:"enable_tls_server"` - TlsClientEnable bool `json:"enable_tls_client"` - TlsServerProfileCreate bool `json:"make_tls_server_profile"` - TlsClientProfileCreate bool `json:"make_tls_client_profile"` - TlsServerProfileName string `json:"tls_server_profile_name,omitempty"` - TlsClientProfileName string `json:"tls_client_profile_name,omitempty"` - TlsCertName string `json:"tls_cert_name,omitempty"` - TlsKeyName string `json:"tls_key_name,omitempty"` - PoolName string `json:"pool_name,omitempty"` - PoolMembers []FastHttpPool `json:"pool_members,omitempty"` - SdEnable bool `json:"use_sd"` - ServiceDiscovery []interface{} `json:"service_discovery,omitempty"` - LoadBalancingMode string `json:"load_balancing_mode,omitempty"` - SlowRampTime int `json:"slow_ramp_time,omitempty"` - MonitorEnable bool `json:"enable_monitor,omitempty"` - MakeMonitor bool `json:"make_monitor"` - HTTPMonitor string `json:"monitor_name_http,omitempty"` - HTTPSMonitor string `json:"monitor_name,omitempty"` - MonitorAuth bool `json:"monitor_credentials"` - MonitorUsername string `json:"monitor_username,omitempty"` - MonitorPassword string `json:"monitor_passphrase,omitempty"` - MonitorInterval int `json:"monitor_interval,omitempty"` - MonitorSendString string `json:"monitor_send_string,omitempty"` - MonitorResponse string `json:"monitor_expected_response,omitempty"` - WafPolicyEnable bool `json:"enable_waf_policy"` - MakeWafpolicy bool `json:"make_waf_policy"` - WafPolicyName string `json:"asm_waf_policy,omitempty"` - EndpointPolicyNames []string `json:"endpoint_policy_names,omitempty"` - AsmLoggingEnable bool `json:"enable_asm_logging"` - LogProfileNames []string `json:"log_profile_names,omitempty"` + Tenant string `json:"tenant_name,omitempty"` + Application string `json:"app_name,omitempty"` + VirtualAddress string `json:"virtual_address,omitempty"` + VirtualPort interface{} `json:"virtual_port,omitempty"` + SnatEnable bool `json:"enable_snat,omitempty"` + SnatAutomap bool `json:"snat_automap"` + MakeSnatPool bool `json:"make_snatpool"` + SnatPoolName string `json:"snatpool_name,omitempty"` + SnatAddresses []string `json:"snat_addresses,omitempty"` + PoolEnable bool `json:"enable_pool"` + MakePool bool `json:"make_pool"` + TlsServerEnable bool `json:"enable_tls_server"` + TlsClientEnable bool `json:"enable_tls_client"` + TlsServerProfileCreate bool `json:"make_tls_server_profile"` + TlsClientProfileCreate bool `json:"make_tls_client_profile"` + TlsServerProfileName string `json:"tls_server_profile_name,omitempty"` + TlsClientProfileName string `json:"tls_client_profile_name,omitempty"` + TlsCertName string `json:"tls_cert_name,omitempty"` + TlsKeyName string `json:"tls_key_name,omitempty"` + PoolName string `json:"pool_name,omitempty"` + PoolMembers []FastHttpPool `json:"pool_members,omitempty"` + SdEnable bool `json:"use_sd"` + ServiceDiscovery []interface{} `json:"service_discovery,omitempty"` + LoadBalancingMode string `json:"load_balancing_mode,omitempty"` + SlowRampTime int `json:"slow_ramp_time,omitempty"` + MonitorEnable bool `json:"enable_monitor,omitempty"` + MakeMonitor bool `json:"make_monitor"` + HTTPMonitor string `json:"monitor_name_http,omitempty"` + HTTPSMonitor string `json:"monitor_name,omitempty"` + MonitorAuth bool `json:"monitor_credentials"` + MonitorUsername string `json:"monitor_username,omitempty"` + MonitorPassword string `json:"monitor_passphrase,omitempty"` + MonitorInterval int `json:"monitor_interval,omitempty"` + MonitorSendString string `json:"monitor_send_string,omitempty"` + MonitorResponse string `json:"monitor_expected_response,omitempty"` + EnablePersistence bool `json:"enable_persistence"` + UseExistingPersistence bool `json:"use_existing_persistence_profile,omitempty"` + EnableFallbackPersistence bool `json:"enable_fallback_persistence"` + FallbackPersistenceType string `json:"fallback_persistence_type,omitempty"` + PersistenceProfile string `json:"persistence_profile,omitempty"` + PersistenceType string `json:"persistence_type,omitempty"` + WafPolicyEnable bool `json:"enable_waf_policy"` + MakeWafpolicy bool `json:"make_waf_policy"` + WafPolicyName string `json:"asm_waf_policy,omitempty"` + EndpointPolicyNames []string `json:"endpoint_policy_names,omitempty"` + AsmLoggingEnable bool `json:"enable_asm_logging"` + LogProfileNames []string `json:"log_profile_names,omitempty"` } type FastHttpPool struct {