diff --git a/avi/data_source_avi_serviceenginegroup_test.go b/avi/data_source_avi_serviceenginegroup_test.go index f124453a8..9171bd4de 100644 --- a/avi/data_source_avi_serviceenginegroup_test.go +++ b/avi/data_source_avi_serviceenginegroup_test.go @@ -153,6 +153,18 @@ func TestAVIDataSourceServiceEngineGroupBasic(t *testing.T) { "avi_serviceenginegroup.testServiceEngineGroup", "sdb_pipeline_size", "100"), resource.TestCheckResourceAttr( "avi_serviceenginegroup.testServiceEngineGroup", "sdb_scan_count", "1000"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "ignore_docker_mac_change", "true"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_emulated_cores", "0"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_dump_core_on_assert", "false"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_packet_buffer_max", "0"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_dp_if_state_poll_interval", "10"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "baremetal_dispatcher_handles_flows", "false"), ), }, }, @@ -249,6 +261,12 @@ resource "avi_serviceenginegroup" "testServiceEngineGroup" { sdb_flush_interval = "100" sdb_pipeline_size = "100" sdb_scan_count = "1000" + ignore_docker_mac_change = true + se_emulated_cores = "0" + se_dump_core_on_assert = false + se_packet_buffer_max = "0" + se_dp_if_state_poll_interval = "10" + baremetal_dispatcher_handles_flows = false } data "avi_serviceenginegroup" "testServiceEngineGroup" { diff --git a/avi/data_source_avi_wafprofile_test.go b/avi/data_source_avi_wafprofile_test.go index 1c73a059d..d621927b5 100644 --- a/avi/data_source_avi_wafprofile_test.go +++ b/avi/data_source_avi_wafprofile_test.go @@ -4019,7 +4019,6 @@ EOF } config { regex_match_limit = "1500" - allowed_request_content_types = ["application/x-www-form-urlencoded","multipart/form-data","text/xml","application/xml","application/x-amf","application/json"] allowed_methods = ["HTTP_METHOD_GET","HTTP_METHOD_HEAD","HTTP_METHOD_POST","HTTP_METHOD_OPTIONS"] content_type_mappings { content_type = "application/x-www-form-urlencoded" diff --git a/avi/datasource_avi_authprofile.go b/avi/datasource_avi_authprofile.go index f3b1093e3..2200bb9f9 100644 --- a/avi/datasource_avi_authprofile.go +++ b/avi/datasource_avi_authprofile.go @@ -42,6 +42,11 @@ func dataSourceAviAuthProfile() *schema.Resource { Optional: true, Computed: true, }, + "oauth_profile": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceOAuthProfileSchema(), + }, "pa_agent_ref": { Type: schema.TypeString, Computed: true, diff --git a/avi/datasource_avi_healthmonitor.go b/avi/datasource_avi_healthmonitor.go index 085bac33e..a0f1ec180 100644 --- a/avi/datasource_avi_healthmonitor.go +++ b/avi/datasource_avi_healthmonitor.go @@ -45,6 +45,16 @@ func dataSourceAviHealthMonitor() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "ftp_monitor": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceHealthMonitorFtpSchema(), + }, + "ftps_monitor": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceHealthMonitorFtpSchema(), + }, "http_monitor": { Type: schema.TypeSet, Computed: true, @@ -69,6 +79,16 @@ func dataSourceAviHealthMonitor() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "ldap_monitor": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceHealthMonitorLdapSchema(), + }, + "ldaps_monitor": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceHealthMonitorLdapSchema(), + }, "markers": { Type: schema.TypeList, Computed: true, diff --git a/avi/datasource_avi_licensestatus.go b/avi/datasource_avi_licensestatus.go new file mode 100644 index 000000000..a3375a0cd --- /dev/null +++ b/avi/datasource_avi_licensestatus.go @@ -0,0 +1,39 @@ +// Copyright 2019 VMware, Inc. +// SPDX-License-Identifier: Mozilla Public License 2.0 + +package avi + +import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + +func dataSourceAviLicenseStatus() *schema.Resource { + return &schema.Resource{ + Read: ResourceAviLicenseStatusRead, + Schema: map[string]*schema.Schema{ + "configpb_attributes": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceConfigPbAttributesSchema(), + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "saas_status": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceSaasLicensingStatusSchema(), + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} diff --git a/avi/datasource_avi_serviceenginegroup.go b/avi/datasource_avi_serviceenginegroup.go index 4b8cf4d99..ae4fe8ae3 100644 --- a/avi/datasource_avi_serviceenginegroup.go +++ b/avi/datasource_avi_serviceenginegroup.go @@ -80,6 +80,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "baremetal_dispatcher_handles_flows": { + Type: schema.TypeString, + Computed: true, + }, "bgp_peer_monitor_failover_enabled": { Type: schema.TypeString, Computed: true, @@ -334,10 +338,18 @@ func dataSourceAviServiceEngineGroup() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "hybrid_rss_mode": { + Type: schema.TypeString, + Computed: true, + }, "hypervisor": { Type: schema.TypeString, Computed: true, }, + "ignore_docker_mac_change": { + Type: schema.TypeString, + Computed: true, + }, "ignore_rtt_threshold": { Type: schema.TypeString, Computed: true, @@ -364,6 +376,11 @@ func dataSourceAviServiceEngineGroup() *schema.Resource { Computed: true, Elem: ResourceIptableRuleSetSchema(), }, + "kni_allowed_server_ports": { + Type: schema.TypeList, + Computed: true, + Elem: ResourceKniPortRangeSchema(), + }, "l7_conns_per_core": { Type: schema.TypeString, Computed: true, @@ -584,6 +601,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "num_dispatcher_queues": { + Type: schema.TypeString, + Computed: true, + }, "num_flow_cores_sum_changes_to_ignore": { Type: schema.TypeString, Computed: true, @@ -680,6 +701,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "se_dp_if_state_poll_interval": { + Type: schema.TypeString, + Computed: true, + }, "se_dp_isolation": { Type: schema.TypeString, Computed: true, @@ -724,6 +749,14 @@ func dataSourceAviServiceEngineGroup() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "se_dump_core_on_assert": { + Type: schema.TypeString, + Computed: true, + }, + "se_emulated_cores": { + Type: schema.TypeString, + Computed: true, + }, "se_flow_probe_retries": { Type: schema.TypeString, Computed: true, @@ -781,6 +814,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "se_packet_buffer_max": { + Type: schema.TypeString, + Computed: true, + }, "se_pcap_lookahead": { Type: schema.TypeString, Computed: true, diff --git a/avi/datasource_avi_statediffoperation.go b/avi/datasource_avi_statediffoperation.go new file mode 100644 index 000000000..2a5f90317 --- /dev/null +++ b/avi/datasource_avi_statediffoperation.go @@ -0,0 +1,55 @@ +// Copyright 2019 VMware, Inc. +// SPDX-License-Identifier: Mozilla Public License 2.0 + +package avi + +import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + +func dataSourceAviStatediffOperation() *schema.Resource { + return &schema.Resource{ + Read: ResourceAviStatediffOperationRead, + Schema: map[string]*schema.Schema{ + "configpb_attributes": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceConfigPbAttributesSchema(), + }, + "events": { + Type: schema.TypeList, + Computed: true, + Elem: ResourceStatediffEventSchema(), + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "node_uuid": { + Type: schema.TypeString, + Computed: true, + }, + "operation": { + Type: schema.TypeString, + Computed: true, + }, + "phase": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} diff --git a/avi/datasource_avi_statediffsnapshot.go b/avi/datasource_avi_statediffsnapshot.go new file mode 100644 index 000000000..362ceeae9 --- /dev/null +++ b/avi/datasource_avi_statediffsnapshot.go @@ -0,0 +1,92 @@ +// Copyright 2019 VMware, Inc. +// SPDX-License-Identifier: Mozilla Public License 2.0 + +package avi + +import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + +func dataSourceAviStatediffSnapshot() *schema.Resource { + return &schema.Resource{ + Read: ResourceAviStatediffSnapshotRead, + Schema: map[string]*schema.Schema{ + "configpb_attributes": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceConfigPbAttributesSchema(), + }, + "gslb_name": { + Type: schema.TypeString, + Computed: true, + }, + "gslb_uuid": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "pool_name": { + Type: schema.TypeString, + Computed: true, + }, + "pool_uuid": { + Type: schema.TypeString, + Computed: true, + }, + "post_snapshot": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourcepostsnapshotSchema(), + }, + "pre_snapshot": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourcepresnapshotSchema(), + }, + "se_group_name": { + Type: schema.TypeString, + Computed: true, + }, + "se_group_uuid": { + Type: schema.TypeString, + Computed: true, + }, + "se_name": { + Type: schema.TypeString, + Computed: true, + }, + "se_uuid": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_type": { + Type: schema.TypeString, + Computed: true, + }, + "statediff_operation_ref": { + Type: schema.TypeString, + Computed: true, + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vs_name": { + Type: schema.TypeString, + Computed: true, + }, + "vs_uuid": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} diff --git a/avi/datasource_avi_upgradestatusinfo.go b/avi/datasource_avi_upgradestatusinfo.go index 339bbf9fe..ea4f1bd9b 100644 --- a/avi/datasource_avi_upgradestatusinfo.go +++ b/avi/datasource_avi_upgradestatusinfo.go @@ -162,6 +162,10 @@ func dataSourceAviUpgradeStatusInfo() *schema.Resource { Computed: true, Elem: ResourceUpgradeOpsStateSchema(), }, + "statediff_ref": { + Type: schema.TypeString, + Computed: true, + }, "system": { Type: schema.TypeString, Computed: true, diff --git a/avi/datasource_avi_virtualservice.go b/avi/datasource_avi_virtualservice.go index 3a0a1274a..707fff177 100644 --- a/avi/datasource_avi_virtualservice.go +++ b/avi/datasource_avi_virtualservice.go @@ -209,6 +209,11 @@ func dataSourceAviVirtualService() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "oauth_vs_config": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceOAuthVSConfigSchema(), + }, "performance_limits": { Type: schema.TypeSet, Computed: true, diff --git a/avi/datasource_avi_wafpolicy.go b/avi/datasource_avi_wafpolicy.go index 2898d9be0..5e8e5fb55 100644 --- a/avi/datasource_avi_wafpolicy.go +++ b/avi/datasource_avi_wafpolicy.go @@ -108,11 +108,6 @@ func dataSourceAviWafPolicy() *schema.Resource { Computed: true, Elem: ResourceWafRuleGroupSchema(), }, - "resolved_crs_groups": { - Type: schema.TypeList, - Computed: true, - Elem: ResourceWafRuleGroupSchema(), - }, "tenant_ref": { Type: schema.TypeString, Optional: true, diff --git a/avi/provider.go b/avi/provider.go index e7c66a93f..ba8a07264 100644 --- a/avi/provider.go +++ b/avi/provider.go @@ -71,6 +71,8 @@ func Provider() *schema.Provider { "avi_siteversion": dataSourceAviSiteVersion(), "avi_networkservice": dataSourceAviNetworkService(), "avi_securitypolicy": dataSourceAviSecurityPolicy(), + "avi_statediffoperation": dataSourceAviStatediffOperation(), + "avi_statediffsnapshot": dataSourceAviStatediffSnapshot(), "avi_vsvip": dataSourceAviVsVip(), "avi_virtualservice": dataSourceAviVirtualService(), "avi_serviceenginegroup": dataSourceAviServiceEngineGroup(), @@ -156,6 +158,7 @@ func Provider() *schema.Provider { "avi_testsedatastorelevel3": dataSourceAviTestSeDatastoreLevel3(), "avi_albservicesfileupload": dataSourceAviALBServicesFileUpload(), "avi_dynamicdnsrecord": dataSourceAviDynamicDnsRecord(), + "avi_licensestatus": dataSourceAviLicenseStatus(), "avi_seproperties": dataSourceAviSeProperties(), "avi_cloudproperties": dataSourceAviCloudProperties(), "avi_controllerportalregistration": dataSourceAviControllerPortalRegistration(), @@ -180,6 +183,8 @@ func Provider() *schema.Provider { "avi_siteversion": resourceAviSiteVersion(), "avi_networkservice": resourceAviNetworkService(), "avi_securitypolicy": resourceAviSecurityPolicy(), + "avi_statediffoperation": resourceAviStatediffOperation(), + "avi_statediffsnapshot": resourceAviStatediffSnapshot(), "avi_vsvip": resourceAviVsVip(), "avi_virtualservice": resourceAviVirtualService(), "avi_serviceenginegroup": resourceAviServiceEngineGroup(), @@ -265,6 +270,7 @@ func Provider() *schema.Provider { "avi_testsedatastorelevel3": resourceAviTestSeDatastoreLevel3(), "avi_albservicesfileupload": resourceAviALBServicesFileUpload(), "avi_dynamicdnsrecord": resourceAviDynamicDnsRecord(), + "avi_licensestatus": resourceAviLicenseStatus(), "avi_seproperties": resourceAviSeProperties(), "avi_cloudproperties": resourceAviCloudProperties(), "avi_controllerportalregistration": resourceAviControllerPortalRegistration(), diff --git a/avi/resource_avi_albservicesconfig.go b/avi/resource_avi_albservicesconfig.go index b89f04270..df196d6a5 100644 --- a/avi/resource_avi_albservicesconfig.go +++ b/avi/resource_avi_albservicesconfig.go @@ -62,8 +62,7 @@ func ResourceALBServicesConfigSchema() map[string]*schema.Schema { }, "saas_licensing_config": { Type: schema.TypeSet, - Optional: true, - Computed: true, + Required: true, Elem: ResourceSaasLicensingInfoSchema(), }, "split_proxy_configuration": { diff --git a/avi/resource_avi_authprofile.go b/avi/resource_avi_authprofile.go index 706ceaa9c..e1f1c3003 100644 --- a/avi/resource_avi_authprofile.go +++ b/avi/resource_avi_authprofile.go @@ -50,6 +50,12 @@ func ResourceAuthProfileSchema() map[string]*schema.Schema { Type: schema.TypeString, Required: true, }, + "oauth_profile": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOAuthProfileSchema(), + }, "pa_agent_ref": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_controllerproperties_test.go b/avi/resource_avi_controllerproperties_test.go index b629f3679..7ad9f0764 100644 --- a/avi/resource_avi_controllerproperties_test.go +++ b/avi/resource_avi_controllerproperties_test.go @@ -12,9 +12,8 @@ import ( func TestAVIControllerPropertiesBasic(t *testing.T) { resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAVIControllerPropertiesDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, Steps: []resource.TestStep{ { Config: testAccAVIControllerPropertiesConfig, @@ -230,30 +229,6 @@ func testAccCheckAVIControllerPropertiesExists(resourcename string) resource.Tes } -func testAccCheckAVIControllerPropertiesDestroy(s *terraform.State) error { - conn := testAccProvider.Meta().(*clients.AviClient).AviSession - var obj interface{} - for _, rs := range s.RootModule().Resources { - if rs.Type != "avi_controllerproperties" { - continue - } - url := strings.SplitN(rs.Primary.ID, "/api", 2)[1] - uuid := strings.Split(url, "#")[0] - path := "api" + uuid - err := conn.Get(path, &obj) - if err != nil { - if strings.Contains(err.Error(), "404") { - return nil - } - return err - } - if len(obj.(map[string]interface{})) > 0 { - return fmt.Errorf("AVI ControllerProperties still exists") - } - } - return nil -} - const testAccAVIControllerPropertiesConfig = ` resource "avi_controllerproperties" "testControllerProperties" { vs_se_ping_fail = "60" diff --git a/avi/resource_avi_healthmonitor.go b/avi/resource_avi_healthmonitor.go index f74307783..6f061fca7 100644 --- a/avi/resource_avi_healthmonitor.go +++ b/avi/resource_avi_healthmonitor.go @@ -60,6 +60,18 @@ func ResourceHealthMonitorSchema() map[string]*schema.Schema { Default: "2", ValidateFunc: validateInteger, }, + "ftp_monitor": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceHealthMonitorFtpSchema(), + }, + "ftps_monitor": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceHealthMonitorFtpSchema(), + }, "http_monitor": { Type: schema.TypeSet, Optional: true, @@ -90,6 +102,18 @@ func ResourceHealthMonitorSchema() map[string]*schema.Schema { Default: "false", ValidateFunc: validateBool, }, + "ldap_monitor": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceHealthMonitorLdapSchema(), + }, + "ldaps_monitor": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceHealthMonitorLdapSchema(), + }, "markers": { Type: schema.TypeList, Optional: true, diff --git a/avi/resource_avi_licensestatus.go b/avi/resource_avi_licensestatus.go new file mode 100644 index 000000000..8de70503c --- /dev/null +++ b/avi/resource_avi_licensestatus.go @@ -0,0 +1,108 @@ +// Copyright 2019 VMware, Inc. +// SPDX-License-Identifier: Mozilla Public License 2.0 + +package avi + +import ( + "log" + "strings" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vmware/alb-sdk/go/clients" +) + +func ResourceLicenseStatusSchema() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "configpb_attributes": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceConfigPbAttributesSchema(), + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "saas_status": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceSaasLicensingStatusSchema(), + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + } +} + +func resourceAviLicenseStatus() *schema.Resource { + return &schema.Resource{ + Create: resourceAviLicenseStatusCreate, + Read: ResourceAviLicenseStatusRead, + Update: resourceAviLicenseStatusUpdate, + Delete: resourceAviLicenseStatusDelete, + Schema: ResourceLicenseStatusSchema(), + Importer: &schema.ResourceImporter{ + State: ResourceLicenseStatusImporter, + }, + } +} + +func ResourceLicenseStatusImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { + s := ResourceLicenseStatusSchema() + return ResourceImporter(d, m, "licensestatus", s) +} + +func ResourceAviLicenseStatusRead(d *schema.ResourceData, meta interface{}) error { + s := ResourceLicenseStatusSchema() + err := APIRead(d, meta, "licensestatus", s) + if err != nil { + log.Printf("[ERROR] in reading object %v\n", err) + } + return err +} + +func resourceAviLicenseStatusCreate(d *schema.ResourceData, meta interface{}) error { + s := ResourceLicenseStatusSchema() + err := APICreateOrUpdate(d, meta, "licensestatus", s) + if err == nil { + err = ResourceAviLicenseStatusRead(d, meta) + } + return err +} + +func resourceAviLicenseStatusUpdate(d *schema.ResourceData, meta interface{}) error { + s := ResourceLicenseStatusSchema() + var err error + err = APICreateOrUpdate(d, meta, "licensestatus", s) + if err == nil { + err = ResourceAviLicenseStatusRead(d, meta) + } + return err +} + +func resourceAviLicenseStatusDelete(d *schema.ResourceData, meta interface{}) error { + objType := "licensestatus" + client := meta.(*clients.AviClient) + if APIDeleteSystemDefaultCheck(d) { + return nil + } + uuid := d.Get("uuid").(string) + if uuid != "" { + path := "api/" + objType + "/" + uuid + err := client.AviSession.Delete(path) + if err != nil && !(strings.Contains(err.Error(), "404") || strings.Contains(err.Error(), "204") || strings.Contains(err.Error(), "403")) { + log.Println("[INFO] resourceAviLicenseStatusDelete not found") + return err + } + d.SetId("") + } + return nil +} diff --git a/avi/resource_avi_rest_dependants.go b/avi/resource_avi_rest_dependants.go index 9145863e3..60ca50dfe 100644 --- a/avi/resource_avi_rest_dependants.go +++ b/avi/resource_avi_rest_dependants.go @@ -172,6 +172,11 @@ func ResourceALBServicesCaseSchema() *schema.Resource { Optional: true, Computed: true, }, + "mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "patch_version": { Type: schema.TypeString, Optional: true, @@ -1145,11 +1150,6 @@ func ResourceAppSignatureConfigSchema() *schema.Resource { Default: "1440", ValidateFunc: validateInteger, }, - "category": { - Type: schema.TypeString, - Optional: true, - Default: "ALB_THREAT_INTELLIGENCE_CATEGORY", - }, }, } } @@ -1237,6 +1237,11 @@ func ResourceApplicationLogSchema() *schema.Resource { Computed: true, ValidateFunc: validateInteger, }, + "auth_status": { + Type: schema.TypeString, + Optional: true, + Default: "AUTH_STATUS_NO_AUTHENTICATION", + }, "avg_ingress_latency_be": { Type: schema.TypeString, Optional: true, @@ -1518,6 +1523,12 @@ func ResourceApplicationLogSchema() *schema.Resource { Computed: true, Elem: ResourceNtlmLogSchema(), }, + "oauth_log": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOauthLogSchema(), + }, "ocsp_status_resp_sent": { Type: schema.TypeString, Optional: true, @@ -1813,6 +1824,17 @@ func ResourceApplicationLogSchema() *schema.Resource { Optional: true, Computed: true, }, + "source_ip": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "source_ip6": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "spdy_version": { Type: schema.TypeString, Optional: true, @@ -2275,7 +2297,8 @@ func ResourceAuthenticationPolicySchema() *schema.Resource { }, "default_auth_profile_ref": { Type: schema.TypeString, - Required: true, + Optional: true, + Computed: true, }, }, } @@ -4204,11 +4227,6 @@ func ResourceCaptureIPCSchema() *schema.Resource { func ResourceCaseConfigSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ - "category": { - Type: schema.TypeString, - Optional: true, - Default: "ALB_SUPPORT_CATEGORY", - }, "enable_auto_case_creation_on_controller_failure": { Type: schema.TypeString, Optional: true, @@ -5340,6 +5358,11 @@ func ResourceClusterNodeSchema() *schema.Resource { Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "interfaces": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceControllerInterfaceSchema(), + }, "ip": { Type: schema.TypeSet, Required: true, @@ -5363,6 +5386,11 @@ func ResourceClusterNodeSchema() *schema.Resource { Computed: true, Elem: ResourceIpAddrSchema(), }, + "static_routes": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceStaticRouteSchema(), + }, "vm_hostname": { Type: schema.TypeString, Optional: true, @@ -7023,6 +7051,51 @@ func ResourceControllerInfoSchema() *schema.Resource { } } +func ResourceControllerInterfaceSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "gateway": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceIpAddrSchema(), + }, + "if_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "ip": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceIpAddrPrefixSchema(), + }, + "labels": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "mac_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "public_ip_or_name": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceIpAddrSchema(), + }, + }, + } +} + func ResourceControllerInternalAuthSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -7238,6 +7311,12 @@ func ResourceControllerLimitsSchema() *schema.Resource { Computed: true, ValidateFunc: validateInteger, }, + "ipaddress_limits": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceIPAddrLimitsSchema(), + }, "ips_per_ipgroup": { Type: schema.TypeString, Optional: true, @@ -7274,6 +7353,12 @@ func ResourceControllerLimitsSchema() *schema.Resource { Computed: true, ValidateFunc: validateInteger, }, + "rules_per_nat_policy": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, "rules_per_networksecuritypolicy": { Type: schema.TypeString, Optional: true, @@ -10904,6 +10989,12 @@ func ResourceEventDetailsSchema() *schema.Resource { Computed: true, Elem: ResourceNetworkSubnetInfoSchema(), }, + "nsxt_endpoint_details": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceNsxtSIEndpointDetailsSchema(), + }, "nsxt_img_details": { Type: schema.TypeSet, Optional: true, @@ -10916,6 +11007,24 @@ func ResourceEventDetailsSchema() *schema.Resource { Computed: true, Elem: ResourceNsxtSetupSchema(), }, + "nsxt_policy_details": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceNsxtSIPolicyDetailsSchema(), + }, + "nsxt_rule_details": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceNsxtSIRuleDetailsSchema(), + }, + "nsxt_service_details": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceNsxtSIServiceDetailsSchema(), + }, "nw_subnet_clash_details": { Type: schema.TypeSet, Optional: true, @@ -11426,12 +11535,6 @@ func ResourceEventDetailsSchema() *schema.Resource { Computed: true, Elem: ResourceVinfraVcenterDiscoveryFailureSchema(), }, - "vcenter_img_details": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: ResourceVcenterImageDetailsSchema(), - }, "vcenter_network_limit": { Type: schema.TypeSet, Optional: true, @@ -11829,6 +11932,58 @@ func ResourceFalsePositiveResultSchema() *schema.Resource { } } +func ResourceFbGsInfoSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "oper_status": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOperationalStatusSchema(), + }, + }, + } +} + +func ResourceFbPoolInfoSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "oper_status": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOperationalStatusSchema(), + }, + }, + } +} + +func ResourceFbSeInfoSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "oper_status": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOperationalStatusSchema(), + }, + }, + } +} + +func ResourceFbVsInfoSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "oper_status": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOperationalStatusSchema(), + }, + }, + } +} + func ResourceFeProxyRoutePublishConfigSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -14883,12 +15038,24 @@ func ResourceHTTPApplicationProfileSchema() *schema.Resource { Optional: true, Default: "SSL_CLIENT_CERTIFICATE_NONE", }, + "true_client_ip": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceTrueClientIPConfigSchema(), + }, "use_app_keepalive_timeout": { Type: schema.TypeString, Optional: true, Default: "false", ValidateFunc: validateBool, }, + "use_true_client_ip": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "websockets_enabled": { Type: schema.TypeString, Optional: true, @@ -15725,6 +15892,28 @@ func ResourceHealthMonitorExternalSchema() *schema.Resource { } } +func ResourceHealthMonitorFtpSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filename": { + Type: schema.TypeString, + Required: true, + }, + "mode": { + Type: schema.TypeString, + Optional: true, + Default: "FTP_PASSIVE_MODE", + }, + "ssl_attributes": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceHealthMonitorSSLAttributesSchema(), + }, + }, + } +} + func ResourceHealthMonitorHttpSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -15803,6 +15992,38 @@ func ResourceHealthMonitorImapSchema() *schema.Resource { } } +func ResourceHealthMonitorLdapSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "attributes": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "base_dn": { + Type: schema.TypeString, + Required: true, + }, + "filter": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "ssl_attributes": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceHealthMonitorSSLAttributesSchema(), + }, + }, + } +} + func ResourceHealthMonitorPop3Schema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -16306,6 +16527,37 @@ func ResourceHypervisor_PropertiesSchema() *schema.Resource { } } +func ResourceIPAddrLimitsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ip_address_group_per_match_criteria": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "ip_address_prefix_per_match_criteria": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "ip_address_range_per_match_criteria": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "ip_addresses_per_match_criteria": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + }, + } +} + func ResourceIPNetworkSubnetSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -16983,11 +17235,6 @@ func ResourceIpCommunitySchema() *schema.Resource { func ResourceIpReputationConfigSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ - "category": { - Type: schema.TypeString, - Optional: true, - Default: "ALB_THREAT_INTELLIGENCE_CATEGORY", - }, "ip_reputation_file_object_expiry_duration": { Type: schema.TypeString, Optional: true, @@ -17579,6 +17826,17 @@ func ResourceJWTMatchSchema() *schema.Resource { } } +func ResourceJWTValidationParamsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "audience": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + func ResourceJWTValidationVsConfigSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -17696,6 +17954,22 @@ func ResourceKeyValueTupleSchema() *schema.Resource { } } +func ResourceKniPortRangeSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "protocol": { + Type: schema.TypeString, + Required: true, + }, + "range": { + Type: schema.TypeSet, + Required: true, + Elem: ResourcePortRangeSchema(), + }, + }, + } +} + func ResourceL4ConnectionPolicySchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -18923,6 +19197,12 @@ func ResourceMatchTargetSchema() *schema.Resource { Computed: true, Elem: ResourceQueryMatchSchema(), }, + "source_ip": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceIpAddrMatchSchema(), + }, "version": { Type: schema.TypeSet, Optional: true, @@ -20970,6 +21250,150 @@ func ResourceNsxtImageDetailsSchema() *schema.Resource { } } +func ResourceNsxtSIEndpointDetailsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "endpoint": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "error_string": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "segroup": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "services": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "targetips": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "tier1": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + +func ResourceNsxtSIPolicyDetailsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "error_string": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "policy": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "redirectto": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "segroup": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "tier1": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + +func ResourceNsxtSIRuleDetailsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "destexclude": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateBool, + }, + "dests": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "direction": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "error_string": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "pool": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "segroup": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "services": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "sources": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func ResourceNsxtSIServiceDetailsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "error_string": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "service": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + func ResourceNsxtSetupSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -21139,6 +21563,166 @@ func ResourceNuageSDNControllerSchema() *schema.Resource { } } +func ResourceOAuthAppSettingsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "client_id": { + Type: schema.TypeString, + Required: true, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + DiffSuppressFunc: suppressSensitiveFieldDiffs, + }, + "oidc_config": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOIDCConfigSchema(), + }, + "scopes": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func ResourceOAuthProfileSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authorization_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "introspection_endpoint": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "issuer": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "jwks_timeout": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "jwks_uri": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "oauth_resp_buffer_sz": { + Type: schema.TypeString, + Optional: true, + Default: "102400", + ValidateFunc: validateInteger, + }, + "pool_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "token_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "userinfo_endpoint": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + +func ResourceOAuthResourceServerSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "access_type": { + Type: schema.TypeString, + Optional: true, + Default: "ACCESS_TOKEN_TYPE_JWT", + }, + "jwt_params": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceJWTValidationParamsSchema(), + }, + "opaque_token_params": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOpaqueTokenValidationParamsSchema(), + }, + }, + } +} + +func ResourceOAuthSettingsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "app_settings": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOAuthAppSettingsSchema(), + }, + "auth_profile_ref": { + Type: schema.TypeString, + Required: true, + }, + "resource_server": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOAuthResourceServerSchema(), + }, + }, + } +} + +func ResourceOAuthVSConfigSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "cookie_timeout": { + Type: schema.TypeString, + Optional: true, + Default: "60", + ValidateFunc: validateInteger, + }, + "key": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceHttpCookiePersistenceKeySchema(), + }, + "oauth_settings": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceOAuthSettingsSchema(), + }, + "redirect_uri": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + func ResourceOCICredentialsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -21256,6 +21840,31 @@ func ResourceOCSPResponseInfoSchema() *schema.Resource { } } +func ResourceOIDCConfigSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "oidc_enable": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateBool, + }, + "profile": { + Type: schema.TypeString, + Optional: true, + Default: "true", + ValidateFunc: validateBool, + }, + "userinfo": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateBool, + }, + }, + } +} + func ResourceOShiftK8SConfigurationSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -21558,6 +22167,88 @@ func ResourceOShiftK8SConfigurationSchema() *schema.Resource { } } +func ResourceOauthLogSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authn_rule_match": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceAuthnRuleMatchSchema(), + }, + "authz_rule_match": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceAuthzRuleMatchSchema(), + }, + "is_session_cookie_expired": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateBool, + }, + "jwks_subrequest": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOauthSubRequestLogSchema(), + }, + "oauth_state": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "token_exchange_subrequest": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOauthSubRequestLogSchema(), + }, + "token_introspection_subrequest": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOauthSubRequestLogSchema(), + }, + "token_refresh_subrequest": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOauthSubRequestLogSchema(), + }, + }, + } +} + +func ResourceOauthSubRequestLogSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "error_code": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "error_description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "sub_request_log": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceSubRequestLogSchema(), + }, + }, + } +} + func ResourceObjSyncConfigSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -21583,6 +22274,23 @@ func ResourceObjSyncConfigSchema() *schema.Resource { } } +func ResourceOpaqueTokenValidationParamsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "server_id": { + Type: schema.TypeString, + Required: true, + }, + "server_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + DiffSuppressFunc: suppressSensitiveFieldDiffs, + }, + }, + } +} + func ResourceOpenStackApiVersionCheckFailureSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -22138,6 +22846,11 @@ func ResourceOpsHistorySchema() *schema.Resource { Computed: true, Elem: ResourceUpgradeOpsStateSchema(), }, + "statediff_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "upgrade_events": { Type: schema.TypeList, Optional: true, @@ -23143,12 +23856,6 @@ func ResourcePortalFeatureOptInSchema() *schema.Resource { Default: "true", ValidateFunc: validateBool, }, - "enable_saas_licensing": { - Type: schema.TypeString, - Optional: true, - Default: "false", - ValidateFunc: validateBool, - }, "enable_user_agent_db_sync": { Type: schema.TypeString, Optional: true, @@ -23867,6 +24574,12 @@ func ResourceResponseMatchTargetSchema() *schema.Resource { Optional: true, Elem: ResourceHdrMatchSchema(), }, + "source_ip": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceIpAddrMatchSchema(), + }, "status": { Type: schema.TypeSet, Optional: true, @@ -25227,21 +25940,56 @@ func ResourceSSLVersionSchema() *schema.Resource { func ResourceSaasLicensingInfoSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ - "cache_service_units": { + "max_service_units": { Type: schema.TypeString, Optional: true, Default: "0", ValidateFunc: validateFloat, }, - "category": { + "reserve_service_units": { + Type: schema.TypeString, + Optional: true, + Default: "0", + ValidateFunc: validateFloat, + }, + }, + } +} + +func ResourceSaasLicensingStatusSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "connected": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateBool, + }, + "enabled": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateBool, + }, + "message": { Type: schema.TypeString, Optional: true, - Default: "ALB_LICENSE_CATEGORY", + Computed: true, }, - "max_service_units": { + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "public_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "reserve_service_units": { Type: schema.TypeString, Optional: true, - Default: "1000", + Computed: true, ValidateFunc: validateFloat, }, }, @@ -29679,12 +30427,23 @@ func ResourceSidebandProfileSchema() *schema.Resource { func ResourceSingleLicenseSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "addons": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "burst_cores": { Type: schema.TypeString, Optional: true, Computed: true, ValidateFunc: validateInteger, }, + "capacity": { + Type: schema.TypeString, + Optional: true, + Default: "0", + ValidateFunc: validateFloat, + }, "ccu": { Type: schema.TypeString, Optional: true, @@ -29790,6 +30549,11 @@ func ResourceSingleLicenseSchema() *schema.Resource { Optional: true, Computed: true, }, + "unit": { + Type: schema.TypeString, + Optional: true, + Default: "SERVICE_UNIT", + }, "valid_until": { Type: schema.TypeString, Required: true, @@ -30053,6 +30817,44 @@ func ResourceStateCacheMgrDebugFilterSchema() *schema.Resource { } } +func ResourceStatediffEventSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "duration": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "end_time": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "start_time": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + Default: "FB_INIT", + }, + "task_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + func ResourceStaticIpAllocInfoSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -30241,6 +31043,100 @@ func ResourceSubJobSchema() *schema.Resource { } } +func ResourceSubRequestLogSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "headers_received_from_server": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "headers_sent_to_server": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "http_response_code": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "http_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "method": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "pool_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "pool_uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "request_length": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "response_length": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "server_ip": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "server_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "server_port": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "source_port": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "total_time": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, + "uri_path": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uri_query": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + func ResourceSubResourceSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -30443,6 +31339,11 @@ func ResourceSwitchoverEventDetailsSchema() *schema.Resource { Optional: true, Computed: true, }, + "reason": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "to_se_name": { Type: schema.TypeString, Optional: true, @@ -30864,6 +31765,11 @@ func ResourceTencentZoneNetworkSchema() *schema.Resource { func ResourceTier1LogicalRouterInfoSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "locale_service": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "segment_id": { Type: schema.TypeString, Optional: true, @@ -30894,6 +31800,29 @@ func ResourceTimeStampSchema() *schema.Resource { } } +func ResourceTrueClientIPConfigSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "direction": { + Type: schema.TypeString, + Optional: true, + Default: "LEFT", + }, + "headers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "index_in_header": { + Type: schema.TypeString, + Optional: true, + Default: "1", + ValidateFunc: validateInteger, + }, + }, + } +} + func ResourceUDPFastPathProfileSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -31451,11 +32380,6 @@ func ResourceUserAgentDBConfigSchema() *schema.Resource { Default: "500", ValidateFunc: validateInteger, }, - "category": { - Type: schema.TypeString, - Optional: true, - Default: "ALB_THREAT_INTELLIGENCE_CATEGORY", - }, }, } } @@ -32897,33 +33821,6 @@ func ResourceVcenterHostsSchema() *schema.Resource { } } -func ResourceVcenterImageDetailsSchema() *schema.Resource { - return &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "error_string": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "image_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "vc_url": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - } -} - func ResourceVersionInfoSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -36389,11 +37286,6 @@ func ResourceWafConfigSchema() *schema.Resource { Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, - "allowed_request_content_types": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, "argument_separator": { Type: schema.TypeString, Optional: true, @@ -36525,11 +37417,6 @@ func ResourceWafContentTypeMappingSchema() *schema.Resource { func ResourceWafCrsConfigSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ - "category": { - Type: schema.TypeString, - Optional: true, - Default: "ALB_THREAT_INTELLIGENCE_CATEGORY", - }, "enable_auto_download_waf_signatures": { Type: schema.TypeString, Optional: true, @@ -37260,15 +38147,71 @@ func ResourceWebApplicationSignatureServiceStatusSchema() *schema.Resource { } } -func ResourcevCenterConfigurationSchema() *schema.Resource { +func ResourcepostsnapshotSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ - "content_lib": { + "gssnapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceFbGsInfoSchema(), + }, + "poolsnapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceFbPoolInfoSchema(), + }, + "sesnapshot": { Type: schema.TypeSet, Optional: true, Computed: true, - Elem: ResourceContentLibConfigSchema(), + Elem: ResourceFbSeInfoSchema(), }, + "vssnapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceFbVsInfoSchema(), + }, + }, + } +} + +func ResourcepresnapshotSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "gssnapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceFbGsInfoSchema(), + }, + "poolsnapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceFbPoolInfoSchema(), + }, + "sesnapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceFbSeInfoSchema(), + }, + "vssnapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceFbVsInfoSchema(), + }, + }, + } +} + +func ResourcevCenterConfigurationSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ "datacenter": { Type: schema.TypeString, Optional: true, @@ -37302,12 +38245,6 @@ func ResourcevCenterConfigurationSchema() *schema.Resource { Type: schema.TypeString, Required: true, }, - "use_content_lib": { - Type: schema.TypeString, - Optional: true, - Default: "true", - ValidateFunc: validateBool, - }, "username": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_serviceenginegroup.go b/avi/resource_avi_serviceenginegroup.go index 250b7d93f..74ac4eea7 100644 --- a/avi/resource_avi_serviceenginegroup.go +++ b/avi/resource_avi_serviceenginegroup.go @@ -113,6 +113,12 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "baremetal_dispatcher_handles_flows": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "bgp_peer_monitor_failover_enabled": { Type: schema.TypeString, Optional: true, @@ -475,11 +481,23 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { Default: "64", ValidateFunc: validateInteger, }, + "hybrid_rss_mode": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "hypervisor": { Type: schema.TypeString, Optional: true, Computed: true, }, + "ignore_docker_mac_change": { + Type: schema.TypeString, + Optional: true, + Default: "true", + ValidateFunc: validateBool, + }, "ignore_rtt_threshold": { Type: schema.TypeString, Optional: true, @@ -512,6 +530,11 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { Optional: true, Elem: ResourceIptableRuleSetSchema(), }, + "kni_allowed_server_ports": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceKniPortRangeSchema(), + }, "l7_conns_per_core": { Type: schema.TypeString, Optional: true, @@ -829,6 +852,12 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { Default: "0", ValidateFunc: validateInteger, }, + "num_dispatcher_queues": { + Type: schema.TypeString, + Optional: true, + Default: "1", + ValidateFunc: validateInteger, + }, "num_flow_cores_sum_changes_to_ignore": { Type: schema.TypeString, Optional: true, @@ -961,6 +990,12 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { Default: "0", ValidateFunc: validateInteger, }, + "se_dp_if_state_poll_interval": { + Type: schema.TypeString, + Optional: true, + Default: "10", + ValidateFunc: validateInteger, + }, "se_dp_isolation": { Type: schema.TypeString, Optional: true, @@ -1027,6 +1062,18 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { Default: "0", ValidateFunc: validateInteger, }, + "se_dump_core_on_assert": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, + "se_emulated_cores": { + Type: schema.TypeString, + Optional: true, + Default: "0", + ValidateFunc: validateInteger, + }, "se_flow_probe_retries": { Type: schema.TypeString, Optional: true, @@ -1109,6 +1156,12 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { Optional: true, Default: "Avi", }, + "se_packet_buffer_max": { + Type: schema.TypeString, + Optional: true, + Default: "0", + ValidateFunc: validateInteger, + }, "se_pcap_lookahead": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_serviceenginegroup_test.go b/avi/resource_avi_serviceenginegroup_test.go index 933a65f24..52d0a8520 100644 --- a/avi/resource_avi_serviceenginegroup_test.go +++ b/avi/resource_avi_serviceenginegroup_test.go @@ -156,6 +156,18 @@ func TestAVIServiceEngineGroupBasic(t *testing.T) { "avi_serviceenginegroup.testServiceEngineGroup", "sdb_pipeline_size", "100"), resource.TestCheckResourceAttr( "avi_serviceenginegroup.testServiceEngineGroup", "sdb_scan_count", "1000"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "ignore_docker_mac_change", "true"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_emulated_cores", "0"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_dump_core_on_assert", "false"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_packet_buffer_max", "0"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_dp_if_state_poll_interval", "10"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "baremetal_dispatcher_handles_flows", "false"), ), }, { @@ -298,6 +310,18 @@ func TestAVIServiceEngineGroupBasic(t *testing.T) { "avi_serviceenginegroup.testServiceEngineGroup", "sdb_pipeline_size", "100"), resource.TestCheckResourceAttr( "avi_serviceenginegroup.testServiceEngineGroup", "sdb_scan_count", "1000"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "ignore_docker_mac_change", "true"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_emulated_cores", "0"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_dump_core_on_assert", "false"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_packet_buffer_max", "0"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "se_dp_if_state_poll_interval", "10"), + resource.TestCheckResourceAttr( + "avi_serviceenginegroup.testServiceEngineGroup", "baremetal_dispatcher_handles_flows", "false"), ), }, { @@ -447,6 +471,12 @@ resource "avi_serviceenginegroup" "testServiceEngineGroup" { sdb_flush_interval = "100" sdb_pipeline_size = "100" sdb_scan_count = "1000" + ignore_docker_mac_change = true + se_emulated_cores = "0" + se_dump_core_on_assert = false + se_packet_buffer_max = "0" + se_dp_if_state_poll_interval = "10" + baremetal_dispatcher_handles_flows = false } ` @@ -539,5 +569,11 @@ resource "avi_serviceenginegroup" "testServiceEngineGroup" { sdb_flush_interval = "100" sdb_pipeline_size = "100" sdb_scan_count = "1000" + ignore_docker_mac_change = true + se_emulated_cores = "0" + se_dump_core_on_assert = false + se_packet_buffer_max = "0" + se_dp_if_state_poll_interval = "10" + baremetal_dispatcher_handles_flows = false } ` diff --git a/avi/resource_avi_ssopolicy.go b/avi/resource_avi_ssopolicy.go index 9ebfc3a5d..fb380e847 100644 --- a/avi/resource_avi_ssopolicy.go +++ b/avi/resource_avi_ssopolicy.go @@ -15,7 +15,8 @@ func ResourceSSOPolicySchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "authentication_policy": { Type: schema.TypeSet, - Required: true, + Optional: true, + Computed: true, Elem: ResourceAuthenticationPolicySchema(), }, "authorization_policy": { diff --git a/avi/resource_avi_statediffoperation.go b/avi/resource_avi_statediffoperation.go new file mode 100644 index 000000000..9cbddba9e --- /dev/null +++ b/avi/resource_avi_statediffoperation.go @@ -0,0 +1,128 @@ +// Copyright 2019 VMware, Inc. +// SPDX-License-Identifier: Mozilla Public License 2.0 + +package avi + +import ( + "log" + "strings" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vmware/alb-sdk/go/clients" +) + +func ResourceStatediffOperationSchema() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "configpb_attributes": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceConfigPbAttributesSchema(), + }, + "events": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceStatediffEventSchema(), + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "node_uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "operation": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "phase": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + } +} + +func resourceAviStatediffOperation() *schema.Resource { + return &schema.Resource{ + Create: resourceAviStatediffOperationCreate, + Read: ResourceAviStatediffOperationRead, + Update: resourceAviStatediffOperationUpdate, + Delete: resourceAviStatediffOperationDelete, + Schema: ResourceStatediffOperationSchema(), + Importer: &schema.ResourceImporter{ + State: ResourceStatediffOperationImporter, + }, + } +} + +func ResourceStatediffOperationImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { + s := ResourceStatediffOperationSchema() + return ResourceImporter(d, m, "statediffoperation", s) +} + +func ResourceAviStatediffOperationRead(d *schema.ResourceData, meta interface{}) error { + s := ResourceStatediffOperationSchema() + err := APIRead(d, meta, "statediffoperation", s) + if err != nil { + log.Printf("[ERROR] in reading object %v\n", err) + } + return err +} + +func resourceAviStatediffOperationCreate(d *schema.ResourceData, meta interface{}) error { + s := ResourceStatediffOperationSchema() + err := APICreateOrUpdate(d, meta, "statediffoperation", s) + if err == nil { + err = ResourceAviStatediffOperationRead(d, meta) + } + return err +} + +func resourceAviStatediffOperationUpdate(d *schema.ResourceData, meta interface{}) error { + s := ResourceStatediffOperationSchema() + var err error + err = APICreateOrUpdate(d, meta, "statediffoperation", s) + if err == nil { + err = ResourceAviStatediffOperationRead(d, meta) + } + return err +} + +func resourceAviStatediffOperationDelete(d *schema.ResourceData, meta interface{}) error { + objType := "statediffoperation" + client := meta.(*clients.AviClient) + if APIDeleteSystemDefaultCheck(d) { + return nil + } + uuid := d.Get("uuid").(string) + if uuid != "" { + path := "api/" + objType + "/" + uuid + err := client.AviSession.Delete(path) + if err != nil && !(strings.Contains(err.Error(), "404") || strings.Contains(err.Error(), "204") || strings.Contains(err.Error(), "403")) { + log.Println("[INFO] resourceAviStatediffOperationDelete not found") + return err + } + d.SetId("") + } + return nil +} diff --git a/avi/resource_avi_statediffsnapshot.go b/avi/resource_avi_statediffsnapshot.go new file mode 100644 index 000000000..b6710791a --- /dev/null +++ b/avi/resource_avi_statediffsnapshot.go @@ -0,0 +1,175 @@ +// Copyright 2019 VMware, Inc. +// SPDX-License-Identifier: Mozilla Public License 2.0 + +package avi + +import ( + "log" + "strings" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vmware/alb-sdk/go/clients" +) + +func ResourceStatediffSnapshotSchema() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "configpb_attributes": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceConfigPbAttributesSchema(), + }, + "gslb_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "gslb_uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "pool_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "pool_uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "post_snapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourcepostsnapshotSchema(), + }, + "pre_snapshot": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourcepresnapshotSchema(), + }, + "se_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "se_group_uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "se_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "se_uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "snapshot_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "statediff_operation_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vs_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vs_uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + } +} + +func resourceAviStatediffSnapshot() *schema.Resource { + return &schema.Resource{ + Create: resourceAviStatediffSnapshotCreate, + Read: ResourceAviStatediffSnapshotRead, + Update: resourceAviStatediffSnapshotUpdate, + Delete: resourceAviStatediffSnapshotDelete, + Schema: ResourceStatediffSnapshotSchema(), + Importer: &schema.ResourceImporter{ + State: ResourceStatediffSnapshotImporter, + }, + } +} + +func ResourceStatediffSnapshotImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { + s := ResourceStatediffSnapshotSchema() + return ResourceImporter(d, m, "statediffsnapshot", s) +} + +func ResourceAviStatediffSnapshotRead(d *schema.ResourceData, meta interface{}) error { + s := ResourceStatediffSnapshotSchema() + err := APIRead(d, meta, "statediffsnapshot", s) + if err != nil { + log.Printf("[ERROR] in reading object %v\n", err) + } + return err +} + +func resourceAviStatediffSnapshotCreate(d *schema.ResourceData, meta interface{}) error { + s := ResourceStatediffSnapshotSchema() + err := APICreateOrUpdate(d, meta, "statediffsnapshot", s) + if err == nil { + err = ResourceAviStatediffSnapshotRead(d, meta) + } + return err +} + +func resourceAviStatediffSnapshotUpdate(d *schema.ResourceData, meta interface{}) error { + s := ResourceStatediffSnapshotSchema() + var err error + err = APICreateOrUpdate(d, meta, "statediffsnapshot", s) + if err == nil { + err = ResourceAviStatediffSnapshotRead(d, meta) + } + return err +} + +func resourceAviStatediffSnapshotDelete(d *schema.ResourceData, meta interface{}) error { + objType := "statediffsnapshot" + client := meta.(*clients.AviClient) + if APIDeleteSystemDefaultCheck(d) { + return nil + } + uuid := d.Get("uuid").(string) + if uuid != "" { + path := "api/" + objType + "/" + uuid + err := client.AviSession.Delete(path) + if err != nil && !(strings.Contains(err.Error(), "404") || strings.Contains(err.Error(), "204") || strings.Contains(err.Error(), "403")) { + log.Println("[INFO] resourceAviStatediffSnapshotDelete not found") + return err + } + d.SetId("") + } + return nil +} diff --git a/avi/resource_avi_upgradestatusinfo.go b/avi/resource_avi_upgradestatusinfo.go index 4413e4489..4b3b52b0e 100644 --- a/avi/resource_avi_upgradestatusinfo.go +++ b/avi/resource_avi_upgradestatusinfo.go @@ -204,6 +204,11 @@ func ResourceUpgradeStatusInfoSchema() map[string]*schema.Schema { Computed: true, Elem: ResourceUpgradeOpsStateSchema(), }, + "statediff_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "system": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_virtualservice.go b/avi/resource_avi_virtualservice.go index a15276b60..2f5da2f3a 100644 --- a/avi/resource_avi_virtualservice.go +++ b/avi/resource_avi_virtualservice.go @@ -262,6 +262,12 @@ func ResourceVirtualServiceSchema() map[string]*schema.Schema { Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "oauth_vs_config": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceOAuthVSConfigSchema(), + }, "performance_limits": { Type: schema.TypeSet, Optional: true, diff --git a/avi/resource_avi_wafpolicy.go b/avi/resource_avi_wafpolicy.go index 56a8029a3..f96c1fc8b 100644 --- a/avi/resource_avi_wafpolicy.go +++ b/avi/resource_avi_wafpolicy.go @@ -132,11 +132,6 @@ func ResourceWafPolicySchema() map[string]*schema.Schema { Optional: true, Elem: ResourceWafRuleGroupSchema(), }, - "resolved_crs_groups": { - Type: schema.TypeList, - Optional: true, - Elem: ResourceWafRuleGroupSchema(), - }, "tenant_ref": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_wafprofile_test.go b/avi/resource_avi_wafprofile_test.go index c9ade57f1..38b15db79 100644 --- a/avi/resource_avi_wafprofile_test.go +++ b/avi/resource_avi_wafprofile_test.go @@ -4083,7 +4083,6 @@ EOF } config { regex_match_limit = "1500" - allowed_request_content_types = ["application/x-www-form-urlencoded","multipart/form-data","text/xml","application/xml","application/x-amf","application/json"] allowed_methods = ["HTTP_METHOD_GET","HTTP_METHOD_HEAD","HTTP_METHOD_POST","HTTP_METHOD_OPTIONS"] content_type_mappings { content_type = "application/x-www-form-urlencoded" @@ -8148,7 +8147,6 @@ EOF } config { regex_match_limit = "1500" - allowed_request_content_types = ["application/x-www-form-urlencoded","multipart/form-data","text/xml","application/xml","application/x-amf","application/json"] allowed_methods = ["HTTP_METHOD_GET","HTTP_METHOD_HEAD","HTTP_METHOD_POST","HTTP_METHOD_OPTIONS"] response_hdr_default_action = "phase:3,deny,status:403,log,auditlog" allowed_http_versions = ["ONE_ZERO","ONE_ONE"] diff --git a/go.mod b/go.mod index 0a2268e2a..1624a2a2f 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.13 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0 - github.com/vmware/alb-sdk v0.0.0-20211004043454-b896e8d4e830 + github.com/vmware/alb-sdk v0.0.0-20211112041002-7388b1a055c9 ) diff --git a/go.sum b/go.sum index 75e13bca3..8efa56a8c 100644 --- a/go.sum +++ b/go.sum @@ -312,6 +312,8 @@ github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmware/alb-sdk v0.0.0-20211004043454-b896e8d4e830 h1:c9li2S4kYjGz13nE52hqnXV9Oz1FiICxguV9ZWRI0UE= github.com/vmware/alb-sdk v0.0.0-20211004043454-b896e8d4e830/go.mod h1:GuFjFl3UCYMUyEnbwPjpu+9wlkGs/10xuJuqE/1rqKI= +github.com/vmware/alb-sdk v0.0.0-20211112041002-7388b1a055c9 h1:F+fJ9Tbv4iZXfIy2jvGGnDixmISGeyuahA87C75G//A= +github.com/vmware/alb-sdk v0.0.0-20211112041002-7388b1a055c9/go.mod h1:GuFjFl3UCYMUyEnbwPjpu+9wlkGs/10xuJuqE/1rqKI= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/website/avi.erb b/website/avi.erb index 939e5661a..bb3367468 100644 --- a/website/avi.erb +++ b/website/avi.erb @@ -52,6 +52,12 @@