From 99c0df23235cf279725a2524a926e64dfecdfda7 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 20 Nov 2023 21:42:19 -0800 Subject: [PATCH 01/22] Updated assets for terraform Signed-off-by: Sagar --- ...data_source_avi_applicationprofile_test.go | 3 ++ ...ta_source_avi_customipamdnsprofile_test.go | 2 +- avi/data_source_avi_dnspolicy_test.go | 2 +- avi/data_source_avi_ipaddrgroup_test.go | 2 +- ..._source_avi_ipamdnsproviderprofile_test.go | 2 +- avi/data_source_avi_user_test.go | 2 +- avi/datasource_avi_alertscriptconfig.go | 4 ++ avi/datasource_avi_controllerproperties.go | 8 +++ avi/datasource_avi_customipamdnsprofile.go | 2 +- avi/datasource_avi_dnspolicy.go | 2 +- avi/datasource_avi_dynamicdnsrecord.go | 2 +- avi/datasource_avi_ipaddrgroup.go | 2 +- avi/datasource_avi_ipamdnsproviderprofile.go | 2 +- avi/resource_avi_actiongroupconfig.go | 3 +- avi/resource_avi_albservicesconfig.go | 3 +- avi/resource_avi_albservicesfileupload.go | 3 +- avi/resource_avi_albservicesjob.go | 3 +- avi/resource_avi_alertconfig.go | 3 +- avi/resource_avi_alertemailconfig.go | 3 +- avi/resource_avi_alertscriptconfig.go | 9 +++- avi/resource_avi_alertsyslogconfig.go | 3 +- avi/resource_avi_analyticsprofile.go | 3 +- ...ource_avi_applicationpersistenceprofile.go | 3 +- avi/resource_avi_applicationprofile.go | 3 +- avi/resource_avi_applicationprofile_test.go | 6 +++ avi/resource_avi_authmappingprofile.go | 3 +- avi/resource_avi_authprofile.go | 3 +- avi/resource_avi_autoscalelaunchconfig.go | 3 +- avi/resource_avi_availabilityzone.go | 3 +- avi/resource_avi_backup.go | 3 +- avi/resource_avi_backupconfiguration.go | 3 +- avi/resource_avi_botconfigconsolidator.go | 3 +- avi/resource_avi_botdetectionpolicy.go | 3 +- ...resource_avi_botipreputationtypemapping.go | 3 +- avi/resource_avi_botmapping.go | 3 +- ...source_avi_certificatemanagementprofile.go | 3 +- avi/resource_avi_cloud.go | 7 ++- avi/resource_avi_cloudconnectoruser.go | 3 +- avi/resource_avi_cloudproperties.go | 3 +- avi/resource_avi_cluster.go | 5 +- avi/resource_avi_clusterclouddetails.go | 3 +- ...source_avi_controllerportalregistration.go | 3 +- avi/resource_avi_controllerproperties.go | 15 +++++- avi/resource_avi_controllersite.go | 3 +- avi/resource_avi_customipamdnsprofile.go | 17 +++--- avi/resource_avi_customipamdnsprofile_test.go | 8 +-- avi/resource_avi_dnspolicy.go | 17 +++--- avi/resource_avi_dnspolicy_test.go | 8 +-- avi/resource_avi_dynamicdnsrecord.go | 17 +++--- avi/resource_avi_errorpagebody.go | 3 +- avi/resource_avi_errorpageprofile.go | 3 +- avi/resource_avi_federationcheckpoint.go | 3 +- avi/resource_avi_fileobject.go | 3 +- avi/resource_avi_geodb.go | 3 +- avi/resource_avi_gslb.go | 3 +- avi/resource_avi_gslbgeodbprofile.go | 3 +- avi/resource_avi_gslbservice.go | 3 +- ...esource_avi_hardwaresecuritymodulegroup.go | 3 +- avi/resource_avi_healthmonitor.go | 3 +- avi/resource_avi_httppolicyset.go | 3 +- avi/resource_avi_icapprofile.go | 3 +- avi/resource_avi_image.go | 3 +- avi/resource_avi_inventoryfaultconfig.go | 3 +- avi/resource_avi_ipaddrgroup.go | 17 +++--- avi/resource_avi_ipaddrgroup_test.go | 8 +-- avi/resource_avi_ipamdnsproviderprofile.go | 17 +++--- ...esource_avi_ipamdnsproviderprofile_test.go | 8 +-- avi/resource_avi_ipreputationdb.go | 3 +- avi/resource_avi_jwtserverprofile.go | 3 +- avi/resource_avi_l4policyset.go | 3 +- avi/resource_avi_labelgroup.go | 3 +- avi/resource_avi_licenseledgerdetails.go | 3 +- avi/resource_avi_licensestatus.go | 3 +- avi/resource_avi_memorybalancerrequest.go | 3 +- avi/resource_avi_microservicegroup.go | 3 +- avi/resource_avi_natpolicy.go | 3 +- avi/resource_avi_network.go | 3 +- avi/resource_avi_networkprofile.go | 3 +- avi/resource_avi_networksecuritypolicy.go | 3 +- avi/resource_avi_networkservice.go | 3 +- avi/resource_avi_nsxtsegmentruntime.go | 3 +- avi/resource_avi_pingaccessagent.go | 3 +- avi/resource_avi_pkiprofile.go | 3 +- avi/resource_avi_pool.go | 3 +- avi/resource_avi_poolgroup.go | 3 +- avi/resource_avi_poolgroupdeploymentpolicy.go | 3 +- avi/resource_avi_prioritylabels.go | 3 +- avi/resource_avi_protocolparser.go | 3 +- avi/resource_avi_rest_dependants.go | 26 +++++++++ avi/resource_avi_rmcloudopsproto.go | 3 +- avi/resource_avi_role.go | 3 +- avi/resource_avi_scheduler.go | 3 +- avi/resource_avi_securitymanagerdata.go | 3 +- avi/resource_avi_securitypolicy.go | 3 +- avi/resource_avi_seproperties.go | 3 +- avi/resource_avi_serverautoscalepolicy.go | 3 +- avi/resource_avi_serviceengine.go | 3 +- avi/resource_avi_serviceenginegroup.go | 5 +- avi/resource_avi_siteversion.go | 3 +- avi/resource_avi_snmptrapprofile.go | 3 +- avi/resource_avi_sslkeyandcertificate.go | 3 +- avi/resource_avi_sslprofile.go | 3 +- avi/resource_avi_ssopolicy.go | 3 +- avi/resource_avi_statediffoperation.go | 3 +- avi/resource_avi_statediffsnapshot.go | 3 +- avi/resource_avi_stringgroup.go | 3 +- avi/resource_avi_systemconfiguration.go | 3 +- avi/resource_avi_systemlimits.go | 3 +- avi/resource_avi_tenant.go | 3 +- avi/resource_avi_testsedatastorelevel1.go | 3 +- avi/resource_avi_testsedatastorelevel2.go | 3 +- avi/resource_avi_testsedatastorelevel3.go | 3 +- avi/resource_avi_trafficcloneprofile.go | 3 +- avi/resource_avi_upgradestatusinfo.go | 3 +- avi/resource_avi_upgradestatussummary.go | 3 +- avi/resource_avi_user.go | 3 +- avi/resource_avi_user_test.go | 4 +- avi/resource_avi_useraccountprofile.go | 3 +- avi/resource_avi_vcenterserver.go | 3 +- avi/resource_avi_virtualservice.go | 3 +- avi/resource_avi_vrfcontext.go | 3 +- avi/resource_avi_vsdatascriptset.go | 3 +- avi/resource_avi_vsgs.go | 3 +- avi/resource_avi_vsvip.go | 3 +- ...rce_avi_wafapplicationsignatureprovider.go | 3 +- avi/resource_avi_wafcrs.go | 3 +- avi/resource_avi_wafpolicy.go | 3 +- avi/resource_avi_wafpolicypsmgroup.go | 3 +- avi/resource_avi_wafprofile.go | 3 +- avi/resource_avi_webapput.go | 3 +- avi/resource_avi_webhook.go | 3 +- avi/utils.go | 53 +++++++++++++------ go.mod | 2 +- go.sum | 2 + .../d/avi_alertscriptconfig.html.markdown | 1 + .../d/avi_controllerproperties.html.markdown | 2 + .../r/avi_alertscriptconfig.html.markdown | 1 + .../r/avi_controllerproperties.html.markdown | 2 + 138 files changed, 289 insertions(+), 306 deletions(-) diff --git a/avi/data_source_avi_applicationprofile_test.go b/avi/data_source_avi_applicationprofile_test.go index afc35b981..951e0096d 100644 --- a/avi/data_source_avi_applicationprofile_test.go +++ b/avi/data_source_avi_applicationprofile_test.go @@ -106,6 +106,9 @@ resource "avi_applicationprofile" "testApplicationProfile" { use_app_keepalive_timeout = false } preserve_client_port = false + l4_ssl_profile { + ssl_stream_idle_timeout = "3600" + } } data "avi_applicationprofile" "testApplicationProfile" { diff --git a/avi/data_source_avi_customipamdnsprofile_test.go b/avi/data_source_avi_customipamdnsprofile_test.go index ecd7cd3f1..a5e398f01 100644 --- a/avi/data_source_avi_customipamdnsprofile_test.go +++ b/avi/data_source_avi_customipamdnsprofile_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceCustomIpamDnsProfileBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSCustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_dnspolicy_test.go b/avi/data_source_avi_dnspolicy_test.go index 1d4800d58..ab54f500f 100644 --- a/avi/data_source_avi_dnspolicy_test.go +++ b/avi/data_source_avi_dnspolicy_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceDnsPolicyBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipaddrgroup_test.go b/avi/data_source_avi_ipaddrgroup_test.go index c3e1901c1..d33d34b98 100644 --- a/avi/data_source_avi_ipaddrgroup_test.go +++ b/avi/data_source_avi_ipaddrgroup_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceIpAddrGroupBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipamdnsproviderprofile_test.go b/avi/data_source_avi_ipamdnsproviderprofile_test.go index c46e3b5f9..342402295 100644 --- a/avi/data_source_avi_ipamdnsproviderprofile_test.go +++ b/avi/data_source_avi_ipamdnsproviderprofile_test.go @@ -28,7 +28,7 @@ func TestAVIDataSourceIpamDnsProviderProfileBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_user_test.go b/avi/data_source_avi_user_test.go index a5c13c3fa..a87fa3146 100644 --- a/avi/data_source_avi_user_test.go +++ b/avi/data_source_avi_user_test.go @@ -42,7 +42,7 @@ data "avi_useraccountprofile" "default-user-account-profile" { } resource "avi_user" "testUser" { access { - role_ref = data.avi_role.default-system-admin-role.id + role_ref = "${data.avi_tenant.default_tenant.id}/role/${element(split("/", data.avi_role.default-system-admin-role.id),5)}" tenant_ref = data.avi_tenant.default_tenant.id all_tenants = false } diff --git a/avi/datasource_avi_alertscriptconfig.go b/avi/datasource_avi_alertscriptconfig.go index 8465c5960..7c290b62a 100644 --- a/avi/datasource_avi_alertscriptconfig.go +++ b/avi/datasource_avi_alertscriptconfig.go @@ -28,6 +28,10 @@ func dataSourceAviAlertScriptConfig() *schema.Resource { Optional: true, Computed: true, }, + "timeout": { + Type: schema.TypeString, + Computed: true, + }, "uuid": { Type: schema.TypeString, Optional: true, diff --git a/avi/datasource_avi_controllerproperties.go b/avi/datasource_avi_controllerproperties.go index 603d86152..ea3422503 100644 --- a/avi/datasource_avi_controllerproperties.go +++ b/avi/datasource_avi_controllerproperties.go @@ -69,10 +69,18 @@ func dataSourceAviControllerProperties() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "cloud_discovery_interval": { + Type: schema.TypeString, + Computed: true, + }, "cloud_reconcile": { Type: schema.TypeString, Computed: true, }, + "cloud_reconcile_interval": { + Type: schema.TypeString, + Computed: true, + }, "cluster_ip_gratuitous_arp_period": { Type: schema.TypeString, Computed: true, diff --git a/avi/datasource_avi_customipamdnsprofile.go b/avi/datasource_avi_customipamdnsprofile.go index d175a6834..ed7cbd662 100644 --- a/avi/datasource_avi_customipamdnsprofile.go +++ b/avi/datasource_avi_customipamdnsprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviCustomIpamDnsProfileRead, diff --git a/avi/datasource_avi_dnspolicy.go b/avi/datasource_avi_dnspolicy.go index 8c59317fa..4783b701d 100644 --- a/avi/datasource_avi_dnspolicy.go +++ b/avi/datasource_avi_dnspolicy.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Read: ResourceAviDnsPolicyRead, diff --git a/avi/datasource_avi_dynamicdnsrecord.go b/avi/datasource_avi_dynamicdnsrecord.go index 22c828a69..153828d78 100644 --- a/avi/datasource_avi_dynamicdnsrecord.go +++ b/avi/datasource_avi_dynamicdnsrecord.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Read: ResourceAviDynamicDnsRecordRead, diff --git a/avi/datasource_avi_ipaddrgroup.go b/avi/datasource_avi_ipaddrgroup.go index 523a0f4a7..8eace16a2 100644 --- a/avi/datasource_avi_ipaddrgroup.go +++ b/avi/datasource_avi_ipaddrgroup.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpAddrGroupRead, diff --git a/avi/datasource_avi_ipamdnsproviderprofile.go b/avi/datasource_avi_ipamdnsproviderprofile.go index e6e92da91..de9274f1a 100644 --- a/avi/datasource_avi_ipamdnsproviderprofile.go +++ b/avi/datasource_avi_ipamdnsproviderprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpamDnsProviderProfileRead, diff --git a/avi/resource_avi_actiongroupconfig.go b/avi/resource_avi_actiongroupconfig.go index 3498e7a7d..f82140035 100644 --- a/avi/resource_avi_actiongroupconfig.go +++ b/avi/resource_avi_actiongroupconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceActionGroupConfigSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_albservicesconfig.go b/avi/resource_avi_albservicesconfig.go index 4a5717071..ec4342d94 100644 --- a/avi/resource_avi_albservicesconfig.go +++ b/avi/resource_avi_albservicesconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceALBServicesConfigSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_albservicesfileupload.go b/avi/resource_avi_albservicesfileupload.go index 093bdb5fe..89c193d1c 100644 --- a/avi/resource_avi_albservicesfileupload.go +++ b/avi/resource_avi_albservicesfileupload.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceALBServicesFileUploadSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_albservicesjob.go b/avi/resource_avi_albservicesjob.go index eda4e8d0c..7374f6007 100644 --- a/avi/resource_avi_albservicesjob.go +++ b/avi/resource_avi_albservicesjob.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceALBServicesJobSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_alertconfig.go b/avi/resource_avi_alertconfig.go index c50b2682c..6c5aa21ee 100644 --- a/avi/resource_avi_alertconfig.go +++ b/avi/resource_avi_alertconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAlertConfigSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_alertemailconfig.go b/avi/resource_avi_alertemailconfig.go index e3b591a05..5abfa703e 100644 --- a/avi/resource_avi_alertemailconfig.go +++ b/avi/resource_avi_alertemailconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAlertEmailConfigSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_alertscriptconfig.go b/avi/resource_avi_alertscriptconfig.go index e992c39d6..a17945890 100644 --- a/avi/resource_avi_alertscriptconfig.go +++ b/avi/resource_avi_alertscriptconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAlertScriptConfigSchema() map[string]*schema.Schema { @@ -31,6 +30,12 @@ func ResourceAlertScriptConfigSchema() map[string]*schema.Schema { Optional: true, Computed: true, }, + "timeout": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateInteger, + }, "uuid": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_alertsyslogconfig.go b/avi/resource_avi_alertsyslogconfig.go index 9b66077f7..12403693f 100644 --- a/avi/resource_avi_alertsyslogconfig.go +++ b/avi/resource_avi_alertsyslogconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAlertSyslogConfigSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_analyticsprofile.go b/avi/resource_avi_analyticsprofile.go index 53f8f3845..d95bfa812 100644 --- a/avi/resource_avi_analyticsprofile.go +++ b/avi/resource_avi_analyticsprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAnalyticsProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_applicationpersistenceprofile.go b/avi/resource_avi_applicationpersistenceprofile.go index fda38c76b..a1a9c8ae2 100644 --- a/avi/resource_avi_applicationpersistenceprofile.go +++ b/avi/resource_avi_applicationpersistenceprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceApplicationPersistenceProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_applicationprofile.go b/avi/resource_avi_applicationprofile.go index a4c83321a..4b1e289a5 100644 --- a/avi/resource_avi_applicationprofile.go +++ b/avi/resource_avi_applicationprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceApplicationProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_applicationprofile_test.go b/avi/resource_avi_applicationprofile_test.go index 1afdd7f41..e4f68368c 100644 --- a/avi/resource_avi_applicationprofile_test.go +++ b/avi/resource_avi_applicationprofile_test.go @@ -174,6 +174,9 @@ resource "avi_applicationprofile" "testApplicationProfile" { use_app_keepalive_timeout = false } preserve_client_port = false + l4_ssl_profile { + ssl_stream_idle_timeout = "3600" + } } ` @@ -253,5 +256,8 @@ resource "avi_applicationprofile" "testApplicationProfile" { use_app_keepalive_timeout = false } preserve_client_port = false + l4_ssl_profile { + ssl_stream_idle_timeout = "3600" + } } ` diff --git a/avi/resource_avi_authmappingprofile.go b/avi/resource_avi_authmappingprofile.go index 62fb565b5..c1bd3162f 100644 --- a/avi/resource_avi_authmappingprofile.go +++ b/avi/resource_avi_authmappingprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAuthMappingProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_authprofile.go b/avi/resource_avi_authprofile.go index db6aa8e94..46d92e2ad 100644 --- a/avi/resource_avi_authprofile.go +++ b/avi/resource_avi_authprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAuthProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_autoscalelaunchconfig.go b/avi/resource_avi_autoscalelaunchconfig.go index b9534a935..175ce5198 100644 --- a/avi/resource_avi_autoscalelaunchconfig.go +++ b/avi/resource_avi_autoscalelaunchconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAutoScaleLaunchConfigSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_availabilityzone.go b/avi/resource_avi_availabilityzone.go index ff730ae4f..9cd2c4409 100644 --- a/avi/resource_avi_availabilityzone.go +++ b/avi/resource_avi_availabilityzone.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceAvailabilityZoneSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_backup.go b/avi/resource_avi_backup.go index 3caa41ad2..d93575f4e 100644 --- a/avi/resource_avi_backup.go +++ b/avi/resource_avi_backup.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceBackupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_backupconfiguration.go b/avi/resource_avi_backupconfiguration.go index a58b6d887..6d563f640 100644 --- a/avi/resource_avi_backupconfiguration.go +++ b/avi/resource_avi_backupconfiguration.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceBackupConfigurationSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_botconfigconsolidator.go b/avi/resource_avi_botconfigconsolidator.go index 24bf96d17..9b82d9c97 100644 --- a/avi/resource_avi_botconfigconsolidator.go +++ b/avi/resource_avi_botconfigconsolidator.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceBotConfigConsolidatorSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_botdetectionpolicy.go b/avi/resource_avi_botdetectionpolicy.go index 67a9ed5b8..2c6e13149 100644 --- a/avi/resource_avi_botdetectionpolicy.go +++ b/avi/resource_avi_botdetectionpolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceBotDetectionPolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_botipreputationtypemapping.go b/avi/resource_avi_botipreputationtypemapping.go index f6871909b..8e90f11f1 100644 --- a/avi/resource_avi_botipreputationtypemapping.go +++ b/avi/resource_avi_botipreputationtypemapping.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceBotIPReputationTypeMappingSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_botmapping.go b/avi/resource_avi_botmapping.go index 51c4a21fc..88c9ace45 100644 --- a/avi/resource_avi_botmapping.go +++ b/avi/resource_avi_botmapping.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceBotMappingSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_certificatemanagementprofile.go b/avi/resource_avi_certificatemanagementprofile.go index f20d558de..4b72597d6 100644 --- a/avi/resource_avi_certificatemanagementprofile.go +++ b/avi/resource_avi_certificatemanagementprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceCertificateManagementProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_cloud.go b/avi/resource_avi_cloud.go index 32adfd83f..0687ffe46 100644 --- a/avi/resource_avi_cloud.go +++ b/avi/resource_avi_cloud.go @@ -6,14 +6,13 @@ package avi import ( "encoding/json" "errors" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vmware/alb-sdk/go/clients" + "github.com/vmware/alb-sdk/go/models" "log" "os" "strconv" "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/vmware/alb-sdk/go/clients" - "github.com/vmware/alb-sdk/go/models" ) func ResourceCloudSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_cloudconnectoruser.go b/avi/resource_avi_cloudconnectoruser.go index 32c02865e..598af8720 100644 --- a/avi/resource_avi_cloudconnectoruser.go +++ b/avi/resource_avi_cloudconnectoruser.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceCloudConnectorUserSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_cloudproperties.go b/avi/resource_avi_cloudproperties.go index 3c3a07545..5dbfe5741 100644 --- a/avi/resource_avi_cloudproperties.go +++ b/avi/resource_avi_cloudproperties.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceCloudPropertiesSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_cluster.go b/avi/resource_avi_cluster.go index 72e6ead38..24394679c 100644 --- a/avi/resource_avi_cluster.go +++ b/avi/resource_avi_cluster.go @@ -4,11 +4,10 @@ package avi import ( - "log" - "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/vmware/alb-sdk/go/clients" + "log" + "time" ) func ResourceClusterSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_clusterclouddetails.go b/avi/resource_avi_clusterclouddetails.go index afb0d6515..d4f87cbfe 100644 --- a/avi/resource_avi_clusterclouddetails.go +++ b/avi/resource_avi_clusterclouddetails.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceClusterCloudDetailsSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_controllerportalregistration.go b/avi/resource_avi_controllerportalregistration.go index b1c314a0c..97654ae45 100644 --- a/avi/resource_avi_controllerportalregistration.go +++ b/avi/resource_avi_controllerportalregistration.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceControllerPortalRegistrationSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_controllerproperties.go b/avi/resource_avi_controllerproperties.go index 46cb6c994..6ae365f50 100644 --- a/avi/resource_avi_controllerproperties.go +++ b/avi/resource_avi_controllerproperties.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceControllerPropertiesSchema() map[string]*schema.Schema { @@ -101,12 +100,24 @@ func ResourceControllerPropertiesSchema() map[string]*schema.Schema { Default: "60", ValidateFunc: validateInteger, }, + "cloud_discovery_interval": { + Type: schema.TypeString, + Optional: true, + Default: "5", + ValidateFunc: validateInteger, + }, "cloud_reconcile": { Type: schema.TypeString, Optional: true, Default: "true", ValidateFunc: validateBool, }, + "cloud_reconcile_interval": { + Type: schema.TypeString, + Optional: true, + Default: "5", + ValidateFunc: validateInteger, + }, "cluster_ip_gratuitous_arp_period": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_controllersite.go b/avi/resource_avi_controllersite.go index 234d5ad93..0769ab442 100644 --- a/avi/resource_avi_controllersite.go +++ b/avi/resource_avi_controllersite.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceControllerSiteSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_customipamdnsprofile.go b/avi/resource_avi_customipamdnsprofile.go index 4984a65f6..9d56c3315 100644 --- a/avi/resource_avi_customipamdnsprofile.go +++ b/avi/resource_avi_customipamdnsprofile.go @@ -4,12 +4,11 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) -// nolint +//nolint func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -44,7 +43,7 @@ func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviCustomIpamDnsProfileCreate, @@ -58,13 +57,13 @@ func resourceAviCustomIpamDnsProfile() *schema.Resource { } } -// nolint +//nolint func ResourceCustomIpamDnsProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceCustomIpamDnsProfileSchema() return ResourceImporter(d, m, "customipamdnsprofile", s) } -// nolint +//nolint func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APIRead(d, meta, "customipamdnsprofile", s) @@ -74,7 +73,7 @@ func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{ return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APICreateOrUpdate(d, meta, "customipamdnsprofile", s) @@ -84,7 +83,7 @@ func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() var err error @@ -95,7 +94,7 @@ func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_customipamdnsprofile_test.go b/avi/resource_avi_customipamdnsprofile_test.go index 3c1acb491..409a14fff 100644 --- a/avi/resource_avi_customipamdnsprofile_test.go +++ b/avi/resource_avi_customipamdnsprofile_test.go @@ -43,7 +43,7 @@ func TestAVICustomIpamDnsProfileBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.Tes } -// nolint +//nolint func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVICustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_customipamdnsprofile" "testCustomIpamDnsProfile" { } ` -// nolint +//nolint const testAccAVICustomIpamDnsProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dnspolicy.go b/avi/resource_avi_dnspolicy.go index 01b19c304..7d1a58152 100644 --- a/avi/resource_avi_dnspolicy.go +++ b/avi/resource_avi_dnspolicy.go @@ -4,12 +4,11 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) -// nolint +//nolint func ResourceDnsPolicySchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -61,7 +60,7 @@ func ResourceDnsPolicySchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Create: resourceAviDnsPolicyCreate, @@ -75,13 +74,13 @@ func resourceAviDnsPolicy() *schema.Resource { } } -// nolint +//nolint func ResourceDnsPolicyImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDnsPolicySchema() return ResourceImporter(d, m, "dnspolicy", s) } -// nolint +//nolint func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APIRead(d, meta, "dnspolicy", s) @@ -91,7 +90,7 @@ func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { return err } -// nolint +//nolint func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APICreateOrUpdate(d, meta, "dnspolicy", s) @@ -101,7 +100,7 @@ func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() var err error @@ -112,7 +111,7 @@ func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviDnsPolicyDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_dnspolicy_test.go b/avi/resource_avi_dnspolicy_test.go index d070de8de..ca7694dd8 100644 --- a/avi/resource_avi_dnspolicy_test.go +++ b/avi/resource_avi_dnspolicy_test.go @@ -43,7 +43,7 @@ func TestAVIDnsPolicyBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc } -// nolint +//nolint func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_dnspolicy" "testDnsPolicy" { } ` -// nolint +//nolint const testAccAVIDnsPolicyupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dynamicdnsrecord.go b/avi/resource_avi_dynamicdnsrecord.go index 76a35dd40..306ec328e 100644 --- a/avi/resource_avi_dynamicdnsrecord.go +++ b/avi/resource_avi_dynamicdnsrecord.go @@ -4,12 +4,11 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) -// nolint +//nolint func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "algorithm": { @@ -120,7 +119,7 @@ func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Create: resourceAviDynamicDnsRecordCreate, @@ -134,13 +133,13 @@ func resourceAviDynamicDnsRecord() *schema.Resource { } } -// nolint +//nolint func ResourceDynamicDnsRecordImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDynamicDnsRecordSchema() return ResourceImporter(d, m, "dynamicdnsrecord", s) } -// nolint +//nolint func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APIRead(d, meta, "dynamicdnsrecord", s) @@ -150,7 +149,7 @@ func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) e return err } -// nolint +//nolint func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APICreateOrUpdate(d, meta, "dynamicdnsrecord", s) @@ -160,7 +159,7 @@ func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) return err } -// nolint +//nolint func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() var err error @@ -171,7 +170,7 @@ func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) return err } -// nolint +//nolint func resourceAviDynamicDnsRecordDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_errorpagebody.go b/avi/resource_avi_errorpagebody.go index 01103841e..414146083 100644 --- a/avi/resource_avi_errorpagebody.go +++ b/avi/resource_avi_errorpagebody.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceErrorPageBodySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_errorpageprofile.go b/avi/resource_avi_errorpageprofile.go index dd4029dd7..6f1a09d9e 100644 --- a/avi/resource_avi_errorpageprofile.go +++ b/avi/resource_avi_errorpageprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceErrorPageProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_federationcheckpoint.go b/avi/resource_avi_federationcheckpoint.go index 348e34071..242388fff 100644 --- a/avi/resource_avi_federationcheckpoint.go +++ b/avi/resource_avi_federationcheckpoint.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceFederationCheckpointSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_fileobject.go b/avi/resource_avi_fileobject.go index de2073c84..8bbeac098 100644 --- a/avi/resource_avi_fileobject.go +++ b/avi/resource_avi_fileobject.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceFileObjectSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_geodb.go b/avi/resource_avi_geodb.go index 6fc1586d1..7e0c25276 100644 --- a/avi/resource_avi_geodb.go +++ b/avi/resource_avi_geodb.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceGeoDBSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_gslb.go b/avi/resource_avi_gslb.go index 01f4d90f9..e9dcc4436 100644 --- a/avi/resource_avi_gslb.go +++ b/avi/resource_avi_gslb.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceGslbSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_gslbgeodbprofile.go b/avi/resource_avi_gslbgeodbprofile.go index d5e3ff2e5..cc8f70a24 100644 --- a/avi/resource_avi_gslbgeodbprofile.go +++ b/avi/resource_avi_gslbgeodbprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceGslbGeoDbProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_gslbservice.go b/avi/resource_avi_gslbservice.go index bab479ff7..d72cb5a44 100644 --- a/avi/resource_avi_gslbservice.go +++ b/avi/resource_avi_gslbservice.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceGslbServiceSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_hardwaresecuritymodulegroup.go b/avi/resource_avi_hardwaresecuritymodulegroup.go index 7acacdfd4..20c7c63b7 100644 --- a/avi/resource_avi_hardwaresecuritymodulegroup.go +++ b/avi/resource_avi_hardwaresecuritymodulegroup.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceHardwareSecurityModuleGroupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_healthmonitor.go b/avi/resource_avi_healthmonitor.go index 220974049..a5e8b50f3 100644 --- a/avi/resource_avi_healthmonitor.go +++ b/avi/resource_avi_healthmonitor.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceHealthMonitorSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_httppolicyset.go b/avi/resource_avi_httppolicyset.go index f53521e52..d5151c2f3 100644 --- a/avi/resource_avi_httppolicyset.go +++ b/avi/resource_avi_httppolicyset.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceHTTPPolicySetSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_icapprofile.go b/avi/resource_avi_icapprofile.go index 72e3a1110..934246798 100644 --- a/avi/resource_avi_icapprofile.go +++ b/avi/resource_avi_icapprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceIcapProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_image.go b/avi/resource_avi_image.go index 3abdd062a..be4aa2f22 100644 --- a/avi/resource_avi_image.go +++ b/avi/resource_avi_image.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceImageSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_inventoryfaultconfig.go b/avi/resource_avi_inventoryfaultconfig.go index 028e0122a..be7cb52b6 100644 --- a/avi/resource_avi_inventoryfaultconfig.go +++ b/avi/resource_avi_inventoryfaultconfig.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceInventoryFaultConfigSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_ipaddrgroup.go b/avi/resource_avi_ipaddrgroup.go index 96b976d83..f5429ca75 100644 --- a/avi/resource_avi_ipaddrgroup.go +++ b/avi/resource_avi_ipaddrgroup.go @@ -4,12 +4,11 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) -// nolint +//nolint func ResourceIpAddrGroupSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "addrs": { @@ -81,7 +80,7 @@ func ResourceIpAddrGroupSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Create: resourceAviIpAddrGroupCreate, @@ -95,13 +94,13 @@ func resourceAviIpAddrGroup() *schema.Resource { } } -// nolint +//nolint func ResourceIpAddrGroupImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpAddrGroupSchema() return ResourceImporter(d, m, "ipaddrgroup", s) } -// nolint +//nolint func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APIRead(d, meta, "ipaddrgroup", s) @@ -111,7 +110,7 @@ func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APICreateOrUpdate(d, meta, "ipaddrgroup", s) @@ -121,7 +120,7 @@ func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) erro return err } -// nolint +//nolint func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() var err error @@ -132,7 +131,7 @@ func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) erro return err } -// nolint +//nolint func resourceAviIpAddrGroupDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup_test.go b/avi/resource_avi_ipaddrgroup_test.go index 3609b932d..0d7d99c0e 100644 --- a/avi/resource_avi_ipaddrgroup_test.go +++ b/avi/resource_avi_ipaddrgroup_test.go @@ -43,7 +43,7 @@ func TestAVIIpAddrGroupBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFun } -// nolint +//nolint func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -124,7 +124,7 @@ prefixes { } ` -// nolint +//nolint const testAccAVIIpAddrGroupupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_ipamdnsproviderprofile.go b/avi/resource_avi_ipamdnsproviderprofile.go index 8ea11ab56..ee85e487d 100644 --- a/avi/resource_avi_ipamdnsproviderprofile.go +++ b/avi/resource_avi_ipamdnsproviderprofile.go @@ -4,12 +4,11 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) -// nolint +//nolint func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "allocate_ip_in_vrf": { @@ -110,7 +109,7 @@ func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviIpamDnsProviderProfileCreate, @@ -124,13 +123,13 @@ func resourceAviIpamDnsProviderProfile() *schema.Resource { } } -// nolint +//nolint func ResourceIpamDnsProviderProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpamDnsProviderProfileSchema() return ResourceImporter(d, m, "ipamdnsproviderprofile", s) } -// nolint +//nolint func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APIRead(d, meta, "ipamdnsproviderprofile", s) @@ -140,7 +139,7 @@ func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APICreateOrUpdate(d, meta, "ipamdnsproviderprofile", s) @@ -150,7 +149,7 @@ func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interf return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() var err error @@ -161,7 +160,7 @@ func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interf return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipamdnsproviderprofile_test.go b/avi/resource_avi_ipamdnsproviderprofile_test.go index b4230a33e..6008064a5 100644 --- a/avi/resource_avi_ipamdnsproviderprofile_test.go +++ b/avi/resource_avi_ipamdnsproviderprofile_test.go @@ -47,7 +47,7 @@ func TestAVIIpamDnsProviderProfileBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -71,7 +71,7 @@ func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.T } -// nolint +//nolint func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -96,7 +96,7 @@ func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -112,7 +112,7 @@ resource "avi_ipamdnsproviderprofile" "testIpamDnsProviderProfile" { } ` -// nolint +//nolint const testAccAVIIpamDnsProviderProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_ipreputationdb.go b/avi/resource_avi_ipreputationdb.go index d48f05cc3..fa370a3c5 100644 --- a/avi/resource_avi_ipreputationdb.go +++ b/avi/resource_avi_ipreputationdb.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceIPReputationDBSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_jwtserverprofile.go b/avi/resource_avi_jwtserverprofile.go index 2421f89d0..834953aaf 100644 --- a/avi/resource_avi_jwtserverprofile.go +++ b/avi/resource_avi_jwtserverprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceJWTServerProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_l4policyset.go b/avi/resource_avi_l4policyset.go index 7ee5c2877..d4eba7352 100644 --- a/avi/resource_avi_l4policyset.go +++ b/avi/resource_avi_l4policyset.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceL4PolicySetSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_labelgroup.go b/avi/resource_avi_labelgroup.go index de7c9f164..b7aec83ca 100644 --- a/avi/resource_avi_labelgroup.go +++ b/avi/resource_avi_labelgroup.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceLabelGroupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_licenseledgerdetails.go b/avi/resource_avi_licenseledgerdetails.go index 766c0571e..f7ad1fdcb 100644 --- a/avi/resource_avi_licenseledgerdetails.go +++ b/avi/resource_avi_licenseledgerdetails.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceLicenseLedgerDetailsSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_licensestatus.go b/avi/resource_avi_licensestatus.go index ce0370b54..2cf8b9287 100644 --- a/avi/resource_avi_licensestatus.go +++ b/avi/resource_avi_licensestatus.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceLicenseStatusSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_memorybalancerrequest.go b/avi/resource_avi_memorybalancerrequest.go index 99833cbd4..38af403d9 100644 --- a/avi/resource_avi_memorybalancerrequest.go +++ b/avi/resource_avi_memorybalancerrequest.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceMemoryBalancerRequestSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_microservicegroup.go b/avi/resource_avi_microservicegroup.go index 2450ef6db..f3b14e56c 100644 --- a/avi/resource_avi_microservicegroup.go +++ b/avi/resource_avi_microservicegroup.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceMicroServiceGroupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_natpolicy.go b/avi/resource_avi_natpolicy.go index 4e4b2ae95..7b5154f29 100644 --- a/avi/resource_avi_natpolicy.go +++ b/avi/resource_avi_natpolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceNatPolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_network.go b/avi/resource_avi_network.go index b4b109146..bc3e9c6ee 100644 --- a/avi/resource_avi_network.go +++ b/avi/resource_avi_network.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceNetworkSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_networkprofile.go b/avi/resource_avi_networkprofile.go index 0b99fef04..31628e468 100644 --- a/avi/resource_avi_networkprofile.go +++ b/avi/resource_avi_networkprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceNetworkProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_networksecuritypolicy.go b/avi/resource_avi_networksecuritypolicy.go index 148461f7e..1b3d091d8 100644 --- a/avi/resource_avi_networksecuritypolicy.go +++ b/avi/resource_avi_networksecuritypolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceNetworkSecurityPolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_networkservice.go b/avi/resource_avi_networkservice.go index 40c8030cf..b7e18fe36 100644 --- a/avi/resource_avi_networkservice.go +++ b/avi/resource_avi_networkservice.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceNetworkServiceSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_nsxtsegmentruntime.go b/avi/resource_avi_nsxtsegmentruntime.go index e0ce9ce70..a1da6f941 100644 --- a/avi/resource_avi_nsxtsegmentruntime.go +++ b/avi/resource_avi_nsxtsegmentruntime.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceNsxtSegmentRuntimeSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_pingaccessagent.go b/avi/resource_avi_pingaccessagent.go index ce87283f4..4db646fe0 100644 --- a/avi/resource_avi_pingaccessagent.go +++ b/avi/resource_avi_pingaccessagent.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourcePingAccessAgentSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_pkiprofile.go b/avi/resource_avi_pkiprofile.go index 5d38f377b..3e404eb61 100644 --- a/avi/resource_avi_pkiprofile.go +++ b/avi/resource_avi_pkiprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourcePKIProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_pool.go b/avi/resource_avi_pool.go index 60e2cdf60..ab3026fac 100644 --- a/avi/resource_avi_pool.go +++ b/avi/resource_avi_pool.go @@ -5,9 +5,8 @@ package avi import ( "errors" - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourcePoolSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_poolgroup.go b/avi/resource_avi_poolgroup.go index 8046c25ca..51d63e855 100644 --- a/avi/resource_avi_poolgroup.go +++ b/avi/resource_avi_poolgroup.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourcePoolGroupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_poolgroupdeploymentpolicy.go b/avi/resource_avi_poolgroupdeploymentpolicy.go index ba6b11b67..412e1d3e9 100644 --- a/avi/resource_avi_poolgroupdeploymentpolicy.go +++ b/avi/resource_avi_poolgroupdeploymentpolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourcePoolGroupDeploymentPolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_prioritylabels.go b/avi/resource_avi_prioritylabels.go index 94d224e86..f2519f9bc 100644 --- a/avi/resource_avi_prioritylabels.go +++ b/avi/resource_avi_prioritylabels.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourcePriorityLabelsSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_protocolparser.go b/avi/resource_avi_protocolparser.go index a0116c50e..9c131bcb8 100644 --- a/avi/resource_avi_protocolparser.go +++ b/avi/resource_avi_protocolparser.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceProtocolParserSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_rest_dependants.go b/avi/resource_avi_rest_dependants.go index 766354258..7e3c69f07 100644 --- a/avi/resource_avi_rest_dependants.go +++ b/avi/resource_avi_rest_dependants.go @@ -10097,6 +10097,12 @@ func ResourceDnsServiceApplicationProfileSchema() *schema.Resource { Optional: true, Default: "hostmaster", }, + "client_dns_tcp_request_timeout": { + Type: schema.TypeString, + Optional: true, + Default: "10000", + ValidateFunc: validateInteger, + }, "close_tcp_connection_post_response": { Type: schema.TypeString, Optional: true, @@ -26532,6 +26538,16 @@ func ResourceRoutingServiceSchema() *schema.Resource { Optional: true, Elem: ResourceIpAddrSchema(), }, + "floating_intf_ip6_addresses": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceIpAddrSchema(), + }, + "floating_intf_ip6_se_2_addresses": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceIpAddrSchema(), + }, "floating_intf_ip_se_2": { Type: schema.TypeList, Optional: true, @@ -32581,12 +32597,22 @@ func ResourceStreamingSyslogConfigSchema() *schema.Resource { Optional: true, Default: "AviVantage", }, + "msg_id": { + Type: schema.TypeString, + Optional: true, + Default: "NILVALUE", + }, "non_significant_log_severity": { Type: schema.TypeString, Optional: true, Default: "6", ValidateFunc: validateInteger, }, + "proc_id": { + Type: schema.TypeString, + Optional: true, + Default: "NILVALUE", + }, "significant_log_severity": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_rmcloudopsproto.go b/avi/resource_avi_rmcloudopsproto.go index f6183c014..96c965f02 100644 --- a/avi/resource_avi_rmcloudopsproto.go +++ b/avi/resource_avi_rmcloudopsproto.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceRmCloudOpsProtoSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_role.go b/avi/resource_avi_role.go index da53cc45d..1940c3502 100644 --- a/avi/resource_avi_role.go +++ b/avi/resource_avi_role.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceRoleSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_scheduler.go b/avi/resource_avi_scheduler.go index 51c205964..38f70ef2c 100644 --- a/avi/resource_avi_scheduler.go +++ b/avi/resource_avi_scheduler.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSchedulerSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_securitymanagerdata.go b/avi/resource_avi_securitymanagerdata.go index 38bb05c42..889ac9a29 100644 --- a/avi/resource_avi_securitymanagerdata.go +++ b/avi/resource_avi_securitymanagerdata.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSecurityManagerDataSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_securitypolicy.go b/avi/resource_avi_securitypolicy.go index ea11d845e..0fc63f677 100644 --- a/avi/resource_avi_securitypolicy.go +++ b/avi/resource_avi_securitypolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSecurityPolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_seproperties.go b/avi/resource_avi_seproperties.go index d571ff688..48ebaf3a5 100644 --- a/avi/resource_avi_seproperties.go +++ b/avi/resource_avi_seproperties.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSePropertiesSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_serverautoscalepolicy.go b/avi/resource_avi_serverautoscalepolicy.go index 1f812202e..defc6a461 100644 --- a/avi/resource_avi_serverautoscalepolicy.go +++ b/avi/resource_avi_serverautoscalepolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceServerAutoScalePolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_serviceengine.go b/avi/resource_avi_serviceengine.go index 06d742f5a..0a09d90f0 100644 --- a/avi/resource_avi_serviceengine.go +++ b/avi/resource_avi_serviceengine.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceServiceEngineSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_serviceenginegroup.go b/avi/resource_avi_serviceenginegroup.go index 918f905d0..feb99731c 100644 --- a/avi/resource_avi_serviceenginegroup.go +++ b/avi/resource_avi_serviceenginegroup.go @@ -4,12 +4,11 @@ package avi import ( + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vmware/alb-sdk/go/clients" "log" "strings" "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/vmware/alb-sdk/go/clients" ) func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_siteversion.go b/avi/resource_avi_siteversion.go index e31338e1a..ebac059cb 100644 --- a/avi/resource_avi_siteversion.go +++ b/avi/resource_avi_siteversion.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSiteVersionSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_snmptrapprofile.go b/avi/resource_avi_snmptrapprofile.go index 9a38935dc..d8c34a50b 100644 --- a/avi/resource_avi_snmptrapprofile.go +++ b/avi/resource_avi_snmptrapprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSnmpTrapProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_sslkeyandcertificate.go b/avi/resource_avi_sslkeyandcertificate.go index d412eec52..4e35c9473 100644 --- a/avi/resource_avi_sslkeyandcertificate.go +++ b/avi/resource_avi_sslkeyandcertificate.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSSLKeyAndCertificateSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_sslprofile.go b/avi/resource_avi_sslprofile.go index e9c4e2e06..755e155e8 100644 --- a/avi/resource_avi_sslprofile.go +++ b/avi/resource_avi_sslprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSSLProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_ssopolicy.go b/avi/resource_avi_ssopolicy.go index 5c8d1b577..dfb45752d 100644 --- a/avi/resource_avi_ssopolicy.go +++ b/avi/resource_avi_ssopolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSSOPolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_statediffoperation.go b/avi/resource_avi_statediffoperation.go index acbcc2ca1..c5e8fa041 100644 --- a/avi/resource_avi_statediffoperation.go +++ b/avi/resource_avi_statediffoperation.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceStatediffOperationSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_statediffsnapshot.go b/avi/resource_avi_statediffsnapshot.go index da08e3b1b..2fc303fdf 100644 --- a/avi/resource_avi_statediffsnapshot.go +++ b/avi/resource_avi_statediffsnapshot.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceStatediffSnapshotSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_stringgroup.go b/avi/resource_avi_stringgroup.go index ff0e5ee1d..6f674513e 100644 --- a/avi/resource_avi_stringgroup.go +++ b/avi/resource_avi_stringgroup.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceStringGroupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_systemconfiguration.go b/avi/resource_avi_systemconfiguration.go index de1af8dc3..2747ba485 100644 --- a/avi/resource_avi_systemconfiguration.go +++ b/avi/resource_avi_systemconfiguration.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSystemConfigurationSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_systemlimits.go b/avi/resource_avi_systemlimits.go index 2aea2c1d6..b8c96bdc9 100644 --- a/avi/resource_avi_systemlimits.go +++ b/avi/resource_avi_systemlimits.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceSystemLimitsSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_tenant.go b/avi/resource_avi_tenant.go index 1c38314b1..3084fd5be 100644 --- a/avi/resource_avi_tenant.go +++ b/avi/resource_avi_tenant.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceTenantSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_testsedatastorelevel1.go b/avi/resource_avi_testsedatastorelevel1.go index 804d5d459..d720cc68d 100644 --- a/avi/resource_avi_testsedatastorelevel1.go +++ b/avi/resource_avi_testsedatastorelevel1.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceTestSeDatastoreLevel1Schema() map[string]*schema.Schema { diff --git a/avi/resource_avi_testsedatastorelevel2.go b/avi/resource_avi_testsedatastorelevel2.go index 3f9dffedb..d17067fd4 100644 --- a/avi/resource_avi_testsedatastorelevel2.go +++ b/avi/resource_avi_testsedatastorelevel2.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceTestSeDatastoreLevel2Schema() map[string]*schema.Schema { diff --git a/avi/resource_avi_testsedatastorelevel3.go b/avi/resource_avi_testsedatastorelevel3.go index dcbb9eabd..7a4127d1e 100644 --- a/avi/resource_avi_testsedatastorelevel3.go +++ b/avi/resource_avi_testsedatastorelevel3.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceTestSeDatastoreLevel3Schema() map[string]*schema.Schema { diff --git a/avi/resource_avi_trafficcloneprofile.go b/avi/resource_avi_trafficcloneprofile.go index 72e12bb2a..718fa7e40 100644 --- a/avi/resource_avi_trafficcloneprofile.go +++ b/avi/resource_avi_trafficcloneprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceTrafficCloneProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_upgradestatusinfo.go b/avi/resource_avi_upgradestatusinfo.go index f18fd2945..cbd0e8320 100644 --- a/avi/resource_avi_upgradestatusinfo.go +++ b/avi/resource_avi_upgradestatusinfo.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceUpgradeStatusInfoSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_upgradestatussummary.go b/avi/resource_avi_upgradestatussummary.go index b4c446a73..a32eea8d8 100644 --- a/avi/resource_avi_upgradestatussummary.go +++ b/avi/resource_avi_upgradestatussummary.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceUpgradeStatusSummarySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_user.go b/avi/resource_avi_user.go index b7cd9eff0..79ad076ae 100644 --- a/avi/resource_avi_user.go +++ b/avi/resource_avi_user.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceUserSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_user_test.go b/avi/resource_avi_user_test.go index 655cb361e..098153fdc 100644 --- a/avi/resource_avi_user_test.go +++ b/avi/resource_avi_user_test.go @@ -110,7 +110,7 @@ data "avi_useraccountprofile" "default-user-account-profile" { } resource "avi_user" "testUser" { access { - role_ref = data.avi_role.default-system-admin-role.id + role_ref = "${data.avi_tenant.default_tenant.id}/role/${element(split("/", data.avi_role.default-system-admin-role.id),5)}" tenant_ref = data.avi_tenant.default_tenant.id all_tenants = false } @@ -138,7 +138,7 @@ data "avi_useraccountprofile" "default-user-account-profile" { } resource "avi_user" "testUser" { access { - role_ref = data.avi_role.default-system-admin-role.id + role_ref = "${data.avi_tenant.default_tenant.id}/role/${element(split("/", data.avi_role.default-system-admin-role.id),5)}" tenant_ref = data.avi_tenant.default_tenant.id all_tenants = false } diff --git a/avi/resource_avi_useraccountprofile.go b/avi/resource_avi_useraccountprofile.go index 2c04e6247..3b4cb2e64 100644 --- a/avi/resource_avi_useraccountprofile.go +++ b/avi/resource_avi_useraccountprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceUserAccountProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_vcenterserver.go b/avi/resource_avi_vcenterserver.go index f1aa0e938..8585d079f 100644 --- a/avi/resource_avi_vcenterserver.go +++ b/avi/resource_avi_vcenterserver.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceVCenterServerSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_virtualservice.go b/avi/resource_avi_virtualservice.go index 94f7337a9..ea3667696 100644 --- a/avi/resource_avi_virtualservice.go +++ b/avi/resource_avi_virtualservice.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceVirtualServiceSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_vrfcontext.go b/avi/resource_avi_vrfcontext.go index 794872454..69a188c9a 100644 --- a/avi/resource_avi_vrfcontext.go +++ b/avi/resource_avi_vrfcontext.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceVrfContextSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_vsdatascriptset.go b/avi/resource_avi_vsdatascriptset.go index b7f2d931b..c5194f049 100644 --- a/avi/resource_avi_vsdatascriptset.go +++ b/avi/resource_avi_vsdatascriptset.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceVSDataScriptSetSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_vsgs.go b/avi/resource_avi_vsgs.go index bfdabeeb6..24c4f5433 100644 --- a/avi/resource_avi_vsgs.go +++ b/avi/resource_avi_vsgs.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceVsGsSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_vsvip.go b/avi/resource_avi_vsvip.go index a98645944..803a3a55e 100644 --- a/avi/resource_avi_vsvip.go +++ b/avi/resource_avi_vsvip.go @@ -4,10 +4,9 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/vmware/alb-sdk/go/clients" + "log" ) func ResourceVsVipSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_wafapplicationsignatureprovider.go b/avi/resource_avi_wafapplicationsignatureprovider.go index fa8834965..aa7ba550f 100644 --- a/avi/resource_avi_wafapplicationsignatureprovider.go +++ b/avi/resource_avi_wafapplicationsignatureprovider.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceWafApplicationSignatureProviderSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_wafcrs.go b/avi/resource_avi_wafcrs.go index 360413920..a7dfba82d 100644 --- a/avi/resource_avi_wafcrs.go +++ b/avi/resource_avi_wafcrs.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceWafCRSSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_wafpolicy.go b/avi/resource_avi_wafpolicy.go index be94197a6..8a472a9b1 100644 --- a/avi/resource_avi_wafpolicy.go +++ b/avi/resource_avi_wafpolicy.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceWafPolicySchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_wafpolicypsmgroup.go b/avi/resource_avi_wafpolicypsmgroup.go index 9823d9327..3b866d498 100644 --- a/avi/resource_avi_wafpolicypsmgroup.go +++ b/avi/resource_avi_wafpolicypsmgroup.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceWafPolicyPSMGroupSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_wafprofile.go b/avi/resource_avi_wafprofile.go index 95bdbd3eb..294d93e07 100644 --- a/avi/resource_avi_wafprofile.go +++ b/avi/resource_avi_wafprofile.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceWafProfileSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_webapput.go b/avi/resource_avi_webapput.go index 0563686a2..e9ac43d2e 100644 --- a/avi/resource_avi_webapput.go +++ b/avi/resource_avi_webapput.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceWebappUTSchema() map[string]*schema.Schema { diff --git a/avi/resource_avi_webhook.go b/avi/resource_avi_webhook.go index f719bb9bd..6117a977a 100644 --- a/avi/resource_avi_webhook.go +++ b/avi/resource_avi_webhook.go @@ -4,9 +4,8 @@ package avi import ( - "log" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" ) func ResourceWebhookSchema() map[string]*schema.Schema { diff --git a/avi/utils.go b/avi/utils.go index 3895cdf77..7ed3c115f 100644 --- a/avi/utils.go +++ b/avi/utils.go @@ -307,7 +307,6 @@ func APICreateOrUpdate(d *schema.ResourceData, meta interface{}, objType string, log.Printf("[INFO] APICreateOrUpdate Tenant ref found %v", tenantName) } if specialobj { - path = path + "?skip_default=true" err = client.AviSession.Put(path, data, &robj) if err != nil { log.Printf("[ERROR] APICreateOrUpdate: PUT on %v Error %v path %v id %v\n", objType, err, path, @@ -316,7 +315,7 @@ func APICreateOrUpdate(d *schema.ResourceData, meta interface{}, objType string, SetIDFromObj(d, robj) } } else if uuid, ok := d.GetOk("uuid"); ok { - path = path + "/" + uuid.(string) + "?skip_default=true" + path = path + "/" + uuid.(string) if !usePatchForUpdate { err = client.AviSession.Put(path, data, &robj, session.SetOptTenant(tenantName)) } else { @@ -366,7 +365,7 @@ func APICreateOrUpdate(d *schema.ResourceData, meta interface{}, objType string, // found existing object. SetIDFromObj(d, existingObj) uuid = existingObj.(map[string]interface{})["uuid"].(string) - path = path + "/" + uuid.(string) + "?skip_default=true" + path = path + "/" + uuid.(string) if !usePatchForUpdate { err = client.AviSession.Put(path, data, &robj) } else { @@ -428,7 +427,7 @@ func APIRead(d *schema.ResourceData, meta interface{}, objType string, s map[str if specialobj { path = "api/" + objType } else { - path = "api/" + objType + "/" + uuid + "?skip_default=true" + path = "api/" + objType + "/" + uuid } log.Printf("[DEBUG] APIRead reading object with id %v path %v\n", uuid, path) err := client.AviSession.Get(path, &obj, session.SetOptTenant(tenantName)) @@ -470,15 +469,7 @@ func APIRead(d *schema.ResourceData, meta interface{}, objType string, s map[str log.Printf("[ERROR] APIRead not found %v\n", d.Get("uuid")) return nil } - if localData, err := SchemaToAviData(d, s); err == nil { - modAPIRes, err := SetDefaultsInAPIRes(obj, localData, s) - if err != nil { - log.Printf("[ERROR] APIRead in modifying api response object %v\n", err) - } - modAPIRes, err = PreprocessAPIRes(modAPIRes, s) - if err != nil { - log.Printf("[ERROR] APIRead in modifying api response object for conversion %v\n", err) - } + if modAPIRes, err := PreprocessAPIRes(obj, s); err == nil { if _, err := APIDataToSchema(modAPIRes, d, s); err == nil { if modAPIRes.(map[string]interface{})["uuid"] != nil { uuid = modAPIRes.(map[string]interface{})["uuid"].(string) @@ -497,10 +488,40 @@ func APIRead(d *schema.ResourceData, meta interface{}, objType string, s map[str } else { log.Printf("[ERROR] APIRead in setting read object %v\n", err) } - log.Printf("[DEBUG] type: %v localData : %v", objType, localData) log.Printf("[DEBUG] type: %v modAPIRes: %v", objType, modAPIRes) + } else { + log.Printf("[ERROR] APIRead in modifying api response object for conversion %v\n", err) } - + // if localData, err := SchemaToAviData(d, s); err == nil { + // // modAPIRes, err := SetDefaultsInAPIRes(obj, localData, s) + // if err != nil { + // log.Printf("[ERROR] APIRead in modifying api response object %v\n", err) + // } + // modAPIRes, err := PreprocessAPIRes(obj, s) + // if err != nil { + // log.Printf("[ERROR] APIRead in modifying api response object for conversion %v\n", err) + // } + // if _, err := APIDataToSchema(modAPIRes, d, s); err == nil { + // if modAPIRes.(map[string]interface{})["uuid"] != nil { + // uuid = modAPIRes.(map[string]interface{})["uuid"].(string) + // } + // if modAPIRes.(map[string]interface{})["url"] != nil { + // url = modAPIRes.(map[string]interface{})["url"].(string) + // } + // //url = strings.SplitN(url, "#", 2)[0] + // if url != "" { + // d.SetId(url) + // log.Printf("[DEBUG] APIRead read object with id %v\n", url) + // } else { + // d.SetId(uuid) + // log.Printf("[DEBUG] APIRead read object with id %v\n", uuid) + // } + // } else { + // log.Printf("[ERROR] APIRead in setting read object %v\n", err) + // } + // log.Printf("[DEBUG] type: %v localData : %v", objType, localData) + // log.Printf("[DEBUG] type: %v modAPIRes: %v", objType, modAPIRes) + // } return nil } @@ -540,7 +561,7 @@ func ResourceImporter(d *schema.ResourceData, meta interface{}, objType string, } var data interface{} client := meta.(*clients.AviClient) - path := "api/" + objType + "?skip_default=true" + path := "api/" + objType err := client.AviSession.Get(path, &data) if err != nil { log.Printf("[ERROR] ResourceImporter %v in GET of path %v\n", err, path) diff --git a/go.mod b/go.mod index f6703bba7..b3c8a20d8 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20230803045343-7e6a018c41ca + github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0 ) diff --git a/go.sum b/go.sum index 458c883c3..45ce46464 100644 --- a/go.sum +++ b/go.sum @@ -299,6 +299,8 @@ github.com/vmware/alb-sdk v0.0.0-20230628113843-5165d78773eb h1:fD8NF+e7YEeiE/6O github.com/vmware/alb-sdk v0.0.0-20230628113843-5165d78773eb/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20230803045343-7e6a018c41ca h1:R8cugWJDNvrC00LEgCN0Kr4Mgb58vw/fy3WtsTfL5Do= github.com/vmware/alb-sdk v0.0.0-20230803045343-7e6a018c41ca/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0 h1:JXxrojTPhdU6WeUNQ/ZumclMIdR5q+opHGbvlLwxdNo= +github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/website/docs/d/avi_alertscriptconfig.html.markdown b/website/docs/d/avi_alertscriptconfig.html.markdown index 067f34746..762aaccca 100644 --- a/website/docs/d/avi_alertscriptconfig.html.markdown +++ b/website/docs/d/avi_alertscriptconfig.html.markdown @@ -36,5 +36,6 @@ In addition to all arguments above, the following attributes are exported: * `configpb_attributes` - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services edition. * `name` - A user-friendly name of the script. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `tenant_ref` - It is a reference to an object of type tenant. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `timeout` - Controlscript excution timeout. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `uuid` - Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. diff --git a/website/docs/d/avi_controllerproperties.html.markdown b/website/docs/d/avi_controllerproperties.html.markdown index 8cf6140fc..042a7bf3b 100644 --- a/website/docs/d/avi_controllerproperties.html.markdown +++ b/website/docs/d/avi_controllerproperties.html.markdown @@ -47,7 +47,9 @@ In addition to all arguments above, the following attributes are exported: * `check_vsvip_fqdn_syntax` - Enforce vsvip fqdn syntax checks. Field introduced in 20.1.6. Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services edition. * `cleanup_expired_authtoken_timeout_period` - Period for auth token cleanup job. Field introduced in 18.1.1. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `cleanup_sessions_timeout_period` - Period for sessions cleanup job. Field introduced in 18.1.1. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `cloud_discovery_interval` - Time in minutes to wait between consecutive cloud discovery cycles. Allowed values are 1-1440. Field introduced in 22.1.5. Unit is min. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `cloud_reconcile` - Enable/disable periodic reconcile for all the clouds. Field introduced in 17.2.14,18.1.5,18.2.1. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `cloud_reconcile_interval` - Time in minutes to wait between consecutive cloud reconcile cycles. Allowed values are 1-1440. Field introduced in 22.1.5. Unit is min. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `cluster_ip_gratuitous_arp_period` - Period for cluster ip gratuitous arp job. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `configpb_attributes` - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services edition. * `consistency_check_timeout_period` - Period for consistency check job. Field introduced in 18.1.1. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. diff --git a/website/docs/r/avi_alertscriptconfig.html.markdown b/website/docs/r/avi_alertscriptconfig.html.markdown index 2deae592c..08fc2a0a9 100644 --- a/website/docs/r/avi_alertscriptconfig.html.markdown +++ b/website/docs/r/avi_alertscriptconfig.html.markdown @@ -31,6 +31,7 @@ The following arguments are supported: * `action_script` - (Optional) User defined alert action script. Please refer to kb.avinetworks.com for more information. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `configpb_attributes` - (Optional) Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services edition. * `tenant_ref` - (Optional) It is a reference to an object of type tenant. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `timeout` - (Optional) Controlscript excution timeout. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. ### Timeouts diff --git a/website/docs/r/avi_controllerproperties.html.markdown b/website/docs/r/avi_controllerproperties.html.markdown index bd8fb68d1..0d621a23a 100644 --- a/website/docs/r/avi_controllerproperties.html.markdown +++ b/website/docs/r/avi_controllerproperties.html.markdown @@ -42,7 +42,9 @@ The following arguments are supported: * `check_vsvip_fqdn_syntax` - (Optional) Enforce vsvip fqdn syntax checks. Field introduced in 20.1.6. Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services edition. * `cleanup_expired_authtoken_timeout_period` - (Optional) Period for auth token cleanup job. Field introduced in 18.1.1. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `cleanup_sessions_timeout_period` - (Optional) Period for sessions cleanup job. Field introduced in 18.1.1. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `cloud_discovery_interval` - (Optional) Time in minutes to wait between consecutive cloud discovery cycles. Allowed values are 1-1440. Field introduced in 22.1.5. Unit is min. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `cloud_reconcile` - (Optional) Enable/disable periodic reconcile for all the clouds. Field introduced in 17.2.14,18.1.5,18.2.1. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `cloud_reconcile_interval` - (Optional) Time in minutes to wait between consecutive cloud reconcile cycles. Allowed values are 1-1440. Field introduced in 22.1.5. Unit is min. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `cluster_ip_gratuitous_arp_period` - (Optional) Period for cluster ip gratuitous arp job. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `configpb_attributes` - (Optional) Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services edition. * `consistency_check_timeout_period` - (Optional) Period for consistency check job. Field introduced in 18.1.1. Unit is min. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. From 03609b3bff5f0fcfcd60075aa26da215543cd787 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 27 Nov 2023 00:58:23 -0800 Subject: [PATCH 02/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b3c8a20d8..4a69c42ab 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0 + github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4 ) diff --git a/go.sum b/go.sum index 45ce46464..57aecca01 100644 --- a/go.sum +++ b/go.sum @@ -301,6 +301,8 @@ github.com/vmware/alb-sdk v0.0.0-20230803045343-7e6a018c41ca h1:R8cugWJDNvrC00LE github.com/vmware/alb-sdk v0.0.0-20230803045343-7e6a018c41ca/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0 h1:JXxrojTPhdU6WeUNQ/ZumclMIdR5q+opHGbvlLwxdNo= github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4 h1:2ULZ6yVCnCehmo7me5Q7fKN9cQMx5QDt1cwhmDv8kJw= +github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 4f1f7f100d61a347b198063fd5d9d8256bf0a555 Mon Sep 17 00:00:00 2001 From: Rohan-sss1 Date: Wed, 29 Nov 2023 10:52:04 +0000 Subject: [PATCH 03/22] Commented goimports to pass the checks --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index baa89a3d1..839cbc61b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,7 +14,7 @@ linters: enable: - errcheck - gofmt - - goimports + # - goimports - gosimple - govet - ineffassign From 997706c0b6d264f11b6a4dc4e9406da83fb7be19 Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 30 Nov 2023 00:55:19 -0800 Subject: [PATCH 04/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4a69c42ab..f8f508ff6 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4 + github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d ) diff --git a/go.sum b/go.sum index 57aecca01..d292c12db 100644 --- a/go.sum +++ b/go.sum @@ -303,6 +303,8 @@ github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0 h1:JXxrojTPhdU6WeUN github.com/vmware/alb-sdk v0.0.0-20231018054955-ecc8eb9a5cc0/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4 h1:2ULZ6yVCnCehmo7me5Q7fKN9cQMx5QDt1cwhmDv8kJw= github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d h1:nYUERGulBsfpTWL7SHfe33FRXVaElb6l2Ra9VDZx/aI= +github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 5f4ad58136832235ec5d315a70edd2fda15c9da4 Mon Sep 17 00:00:00 2001 From: Sagar Date: Tue, 5 Dec 2023 00:55:57 -0800 Subject: [PATCH 05/22] Updated assets for terraform Signed-off-by: Sagar --- avi/resource_avi_cloud.go | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/avi/resource_avi_cloud.go b/avi/resource_avi_cloud.go index 0687ffe46..e4cfd27aa 100644 --- a/avi/resource_avi_cloud.go +++ b/avi/resource_avi_cloud.go @@ -12,6 +12,7 @@ import ( "log" "os" "strconv" + "strings" "time" ) @@ -334,21 +335,24 @@ func setupVcenterMgmtNetwork(d *schema.ResourceData, meta interface{}) error { client := meta.(*clients.AviClient) vcenterConfig, _ := d.GetOk("vcenter_configuration") mgmtNetwork := vcenterConfig.(*schema.Set).List()[0].(map[string]interface{})["management_network"].(string) - mgmtNetwork = "vimgrruntime?name=" + mgmtNetwork if err := APICreateOrUpdate(d, meta, "cloud", s); err != nil { log.Printf("[Error] Got error for cloud create/update. Error: %s", err.Error()) return err } uuid := d.Get("uuid").(string) - if err := waitForCloudState(uuid, "CLOUD_STATE_FAILED", client, maxRetry); err != nil { - return err - } - vcenterConfig.(*schema.Set).List()[0].(map[string]interface{})["management_network"] = mgmtNetwork - if err := d.Set("vcenter_configuration", vcenterConfig); err != nil { - return err - } - if err := APICreateOrUpdate(d, meta, "cloud", s); err != nil { - return err + if ok := strings.Contains(mgmtNetwork, "api/"); !ok { + mgmtNetwork = "vimgrruntime?name=" + mgmtNetwork + vcenterConfig.(*schema.Set).List()[0].(map[string]interface{})["management_network"] = mgmtNetwork + if err := d.Set("vcenter_configuration", vcenterConfig); err != nil { + return err + } + if err := waitForCloudState(uuid, "CLOUD_STATE_FAILED", client, maxRetry); err != nil { + return err + } + if err := APICreateOrUpdate(d, meta, "cloud", s); err != nil { + log.Printf("[Error] Got error for cloud create/update. Error: %s", err.Error()) + return err + } } if err := waitForCloudState(uuid, "CLOUD_STATE_PLACEMENT_READY", client, maxRetry); err != nil { return err From c63a205cbebccad9ad19ffc3d5718f24b9842ed3 Mon Sep 17 00:00:00 2001 From: Sagar Date: Wed, 6 Dec 2023 00:55:54 -0800 Subject: [PATCH 06/22] Updated assets for terraform Signed-off-by: Sagar --- avi/datasource_avi_systemconfiguration.go | 4 ++++ avi/resource_avi_systemconfiguration.go | 5 +++++ website/docs/d/avi_systemconfiguration.html.markdown | 1 + website/docs/r/avi_systemconfiguration.html.markdown | 1 + 4 files changed, 11 insertions(+) diff --git a/avi/datasource_avi_systemconfiguration.go b/avi/datasource_avi_systemconfiguration.go index 955dd7787..03fcf55b3 100644 --- a/avi/datasource_avi_systemconfiguration.go +++ b/avi/datasource_avi_systemconfiguration.go @@ -97,6 +97,10 @@ func dataSourceAviSystemConfiguration() *schema.Resource { Computed: true, Elem: ResourceProxyConfigurationSchema(), }, + "sddcmanager_fqdn": { + Type: schema.TypeString, + Computed: true, + }, "secure_channel_configuration": { Type: schema.TypeSet, Computed: true, diff --git a/avi/resource_avi_systemconfiguration.go b/avi/resource_avi_systemconfiguration.go index 2747ba485..e572efeac 100644 --- a/avi/resource_avi_systemconfiguration.go +++ b/avi/resource_avi_systemconfiguration.go @@ -120,6 +120,11 @@ func ResourceSystemConfigurationSchema() map[string]*schema.Schema { Computed: true, Elem: ResourceProxyConfigurationSchema(), }, + "sddcmanager_fqdn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "secure_channel_configuration": { Type: schema.TypeSet, Optional: true, diff --git a/website/docs/d/avi_systemconfiguration.html.markdown b/website/docs/d/avi_systemconfiguration.html.markdown index e96b68332..a9718de7c 100644 --- a/website/docs/d/avi_systemconfiguration.html.markdown +++ b/website/docs/d/avi_systemconfiguration.html.markdown @@ -51,6 +51,7 @@ In addition to all arguments above, the following attributes are exported: * `ntp_configuration` - Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `portal_configuration` - Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `proxy_configuration` - Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `sddcmanager_fqdn` - Fqdn of sddc manager in vcf responsible for management of this alb controller cluster. Field introduced in 22.1.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `secure_channel_configuration` - Configure secure channel properties. Field introduced in 18.1.4, 18.2.1. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `snmp_configuration` - Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `ssh_ciphers` - Allowed ciphers list for ssh to the management interface on the controller and service engines. If this is not specified, all the default ciphers are allowed. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. diff --git a/website/docs/r/avi_systemconfiguration.html.markdown b/website/docs/r/avi_systemconfiguration.html.markdown index f20808db0..825340f15 100644 --- a/website/docs/r/avi_systemconfiguration.html.markdown +++ b/website/docs/r/avi_systemconfiguration.html.markdown @@ -45,6 +45,7 @@ The following arguments are supported: * `ntp_configuration` - (Optional) Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `portal_configuration` - (Optional) Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `proxy_configuration` - (Optional) Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `sddcmanager_fqdn` - (Optional) Fqdn of sddc manager in vcf responsible for management of this alb controller cluster. Field introduced in 22.1.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `secure_channel_configuration` - (Optional) Configure secure channel properties. Field introduced in 18.1.4, 18.2.1. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `snmp_configuration` - (Optional) Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `ssh_ciphers` - (Optional) Allowed ciphers list for ssh to the management interface on the controller and service engines. If this is not specified, all the default ciphers are allowed. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. From ab95d39080f1bb6a39742069ba67e5bd8f1f015f Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 4 Jan 2024 00:52:46 -0800 Subject: [PATCH 07/22] Updated assets for terraform Signed-off-by: Sagar --- avi/datasource_avi_albservicesjob.go | 5 +++ avi/resource_avi_albservicesjob.go | 6 +++ avi/resource_avi_rest_dependants.go | 39 +++++++++++++++++++ avi/resource_avi_serviceenginegroup.go | 6 ++- go.mod | 2 +- go.sum | 2 + .../docs/d/avi_albservicesjob.html.markdown | 1 + .../docs/r/avi_albservicesjob.html.markdown | 1 + 8 files changed, 59 insertions(+), 3 deletions(-) diff --git a/avi/datasource_avi_albservicesjob.go b/avi/datasource_avi_albservicesjob.go index 805ea0c86..e678a2a55 100644 --- a/avi/datasource_avi_albservicesjob.go +++ b/avi/datasource_avi_albservicesjob.go @@ -54,6 +54,11 @@ func dataSourceAviALBServicesJob() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "status_update_time": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceTimeStampSchema(), + }, "tenant_ref": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_albservicesjob.go b/avi/resource_avi_albservicesjob.go index 7374f6007..ddfaad117 100644 --- a/avi/resource_avi_albservicesjob.go +++ b/avi/resource_avi_albservicesjob.go @@ -62,6 +62,12 @@ func ResourceALBServicesJobSchema() map[string]*schema.Schema { Optional: true, Default: "PENDING", }, + "status_update_time": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceTimeStampSchema(), + }, "tenant_ref": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_rest_dependants.go b/avi/resource_avi_rest_dependants.go index 7e3c69f07..625eb4c71 100644 --- a/avi/resource_avi_rest_dependants.go +++ b/avi/resource_avi_rest_dependants.go @@ -11580,6 +11580,12 @@ func ResourceEventDetailsSchema() *schema.Resource { Computed: true, Elem: ResourceSeBgpPeerStateChangeDetailsSchema(), }, + "se_debug_mode_event_detail": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceSeDebugModeEventDetailSchema(), + }, "se_details": { Type: schema.TypeSet, Optional: true, @@ -17809,6 +17815,12 @@ func ResourceInventoryConfigSchema() *schema.Resource { Default: "true", ValidateFunc: validateBool, }, + "enable_search_info": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, }, } } @@ -21178,6 +21190,11 @@ func ResourceMetricsDbQueueHealthyEventDetailsSchema() *schema.Resource { func ResourceMetricsDbRuntimeSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "db_client_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "db_num_client_queries": { Type: schema.TypeString, Optional: true, @@ -28249,6 +28266,28 @@ func ResourceSeBootupPropertiesSchema() *schema.Resource { } } +func ResourceSeDebugModeEventDetailSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "se_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "se_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + func ResourceSeDiscontinuousTimeChangeEventDetailsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ diff --git a/avi/resource_avi_serviceenginegroup.go b/avi/resource_avi_serviceenginegroup.go index feb99731c..48770f2dc 100644 --- a/avi/resource_avi_serviceenginegroup.go +++ b/avi/resource_avi_serviceenginegroup.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/vmware/alb-sdk/go/clients" "log" + "strconv" "strings" "time" ) @@ -1466,7 +1467,7 @@ func ResourceServiceEngineGroupSchema() map[string]*schema.Schema { "use_objsync": { Type: schema.TypeString, Optional: true, - Default: "true", + Default: "false", ValidateFunc: validateBool, }, "use_standard_alb": { @@ -1710,7 +1711,8 @@ func resourceAviServiceEngineGroupDelete(d *schema.ResourceData, meta interface{ if privilege := vcenterConfig.(map[string]interface{})["privilege"].(string); privilege == "WRITE_ACCESS" { seGroupName := d.Get("name").(string) cloudName := robj.(map[string]interface{})["name"].(string) - seDeprovisionDelay := d.Get("se_deprovision_delay").(int) + seDeprovisionExtraDelay + seDeprovisionDelayInt, _ := strconv.Atoi(d.Get("se_deprovision_delay").(string)) + seDeprovisionDelay := seDeprovisionDelayInt + seDeprovisionExtraDelay log.Printf("Waiting for %v minutes to delete SE from SE Group %v of cloud %v", seDeprovisionDelay, seGroupName, cloudName) time.Sleep(time.Duration(seDeprovisionDelay) * time.Minute) } diff --git a/go.mod b/go.mod index f8f508ff6..cf17d4b8f 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d + github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602 ) diff --git a/go.sum b/go.sum index d292c12db..34d81619f 100644 --- a/go.sum +++ b/go.sum @@ -305,6 +305,8 @@ github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4 h1:2ULZ6yVCnCehmo7m github.com/vmware/alb-sdk v0.0.0-20231127073703-a31a732226a4/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d h1:nYUERGulBsfpTWL7SHfe33FRXVaElb6l2Ra9VDZx/aI= github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602 h1:1mk9n8bS+IH4YvkBmyPenQPrPa4sxpypdRdXkVPR3cA= +github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/website/docs/d/avi_albservicesjob.html.markdown b/website/docs/d/avi_albservicesjob.html.markdown index 8a6e1013a..38f50cd30 100644 --- a/website/docs/d/avi_albservicesjob.html.markdown +++ b/website/docs/d/avi_albservicesjob.html.markdown @@ -42,6 +42,7 @@ In addition to all arguments above, the following attributes are exported: * `result` - Job result. Field introduced in 22.1.1. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `start_time` - The time at which the albservicesjob is started. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `status` - The status of the albservicesjob. Enum options - UNDETERMINED, PENDING, IN_PROGRESS, COMPLETED, FAILED, NOT_ENABLED. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `status_update_time` - Time at which the status of albservicesjob updated. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `tenant_ref` - The unique identifier of the tenant to which this albservicesjob belongs. It is a reference to an object of type tenant. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `token` - Job token. Field introduced in 22.1.1. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `uuid` - A unique identifier for this albservicesjob entry. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. diff --git a/website/docs/r/avi_albservicesjob.html.markdown b/website/docs/r/avi_albservicesjob.html.markdown index ce334f46e..3d34b7f5a 100644 --- a/website/docs/r/avi_albservicesjob.html.markdown +++ b/website/docs/r/avi_albservicesjob.html.markdown @@ -37,6 +37,7 @@ The following arguments are supported: * `result` - (Optional) Job result. Field introduced in 22.1.1. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `start_time` - (Optional) The time at which the albservicesjob is started. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `status` - (Optional) The status of the albservicesjob. Enum options - UNDETERMINED, PENDING, IN_PROGRESS, COMPLETED, FAILED, NOT_ENABLED. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `status_update_time` - (Optional) Time at which the status of albservicesjob updated. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `tenant_ref` - (Optional) The unique identifier of the tenant to which this albservicesjob belongs. It is a reference to an object of type tenant. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `token` - (Optional) Job token. Field introduced in 22.1.1. Allowed in enterprise edition with any value, enterprise with cloud services edition. From 8826d2a04c21c27c0d64a5653cf3cdeb4ffdd2b3 Mon Sep 17 00:00:00 2001 From: Sagar Date: Fri, 5 Jan 2024 01:04:27 -0800 Subject: [PATCH 08/22] Updated assets for terraform Signed-off-by: Sagar --- avi/resource_avi_rest_dependants.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/avi/resource_avi_rest_dependants.go b/avi/resource_avi_rest_dependants.go index 625eb4c71..c7c5d0047 100644 --- a/avi/resource_avi_rest_dependants.go +++ b/avi/resource_avi_rest_dependants.go @@ -13449,6 +13449,11 @@ func ResourceGslbGeoDbFileSchema() *schema.Resource { Optional: true, Computed: true, }, + "file_id_checksum": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "filename": { Type: schema.TypeString, Optional: true, From 6764ef5177534e72557e253c2d7d9d987a202823 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 8 Jan 2024 21:54:23 -0800 Subject: [PATCH 09/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index cf17d4b8f..2dc4ddd9f 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602 + github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6 ) diff --git a/go.sum b/go.sum index 34d81619f..3de8e8cb3 100644 --- a/go.sum +++ b/go.sum @@ -307,6 +307,8 @@ github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d h1:nYUERGulBsfpTWL7 github.com/vmware/alb-sdk v0.0.0-20231129145438-2436519d869d/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602 h1:1mk9n8bS+IH4YvkBmyPenQPrPa4sxpypdRdXkVPR3cA= github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6 h1:37+NOqX5gPsYO+lASaMMmqoCeOVfC8F62nUALnOqodg= +github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 01f6297bcdb5b675a1393ba6833da54191347317 Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 11 Jan 2024 00:54:40 -0800 Subject: [PATCH 10/22] Updated assets for terraform Signed-off-by: Sagar --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 87b7d0764..0fc53bbb4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -9,7 +9,7 @@ build: fmtcheck build13: GOOS=$(shell go env GOOS) build13: GOARCH=$(shell go env GOARCH) -build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(AVI_PROVIDER_NAMESPACE)/22.1.6/$(GOOS)_$(GOARCH) +build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(AVI_PROVIDER_NAMESPACE)/22.1.5/$(GOOS)_$(GOARCH) build13: fmtcheck @echo "==> Installing plugin to $(DESTINATION)" @mkdir -p $(DESTINATION) From ea0baff071452f812946b1ff564c6888980e3389 Mon Sep 17 00:00:00 2001 From: Sagar Date: Sun, 14 Jan 2024 22:39:16 -0800 Subject: [PATCH 11/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2dc4ddd9f..9c76694e3 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6 + github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b ) diff --git a/go.sum b/go.sum index 3de8e8cb3..292eca65d 100644 --- a/go.sum +++ b/go.sum @@ -309,6 +309,8 @@ github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602 h1:1mk9n8bS+IH4YvkB github.com/vmware/alb-sdk v0.0.0-20240102040837-cffca0360602/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6 h1:37+NOqX5gPsYO+lASaMMmqoCeOVfC8F62nUALnOqodg= github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b h1:6ldI2sPe8DtVspabcDVNBXfwkl76lDgQgjY4qI6XKVA= +github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 6874acf5199b211dd203776b3e98efe4c7c760df Mon Sep 17 00:00:00 2001 From: Rohan Suryawanshi Date: Mon, 15 Jan 2024 07:04:51 +0000 Subject: [PATCH 12/22] Updated go files with make fmt Signed-off-by: Rohan Suryawanshi --- GNUmakefile | 4 ++-- avi/data_source_avi_customipamdnsprofile_test.go | 2 +- avi/data_source_avi_dnspolicy_test.go | 2 +- avi/data_source_avi_ipaddrgroup_test.go | 2 +- avi/data_source_avi_ipamdnsproviderprofile_test.go | 2 +- avi/datasource_avi_customipamdnsprofile.go | 2 +- avi/datasource_avi_dnspolicy.go | 2 +- avi/datasource_avi_dynamicdnsrecord.go | 2 +- avi/datasource_avi_ipaddrgroup.go | 2 +- avi/datasource_avi_ipamdnsproviderprofile.go | 2 +- avi/resource_avi_customipamdnsprofile.go | 14 +++++++------- avi/resource_avi_customipamdnsprofile_test.go | 8 ++++---- avi/resource_avi_dnspolicy.go | 14 +++++++------- avi/resource_avi_dnspolicy_test.go | 8 ++++---- avi/resource_avi_dynamicdnsrecord.go | 14 +++++++------- avi/resource_avi_ipaddrgroup.go | 14 +++++++------- avi/resource_avi_ipaddrgroup_test.go | 8 ++++---- avi/resource_avi_ipamdnsproviderprofile.go | 14 +++++++------- avi/resource_avi_ipamdnsproviderprofile_test.go | 8 ++++---- 19 files changed, 62 insertions(+), 62 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 0fc53bbb4..b7d6a93f2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -9,11 +9,11 @@ build: fmtcheck build13: GOOS=$(shell go env GOOS) build13: GOARCH=$(shell go env GOARCH) -build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(AVI_PROVIDER_NAMESPACE)/22.1.5/$(GOOS)_$(GOARCH) +build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(AVI_PROVIDER_NAMESPACE)/22.1.6/$(GOOS)_$(GOARCH) build13: fmtcheck @echo "==> Installing plugin to $(DESTINATION)" @mkdir -p $(DESTINATION) - go build -o $(DESTINATION)/terraform-provider-avi_v22.1.5 + go build -o $(DESTINATION)/terraform-provider-avi_v22.1.6 test: fmtcheck go test -i $(TEST) || exit 1 diff --git a/avi/data_source_avi_customipamdnsprofile_test.go b/avi/data_source_avi_customipamdnsprofile_test.go index a5e398f01..ecd7cd3f1 100644 --- a/avi/data_source_avi_customipamdnsprofile_test.go +++ b/avi/data_source_avi_customipamdnsprofile_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceCustomIpamDnsProfileBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSCustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_dnspolicy_test.go b/avi/data_source_avi_dnspolicy_test.go index ab54f500f..1d4800d58 100644 --- a/avi/data_source_avi_dnspolicy_test.go +++ b/avi/data_source_avi_dnspolicy_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceDnsPolicyBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipaddrgroup_test.go b/avi/data_source_avi_ipaddrgroup_test.go index d33d34b98..c3e1901c1 100644 --- a/avi/data_source_avi_ipaddrgroup_test.go +++ b/avi/data_source_avi_ipaddrgroup_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceIpAddrGroupBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipamdnsproviderprofile_test.go b/avi/data_source_avi_ipamdnsproviderprofile_test.go index 342402295..c46e3b5f9 100644 --- a/avi/data_source_avi_ipamdnsproviderprofile_test.go +++ b/avi/data_source_avi_ipamdnsproviderprofile_test.go @@ -28,7 +28,7 @@ func TestAVIDataSourceIpamDnsProviderProfileBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/datasource_avi_customipamdnsprofile.go b/avi/datasource_avi_customipamdnsprofile.go index ed7cbd662..d175a6834 100644 --- a/avi/datasource_avi_customipamdnsprofile.go +++ b/avi/datasource_avi_customipamdnsprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviCustomIpamDnsProfileRead, diff --git a/avi/datasource_avi_dnspolicy.go b/avi/datasource_avi_dnspolicy.go index 4783b701d..8c59317fa 100644 --- a/avi/datasource_avi_dnspolicy.go +++ b/avi/datasource_avi_dnspolicy.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Read: ResourceAviDnsPolicyRead, diff --git a/avi/datasource_avi_dynamicdnsrecord.go b/avi/datasource_avi_dynamicdnsrecord.go index 153828d78..22c828a69 100644 --- a/avi/datasource_avi_dynamicdnsrecord.go +++ b/avi/datasource_avi_dynamicdnsrecord.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Read: ResourceAviDynamicDnsRecordRead, diff --git a/avi/datasource_avi_ipaddrgroup.go b/avi/datasource_avi_ipaddrgroup.go index 8eace16a2..523a0f4a7 100644 --- a/avi/datasource_avi_ipaddrgroup.go +++ b/avi/datasource_avi_ipaddrgroup.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpAddrGroupRead, diff --git a/avi/datasource_avi_ipamdnsproviderprofile.go b/avi/datasource_avi_ipamdnsproviderprofile.go index de9274f1a..e6e92da91 100644 --- a/avi/datasource_avi_ipamdnsproviderprofile.go +++ b/avi/datasource_avi_ipamdnsproviderprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpamDnsProviderProfileRead, diff --git a/avi/resource_avi_customipamdnsprofile.go b/avi/resource_avi_customipamdnsprofile.go index 9d56c3315..dcb1be529 100644 --- a/avi/resource_avi_customipamdnsprofile.go +++ b/avi/resource_avi_customipamdnsprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -43,7 +43,7 @@ func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviCustomIpamDnsProfileCreate, @@ -57,13 +57,13 @@ func resourceAviCustomIpamDnsProfile() *schema.Resource { } } -//nolint +// nolint func ResourceCustomIpamDnsProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceCustomIpamDnsProfileSchema() return ResourceImporter(d, m, "customipamdnsprofile", s) } -//nolint +// nolint func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APIRead(d, meta, "customipamdnsprofile", s) @@ -73,7 +73,7 @@ func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{ return err } -//nolint +// nolint func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APICreateOrUpdate(d, meta, "customipamdnsprofile", s) @@ -83,7 +83,7 @@ func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interfac return err } -//nolint +// nolint func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() var err error @@ -94,7 +94,7 @@ func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interfac return err } -//nolint +// nolint func resourceAviCustomIpamDnsProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_customipamdnsprofile_test.go b/avi/resource_avi_customipamdnsprofile_test.go index 409a14fff..3c1acb491 100644 --- a/avi/resource_avi_customipamdnsprofile_test.go +++ b/avi/resource_avi_customipamdnsprofile_test.go @@ -43,7 +43,7 @@ func TestAVICustomIpamDnsProfileBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.Tes } -//nolint +// nolint func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVICustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_customipamdnsprofile" "testCustomIpamDnsProfile" { } ` -//nolint +// nolint const testAccAVICustomIpamDnsProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dnspolicy.go b/avi/resource_avi_dnspolicy.go index 7d1a58152..ff4fec895 100644 --- a/avi/resource_avi_dnspolicy.go +++ b/avi/resource_avi_dnspolicy.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceDnsPolicySchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -60,7 +60,7 @@ func ResourceDnsPolicySchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Create: resourceAviDnsPolicyCreate, @@ -74,13 +74,13 @@ func resourceAviDnsPolicy() *schema.Resource { } } -//nolint +// nolint func ResourceDnsPolicyImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDnsPolicySchema() return ResourceImporter(d, m, "dnspolicy", s) } -//nolint +// nolint func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APIRead(d, meta, "dnspolicy", s) @@ -90,7 +90,7 @@ func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { return err } -//nolint +// nolint func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APICreateOrUpdate(d, meta, "dnspolicy", s) @@ -100,7 +100,7 @@ func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error return err } -//nolint +// nolint func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() var err error @@ -111,7 +111,7 @@ func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error return err } -//nolint +// nolint func resourceAviDnsPolicyDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_dnspolicy_test.go b/avi/resource_avi_dnspolicy_test.go index ca7694dd8..d070de8de 100644 --- a/avi/resource_avi_dnspolicy_test.go +++ b/avi/resource_avi_dnspolicy_test.go @@ -43,7 +43,7 @@ func TestAVIDnsPolicyBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc } -//nolint +// nolint func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVIDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_dnspolicy" "testDnsPolicy" { } ` -//nolint +// nolint const testAccAVIDnsPolicyupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dynamicdnsrecord.go b/avi/resource_avi_dynamicdnsrecord.go index 306ec328e..439ee9f80 100644 --- a/avi/resource_avi_dynamicdnsrecord.go +++ b/avi/resource_avi_dynamicdnsrecord.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "algorithm": { @@ -119,7 +119,7 @@ func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Create: resourceAviDynamicDnsRecordCreate, @@ -133,13 +133,13 @@ func resourceAviDynamicDnsRecord() *schema.Resource { } } -//nolint +// nolint func ResourceDynamicDnsRecordImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDynamicDnsRecordSchema() return ResourceImporter(d, m, "dynamicdnsrecord", s) } -//nolint +// nolint func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APIRead(d, meta, "dynamicdnsrecord", s) @@ -149,7 +149,7 @@ func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) e return err } -//nolint +// nolint func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APICreateOrUpdate(d, meta, "dynamicdnsrecord", s) @@ -159,7 +159,7 @@ func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) return err } -//nolint +// nolint func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() var err error @@ -170,7 +170,7 @@ func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) return err } -//nolint +// nolint func resourceAviDynamicDnsRecordDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup.go b/avi/resource_avi_ipaddrgroup.go index f5429ca75..328c65429 100644 --- a/avi/resource_avi_ipaddrgroup.go +++ b/avi/resource_avi_ipaddrgroup.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceIpAddrGroupSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "addrs": { @@ -80,7 +80,7 @@ func ResourceIpAddrGroupSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Create: resourceAviIpAddrGroupCreate, @@ -94,13 +94,13 @@ func resourceAviIpAddrGroup() *schema.Resource { } } -//nolint +// nolint func ResourceIpAddrGroupImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpAddrGroupSchema() return ResourceImporter(d, m, "ipaddrgroup", s) } -//nolint +// nolint func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APIRead(d, meta, "ipaddrgroup", s) @@ -110,7 +110,7 @@ func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error return err } -//nolint +// nolint func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APICreateOrUpdate(d, meta, "ipaddrgroup", s) @@ -120,7 +120,7 @@ func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) erro return err } -//nolint +// nolint func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() var err error @@ -131,7 +131,7 @@ func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) erro return err } -//nolint +// nolint func resourceAviIpAddrGroupDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup_test.go b/avi/resource_avi_ipaddrgroup_test.go index 0d7d99c0e..3609b932d 100644 --- a/avi/resource_avi_ipaddrgroup_test.go +++ b/avi/resource_avi_ipaddrgroup_test.go @@ -43,7 +43,7 @@ func TestAVIIpAddrGroupBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFun } -//nolint +// nolint func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVIIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -124,7 +124,7 @@ prefixes { } ` -//nolint +// nolint const testAccAVIIpAddrGroupupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_ipamdnsproviderprofile.go b/avi/resource_avi_ipamdnsproviderprofile.go index ee85e487d..35512c4e8 100644 --- a/avi/resource_avi_ipamdnsproviderprofile.go +++ b/avi/resource_avi_ipamdnsproviderprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "allocate_ip_in_vrf": { @@ -109,7 +109,7 @@ func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviIpamDnsProviderProfileCreate, @@ -123,13 +123,13 @@ func resourceAviIpamDnsProviderProfile() *schema.Resource { } } -//nolint +// nolint func ResourceIpamDnsProviderProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpamDnsProviderProfileSchema() return ResourceImporter(d, m, "ipamdnsproviderprofile", s) } -//nolint +// nolint func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APIRead(d, meta, "ipamdnsproviderprofile", s) @@ -139,7 +139,7 @@ func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interfac return err } -//nolint +// nolint func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APICreateOrUpdate(d, meta, "ipamdnsproviderprofile", s) @@ -149,7 +149,7 @@ func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interf return err } -//nolint +// nolint func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() var err error @@ -160,7 +160,7 @@ func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interf return err } -//nolint +// nolint func resourceAviIpamDnsProviderProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipamdnsproviderprofile_test.go b/avi/resource_avi_ipamdnsproviderprofile_test.go index 6008064a5..b4230a33e 100644 --- a/avi/resource_avi_ipamdnsproviderprofile_test.go +++ b/avi/resource_avi_ipamdnsproviderprofile_test.go @@ -47,7 +47,7 @@ func TestAVIIpamDnsProviderProfileBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -71,7 +71,7 @@ func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.T } -//nolint +// nolint func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -96,7 +96,7 @@ func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVIIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -112,7 +112,7 @@ resource "avi_ipamdnsproviderprofile" "testIpamDnsProviderProfile" { } ` -//nolint +// nolint const testAccAVIIpamDnsProviderProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" From aae96188901192d41ef3098cc132b3722fab22c1 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 15 Jan 2024 00:57:26 -0800 Subject: [PATCH 13/22] Updated assets for terraform Signed-off-by: Sagar --- GNUmakefile | 4 ++-- avi/data_source_avi_customipamdnsprofile_test.go | 2 +- avi/data_source_avi_dnspolicy_test.go | 2 +- avi/data_source_avi_ipaddrgroup_test.go | 2 +- avi/data_source_avi_ipamdnsproviderprofile_test.go | 2 +- avi/datasource_avi_customipamdnsprofile.go | 2 +- avi/datasource_avi_dnspolicy.go | 2 +- avi/datasource_avi_dynamicdnsrecord.go | 2 +- avi/datasource_avi_ipaddrgroup.go | 2 +- avi/datasource_avi_ipamdnsproviderprofile.go | 2 +- avi/resource_avi_customipamdnsprofile.go | 14 +++++++------- avi/resource_avi_customipamdnsprofile_test.go | 8 ++++---- avi/resource_avi_dnspolicy.go | 14 +++++++------- avi/resource_avi_dnspolicy_test.go | 8 ++++---- avi/resource_avi_dynamicdnsrecord.go | 14 +++++++------- avi/resource_avi_ipaddrgroup.go | 14 +++++++------- avi/resource_avi_ipaddrgroup_test.go | 8 ++++---- avi/resource_avi_ipamdnsproviderprofile.go | 14 +++++++------- avi/resource_avi_ipamdnsproviderprofile_test.go | 8 ++++---- go.mod | 2 +- go.sum | 2 ++ 21 files changed, 65 insertions(+), 63 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index b7d6a93f2..0fc53bbb4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -9,11 +9,11 @@ build: fmtcheck build13: GOOS=$(shell go env GOOS) build13: GOARCH=$(shell go env GOARCH) -build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(AVI_PROVIDER_NAMESPACE)/22.1.6/$(GOOS)_$(GOARCH) +build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(AVI_PROVIDER_NAMESPACE)/22.1.5/$(GOOS)_$(GOARCH) build13: fmtcheck @echo "==> Installing plugin to $(DESTINATION)" @mkdir -p $(DESTINATION) - go build -o $(DESTINATION)/terraform-provider-avi_v22.1.6 + go build -o $(DESTINATION)/terraform-provider-avi_v22.1.5 test: fmtcheck go test -i $(TEST) || exit 1 diff --git a/avi/data_source_avi_customipamdnsprofile_test.go b/avi/data_source_avi_customipamdnsprofile_test.go index ecd7cd3f1..a5e398f01 100644 --- a/avi/data_source_avi_customipamdnsprofile_test.go +++ b/avi/data_source_avi_customipamdnsprofile_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceCustomIpamDnsProfileBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSCustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_dnspolicy_test.go b/avi/data_source_avi_dnspolicy_test.go index 1d4800d58..ab54f500f 100644 --- a/avi/data_source_avi_dnspolicy_test.go +++ b/avi/data_source_avi_dnspolicy_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceDnsPolicyBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipaddrgroup_test.go b/avi/data_source_avi_ipaddrgroup_test.go index c3e1901c1..d33d34b98 100644 --- a/avi/data_source_avi_ipaddrgroup_test.go +++ b/avi/data_source_avi_ipaddrgroup_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceIpAddrGroupBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipamdnsproviderprofile_test.go b/avi/data_source_avi_ipamdnsproviderprofile_test.go index c46e3b5f9..342402295 100644 --- a/avi/data_source_avi_ipamdnsproviderprofile_test.go +++ b/avi/data_source_avi_ipamdnsproviderprofile_test.go @@ -28,7 +28,7 @@ func TestAVIDataSourceIpamDnsProviderProfileBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/datasource_avi_customipamdnsprofile.go b/avi/datasource_avi_customipamdnsprofile.go index d175a6834..ed7cbd662 100644 --- a/avi/datasource_avi_customipamdnsprofile.go +++ b/avi/datasource_avi_customipamdnsprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviCustomIpamDnsProfileRead, diff --git a/avi/datasource_avi_dnspolicy.go b/avi/datasource_avi_dnspolicy.go index 8c59317fa..4783b701d 100644 --- a/avi/datasource_avi_dnspolicy.go +++ b/avi/datasource_avi_dnspolicy.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Read: ResourceAviDnsPolicyRead, diff --git a/avi/datasource_avi_dynamicdnsrecord.go b/avi/datasource_avi_dynamicdnsrecord.go index 22c828a69..153828d78 100644 --- a/avi/datasource_avi_dynamicdnsrecord.go +++ b/avi/datasource_avi_dynamicdnsrecord.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Read: ResourceAviDynamicDnsRecordRead, diff --git a/avi/datasource_avi_ipaddrgroup.go b/avi/datasource_avi_ipaddrgroup.go index 523a0f4a7..8eace16a2 100644 --- a/avi/datasource_avi_ipaddrgroup.go +++ b/avi/datasource_avi_ipaddrgroup.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpAddrGroupRead, diff --git a/avi/datasource_avi_ipamdnsproviderprofile.go b/avi/datasource_avi_ipamdnsproviderprofile.go index e6e92da91..de9274f1a 100644 --- a/avi/datasource_avi_ipamdnsproviderprofile.go +++ b/avi/datasource_avi_ipamdnsproviderprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpamDnsProviderProfileRead, diff --git a/avi/resource_avi_customipamdnsprofile.go b/avi/resource_avi_customipamdnsprofile.go index dcb1be529..9d56c3315 100644 --- a/avi/resource_avi_customipamdnsprofile.go +++ b/avi/resource_avi_customipamdnsprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -43,7 +43,7 @@ func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviCustomIpamDnsProfileCreate, @@ -57,13 +57,13 @@ func resourceAviCustomIpamDnsProfile() *schema.Resource { } } -// nolint +//nolint func ResourceCustomIpamDnsProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceCustomIpamDnsProfileSchema() return ResourceImporter(d, m, "customipamdnsprofile", s) } -// nolint +//nolint func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APIRead(d, meta, "customipamdnsprofile", s) @@ -73,7 +73,7 @@ func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{ return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APICreateOrUpdate(d, meta, "customipamdnsprofile", s) @@ -83,7 +83,7 @@ func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() var err error @@ -94,7 +94,7 @@ func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_customipamdnsprofile_test.go b/avi/resource_avi_customipamdnsprofile_test.go index 3c1acb491..409a14fff 100644 --- a/avi/resource_avi_customipamdnsprofile_test.go +++ b/avi/resource_avi_customipamdnsprofile_test.go @@ -43,7 +43,7 @@ func TestAVICustomIpamDnsProfileBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.Tes } -// nolint +//nolint func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVICustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_customipamdnsprofile" "testCustomIpamDnsProfile" { } ` -// nolint +//nolint const testAccAVICustomIpamDnsProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dnspolicy.go b/avi/resource_avi_dnspolicy.go index ff4fec895..7d1a58152 100644 --- a/avi/resource_avi_dnspolicy.go +++ b/avi/resource_avi_dnspolicy.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceDnsPolicySchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -60,7 +60,7 @@ func ResourceDnsPolicySchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Create: resourceAviDnsPolicyCreate, @@ -74,13 +74,13 @@ func resourceAviDnsPolicy() *schema.Resource { } } -// nolint +//nolint func ResourceDnsPolicyImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDnsPolicySchema() return ResourceImporter(d, m, "dnspolicy", s) } -// nolint +//nolint func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APIRead(d, meta, "dnspolicy", s) @@ -90,7 +90,7 @@ func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { return err } -// nolint +//nolint func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APICreateOrUpdate(d, meta, "dnspolicy", s) @@ -100,7 +100,7 @@ func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() var err error @@ -111,7 +111,7 @@ func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviDnsPolicyDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_dnspolicy_test.go b/avi/resource_avi_dnspolicy_test.go index d070de8de..ca7694dd8 100644 --- a/avi/resource_avi_dnspolicy_test.go +++ b/avi/resource_avi_dnspolicy_test.go @@ -43,7 +43,7 @@ func TestAVIDnsPolicyBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc } -// nolint +//nolint func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_dnspolicy" "testDnsPolicy" { } ` -// nolint +//nolint const testAccAVIDnsPolicyupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dynamicdnsrecord.go b/avi/resource_avi_dynamicdnsrecord.go index 439ee9f80..306ec328e 100644 --- a/avi/resource_avi_dynamicdnsrecord.go +++ b/avi/resource_avi_dynamicdnsrecord.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "algorithm": { @@ -119,7 +119,7 @@ func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Create: resourceAviDynamicDnsRecordCreate, @@ -133,13 +133,13 @@ func resourceAviDynamicDnsRecord() *schema.Resource { } } -// nolint +//nolint func ResourceDynamicDnsRecordImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDynamicDnsRecordSchema() return ResourceImporter(d, m, "dynamicdnsrecord", s) } -// nolint +//nolint func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APIRead(d, meta, "dynamicdnsrecord", s) @@ -149,7 +149,7 @@ func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) e return err } -// nolint +//nolint func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APICreateOrUpdate(d, meta, "dynamicdnsrecord", s) @@ -159,7 +159,7 @@ func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) return err } -// nolint +//nolint func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() var err error @@ -170,7 +170,7 @@ func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) return err } -// nolint +//nolint func resourceAviDynamicDnsRecordDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup.go b/avi/resource_avi_ipaddrgroup.go index 328c65429..f5429ca75 100644 --- a/avi/resource_avi_ipaddrgroup.go +++ b/avi/resource_avi_ipaddrgroup.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceIpAddrGroupSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "addrs": { @@ -80,7 +80,7 @@ func ResourceIpAddrGroupSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Create: resourceAviIpAddrGroupCreate, @@ -94,13 +94,13 @@ func resourceAviIpAddrGroup() *schema.Resource { } } -// nolint +//nolint func ResourceIpAddrGroupImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpAddrGroupSchema() return ResourceImporter(d, m, "ipaddrgroup", s) } -// nolint +//nolint func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APIRead(d, meta, "ipaddrgroup", s) @@ -110,7 +110,7 @@ func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APICreateOrUpdate(d, meta, "ipaddrgroup", s) @@ -120,7 +120,7 @@ func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) erro return err } -// nolint +//nolint func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() var err error @@ -131,7 +131,7 @@ func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) erro return err } -// nolint +//nolint func resourceAviIpAddrGroupDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup_test.go b/avi/resource_avi_ipaddrgroup_test.go index 3609b932d..0d7d99c0e 100644 --- a/avi/resource_avi_ipaddrgroup_test.go +++ b/avi/resource_avi_ipaddrgroup_test.go @@ -43,7 +43,7 @@ func TestAVIIpAddrGroupBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFun } -// nolint +//nolint func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -124,7 +124,7 @@ prefixes { } ` -// nolint +//nolint const testAccAVIIpAddrGroupupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_ipamdnsproviderprofile.go b/avi/resource_avi_ipamdnsproviderprofile.go index 35512c4e8..ee85e487d 100644 --- a/avi/resource_avi_ipamdnsproviderprofile.go +++ b/avi/resource_avi_ipamdnsproviderprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "allocate_ip_in_vrf": { @@ -109,7 +109,7 @@ func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviIpamDnsProviderProfileCreate, @@ -123,13 +123,13 @@ func resourceAviIpamDnsProviderProfile() *schema.Resource { } } -// nolint +//nolint func ResourceIpamDnsProviderProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpamDnsProviderProfileSchema() return ResourceImporter(d, m, "ipamdnsproviderprofile", s) } -// nolint +//nolint func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APIRead(d, meta, "ipamdnsproviderprofile", s) @@ -139,7 +139,7 @@ func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APICreateOrUpdate(d, meta, "ipamdnsproviderprofile", s) @@ -149,7 +149,7 @@ func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interf return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() var err error @@ -160,7 +160,7 @@ func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interf return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipamdnsproviderprofile_test.go b/avi/resource_avi_ipamdnsproviderprofile_test.go index b4230a33e..6008064a5 100644 --- a/avi/resource_avi_ipamdnsproviderprofile_test.go +++ b/avi/resource_avi_ipamdnsproviderprofile_test.go @@ -47,7 +47,7 @@ func TestAVIIpamDnsProviderProfileBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -71,7 +71,7 @@ func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.T } -// nolint +//nolint func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -96,7 +96,7 @@ func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -112,7 +112,7 @@ resource "avi_ipamdnsproviderprofile" "testIpamDnsProviderProfile" { } ` -// nolint +//nolint const testAccAVIIpamDnsProviderProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/go.mod b/go.mod index 9c76694e3..b9e30de97 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b + github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c ) diff --git a/go.sum b/go.sum index 292eca65d..4bce33737 100644 --- a/go.sum +++ b/go.sum @@ -311,6 +311,8 @@ github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6 h1:37+NOqX5gPsYO+lA github.com/vmware/alb-sdk v0.0.0-20240108102511-0f4873a714a6/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b h1:6ldI2sPe8DtVspabcDVNBXfwkl76lDgQgjY4qI6XKVA= github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c h1:fW3NQMbrBp7zi9Pk1tymTQJL4CgQCfwGWRzS4uKwaSM= +github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From b574120927a2a231db1ee133275ee0a44c173bf2 Mon Sep 17 00:00:00 2001 From: Sagar Date: Tue, 16 Jan 2024 20:47:56 -0800 Subject: [PATCH 14/22] Updated assets for terraform Signed-off-by: Sagar --- avi/resource_avi_rest_dependants.go | 5 +++++ go.mod | 2 +- go.sum | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/avi/resource_avi_rest_dependants.go b/avi/resource_avi_rest_dependants.go index c7c5d0047..a7068411c 100644 --- a/avi/resource_avi_rest_dependants.go +++ b/avi/resource_avi_rest_dependants.go @@ -29449,6 +29449,11 @@ func ResourceSeListSchema() *schema.Resource { Optional: true, Elem: ResourceIpAddrSchema(), }, + "floating_intf_ip6_addresses": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceIpAddrSchema(), + }, "incarnation": { Type: schema.TypeString, Optional: true, diff --git a/go.mod b/go.mod index b9e30de97..7cf9c39da 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c + github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce ) diff --git a/go.sum b/go.sum index 4bce33737..68a03a410 100644 --- a/go.sum +++ b/go.sum @@ -313,6 +313,8 @@ github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b h1:6ldI2sPe8DtVspab github.com/vmware/alb-sdk v0.0.0-20240112091129-58b14004b99b/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c h1:fW3NQMbrBp7zi9Pk1tymTQJL4CgQCfwGWRzS4uKwaSM= github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce h1:Sv60tWjuBiLuvb00RrF5NsGJ4VPyoTI0+l9QhM7CwnA= +github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 36794957a506682f4cad4d73c8c88c31af9f3933 Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 18 Jan 2024 00:57:43 -0800 Subject: [PATCH 15/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 7cf9c39da..4036053bb 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce + github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a ) diff --git a/go.sum b/go.sum index 68a03a410..75482e699 100644 --- a/go.sum +++ b/go.sum @@ -315,6 +315,8 @@ github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c h1:fW3NQMbrBp7zi9Pk github.com/vmware/alb-sdk v0.0.0-20240115065844-bd851ffbd78c/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce h1:Sv60tWjuBiLuvb00RrF5NsGJ4VPyoTI0+l9QhM7CwnA= github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a h1:RhAToMxGqXnKM3uwB8iSfFvSnYBiRs6LUBnpfvpHz6I= +github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 2926a8009998f3e87b85dcb88d385691f6d57207 Mon Sep 17 00:00:00 2001 From: Sagar Date: Fri, 19 Jan 2024 00:56:06 -0800 Subject: [PATCH 16/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4036053bb..9fcac85b6 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a + github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07 ) diff --git a/go.sum b/go.sum index 75482e699..ffe223331 100644 --- a/go.sum +++ b/go.sum @@ -317,6 +317,8 @@ github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce h1:Sv60tWjuBiLuvb00 github.com/vmware/alb-sdk v0.0.0-20240116051345-a6f48f1326ce/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a h1:RhAToMxGqXnKM3uwB8iSfFvSnYBiRs6LUBnpfvpHz6I= github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07 h1:MI0TN9IrDm0PQF5WJZS8+ZS3rQmlqNOLIRYKHL/qtqU= +github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 7d304a4c5217a7173ad9e9c4129855f011aa7c0f Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 22 Jan 2024 00:53:30 -0800 Subject: [PATCH 17/22] Updated assets for terraform Signed-off-by: Sagar --- avi/resource_avi_applicationprofile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avi/resource_avi_applicationprofile.go b/avi/resource_avi_applicationprofile.go index 4b1e289a5..666067676 100644 --- a/avi/resource_avi_applicationprofile.go +++ b/avi/resource_avi_applicationprofile.go @@ -78,7 +78,7 @@ func ResourceApplicationProfileSchema() map[string]*schema.Schema { "preserve_client_port": { Type: schema.TypeString, Optional: true, - Default: "false", + Computed: true, ValidateFunc: validateBool, }, "preserve_dest_ip_port": { From bd874774080406b4973492b87cb82152e7679e64 Mon Sep 17 00:00:00 2001 From: Sagar Date: Tue, 23 Jan 2024 07:18:36 +0000 Subject: [PATCH 18/22] Re Formated the code --- avi/data_source_avi_customipamdnsprofile_test.go | 2 +- avi/data_source_avi_dnspolicy_test.go | 2 +- avi/data_source_avi_ipaddrgroup_test.go | 2 +- avi/data_source_avi_ipamdnsproviderprofile_test.go | 2 +- avi/datasource_avi_customipamdnsprofile.go | 2 +- avi/datasource_avi_dnspolicy.go | 2 +- avi/datasource_avi_dynamicdnsrecord.go | 2 +- avi/datasource_avi_ipaddrgroup.go | 2 +- avi/datasource_avi_ipamdnsproviderprofile.go | 2 +- avi/resource_avi_customipamdnsprofile.go | 14 +++++++------- avi/resource_avi_customipamdnsprofile_test.go | 8 ++++---- avi/resource_avi_dnspolicy.go | 14 +++++++------- avi/resource_avi_dnspolicy_test.go | 8 ++++---- avi/resource_avi_dynamicdnsrecord.go | 14 +++++++------- avi/resource_avi_ipaddrgroup.go | 14 +++++++------- avi/resource_avi_ipaddrgroup_test.go | 8 ++++---- avi/resource_avi_ipamdnsproviderprofile.go | 14 +++++++------- avi/resource_avi_ipamdnsproviderprofile_test.go | 8 ++++---- 18 files changed, 60 insertions(+), 60 deletions(-) diff --git a/avi/data_source_avi_customipamdnsprofile_test.go b/avi/data_source_avi_customipamdnsprofile_test.go index a5e398f01..ecd7cd3f1 100644 --- a/avi/data_source_avi_customipamdnsprofile_test.go +++ b/avi/data_source_avi_customipamdnsprofile_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceCustomIpamDnsProfileBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSCustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_dnspolicy_test.go b/avi/data_source_avi_dnspolicy_test.go index ab54f500f..1d4800d58 100644 --- a/avi/data_source_avi_dnspolicy_test.go +++ b/avi/data_source_avi_dnspolicy_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceDnsPolicyBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipaddrgroup_test.go b/avi/data_source_avi_ipaddrgroup_test.go index d33d34b98..c3e1901c1 100644 --- a/avi/data_source_avi_ipaddrgroup_test.go +++ b/avi/data_source_avi_ipaddrgroup_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceIpAddrGroupBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipamdnsproviderprofile_test.go b/avi/data_source_avi_ipamdnsproviderprofile_test.go index 342402295..c46e3b5f9 100644 --- a/avi/data_source_avi_ipamdnsproviderprofile_test.go +++ b/avi/data_source_avi_ipamdnsproviderprofile_test.go @@ -28,7 +28,7 @@ func TestAVIDataSourceIpamDnsProviderProfileBasic(t *testing.T) { } -//nolint +// nolint const testAccAVIDSIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/datasource_avi_customipamdnsprofile.go b/avi/datasource_avi_customipamdnsprofile.go index ed7cbd662..d175a6834 100644 --- a/avi/datasource_avi_customipamdnsprofile.go +++ b/avi/datasource_avi_customipamdnsprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviCustomIpamDnsProfileRead, diff --git a/avi/datasource_avi_dnspolicy.go b/avi/datasource_avi_dnspolicy.go index 4783b701d..8c59317fa 100644 --- a/avi/datasource_avi_dnspolicy.go +++ b/avi/datasource_avi_dnspolicy.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Read: ResourceAviDnsPolicyRead, diff --git a/avi/datasource_avi_dynamicdnsrecord.go b/avi/datasource_avi_dynamicdnsrecord.go index 153828d78..22c828a69 100644 --- a/avi/datasource_avi_dynamicdnsrecord.go +++ b/avi/datasource_avi_dynamicdnsrecord.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Read: ResourceAviDynamicDnsRecordRead, diff --git a/avi/datasource_avi_ipaddrgroup.go b/avi/datasource_avi_ipaddrgroup.go index 8eace16a2..523a0f4a7 100644 --- a/avi/datasource_avi_ipaddrgroup.go +++ b/avi/datasource_avi_ipaddrgroup.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpAddrGroupRead, diff --git a/avi/datasource_avi_ipamdnsproviderprofile.go b/avi/datasource_avi_ipamdnsproviderprofile.go index de9274f1a..e6e92da91 100644 --- a/avi/datasource_avi_ipamdnsproviderprofile.go +++ b/avi/datasource_avi_ipamdnsproviderprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -//nolint +// nolint func dataSourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpamDnsProviderProfileRead, diff --git a/avi/resource_avi_customipamdnsprofile.go b/avi/resource_avi_customipamdnsprofile.go index 9d56c3315..dcb1be529 100644 --- a/avi/resource_avi_customipamdnsprofile.go +++ b/avi/resource_avi_customipamdnsprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -43,7 +43,7 @@ func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviCustomIpamDnsProfileCreate, @@ -57,13 +57,13 @@ func resourceAviCustomIpamDnsProfile() *schema.Resource { } } -//nolint +// nolint func ResourceCustomIpamDnsProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceCustomIpamDnsProfileSchema() return ResourceImporter(d, m, "customipamdnsprofile", s) } -//nolint +// nolint func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APIRead(d, meta, "customipamdnsprofile", s) @@ -73,7 +73,7 @@ func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{ return err } -//nolint +// nolint func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APICreateOrUpdate(d, meta, "customipamdnsprofile", s) @@ -83,7 +83,7 @@ func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interfac return err } -//nolint +// nolint func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() var err error @@ -94,7 +94,7 @@ func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interfac return err } -//nolint +// nolint func resourceAviCustomIpamDnsProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_customipamdnsprofile_test.go b/avi/resource_avi_customipamdnsprofile_test.go index 409a14fff..3c1acb491 100644 --- a/avi/resource_avi_customipamdnsprofile_test.go +++ b/avi/resource_avi_customipamdnsprofile_test.go @@ -43,7 +43,7 @@ func TestAVICustomIpamDnsProfileBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.Tes } -//nolint +// nolint func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVICustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_customipamdnsprofile" "testCustomIpamDnsProfile" { } ` -//nolint +// nolint const testAccAVICustomIpamDnsProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dnspolicy.go b/avi/resource_avi_dnspolicy.go index 7d1a58152..ff4fec895 100644 --- a/avi/resource_avi_dnspolicy.go +++ b/avi/resource_avi_dnspolicy.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceDnsPolicySchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -60,7 +60,7 @@ func ResourceDnsPolicySchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Create: resourceAviDnsPolicyCreate, @@ -74,13 +74,13 @@ func resourceAviDnsPolicy() *schema.Resource { } } -//nolint +// nolint func ResourceDnsPolicyImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDnsPolicySchema() return ResourceImporter(d, m, "dnspolicy", s) } -//nolint +// nolint func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APIRead(d, meta, "dnspolicy", s) @@ -90,7 +90,7 @@ func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { return err } -//nolint +// nolint func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APICreateOrUpdate(d, meta, "dnspolicy", s) @@ -100,7 +100,7 @@ func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error return err } -//nolint +// nolint func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() var err error @@ -111,7 +111,7 @@ func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error return err } -//nolint +// nolint func resourceAviDnsPolicyDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_dnspolicy_test.go b/avi/resource_avi_dnspolicy_test.go index ca7694dd8..d070de8de 100644 --- a/avi/resource_avi_dnspolicy_test.go +++ b/avi/resource_avi_dnspolicy_test.go @@ -43,7 +43,7 @@ func TestAVIDnsPolicyBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc } -//nolint +// nolint func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVIDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_dnspolicy" "testDnsPolicy" { } ` -//nolint +// nolint const testAccAVIDnsPolicyupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dynamicdnsrecord.go b/avi/resource_avi_dynamicdnsrecord.go index 306ec328e..439ee9f80 100644 --- a/avi/resource_avi_dynamicdnsrecord.go +++ b/avi/resource_avi_dynamicdnsrecord.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "algorithm": { @@ -119,7 +119,7 @@ func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Create: resourceAviDynamicDnsRecordCreate, @@ -133,13 +133,13 @@ func resourceAviDynamicDnsRecord() *schema.Resource { } } -//nolint +// nolint func ResourceDynamicDnsRecordImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDynamicDnsRecordSchema() return ResourceImporter(d, m, "dynamicdnsrecord", s) } -//nolint +// nolint func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APIRead(d, meta, "dynamicdnsrecord", s) @@ -149,7 +149,7 @@ func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) e return err } -//nolint +// nolint func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APICreateOrUpdate(d, meta, "dynamicdnsrecord", s) @@ -159,7 +159,7 @@ func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) return err } -//nolint +// nolint func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() var err error @@ -170,7 +170,7 @@ func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) return err } -//nolint +// nolint func resourceAviDynamicDnsRecordDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup.go b/avi/resource_avi_ipaddrgroup.go index f5429ca75..328c65429 100644 --- a/avi/resource_avi_ipaddrgroup.go +++ b/avi/resource_avi_ipaddrgroup.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceIpAddrGroupSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "addrs": { @@ -80,7 +80,7 @@ func ResourceIpAddrGroupSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Create: resourceAviIpAddrGroupCreate, @@ -94,13 +94,13 @@ func resourceAviIpAddrGroup() *schema.Resource { } } -//nolint +// nolint func ResourceIpAddrGroupImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpAddrGroupSchema() return ResourceImporter(d, m, "ipaddrgroup", s) } -//nolint +// nolint func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APIRead(d, meta, "ipaddrgroup", s) @@ -110,7 +110,7 @@ func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error return err } -//nolint +// nolint func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APICreateOrUpdate(d, meta, "ipaddrgroup", s) @@ -120,7 +120,7 @@ func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) erro return err } -//nolint +// nolint func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() var err error @@ -131,7 +131,7 @@ func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) erro return err } -//nolint +// nolint func resourceAviIpAddrGroupDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup_test.go b/avi/resource_avi_ipaddrgroup_test.go index 0d7d99c0e..3609b932d 100644 --- a/avi/resource_avi_ipaddrgroup_test.go +++ b/avi/resource_avi_ipaddrgroup_test.go @@ -43,7 +43,7 @@ func TestAVIIpAddrGroupBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFun } -//nolint +// nolint func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVIIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -124,7 +124,7 @@ prefixes { } ` -//nolint +// nolint const testAccAVIIpAddrGroupupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_ipamdnsproviderprofile.go b/avi/resource_avi_ipamdnsproviderprofile.go index ee85e487d..35512c4e8 100644 --- a/avi/resource_avi_ipamdnsproviderprofile.go +++ b/avi/resource_avi_ipamdnsproviderprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -//nolint +// nolint func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "allocate_ip_in_vrf": { @@ -109,7 +109,7 @@ func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { } } -//nolint +// nolint func resourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviIpamDnsProviderProfileCreate, @@ -123,13 +123,13 @@ func resourceAviIpamDnsProviderProfile() *schema.Resource { } } -//nolint +// nolint func ResourceIpamDnsProviderProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpamDnsProviderProfileSchema() return ResourceImporter(d, m, "ipamdnsproviderprofile", s) } -//nolint +// nolint func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APIRead(d, meta, "ipamdnsproviderprofile", s) @@ -139,7 +139,7 @@ func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interfac return err } -//nolint +// nolint func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APICreateOrUpdate(d, meta, "ipamdnsproviderprofile", s) @@ -149,7 +149,7 @@ func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interf return err } -//nolint +// nolint func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() var err error @@ -160,7 +160,7 @@ func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interf return err } -//nolint +// nolint func resourceAviIpamDnsProviderProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipamdnsproviderprofile_test.go b/avi/resource_avi_ipamdnsproviderprofile_test.go index 6008064a5..b4230a33e 100644 --- a/avi/resource_avi_ipamdnsproviderprofile_test.go +++ b/avi/resource_avi_ipamdnsproviderprofile_test.go @@ -47,7 +47,7 @@ func TestAVIIpamDnsProviderProfileBasic(t *testing.T) { } -//nolint +// nolint func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -71,7 +71,7 @@ func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.T } -//nolint +// nolint func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -96,7 +96,7 @@ func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { return nil } -//nolint +// nolint const testAccAVIIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -112,7 +112,7 @@ resource "avi_ipamdnsproviderprofile" "testIpamDnsProviderProfile" { } ` -//nolint +// nolint const testAccAVIIpamDnsProviderProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" From 680ef192709ccf6fb63f54ae17db2865d409bf6a Mon Sep 17 00:00:00 2001 From: Sagar Date: Wed, 24 Jan 2024 00:55:27 -0800 Subject: [PATCH 19/22] Updated assets for terraform Signed-off-by: Sagar --- ...ta_source_avi_customipamdnsprofile_test.go | 2 +- avi/data_source_avi_dnspolicy_test.go | 2 +- avi/data_source_avi_ipaddrgroup_test.go | 2 +- ..._source_avi_ipamdnsproviderprofile_test.go | 2 +- avi/datasource_avi_controllerproperties.go | 4 + avi/datasource_avi_customipamdnsprofile.go | 2 +- avi/datasource_avi_dnspolicy.go | 2 +- avi/datasource_avi_dynamicdnsrecord.go | 2 +- avi/datasource_avi_ipaddrgroup.go | 2 +- avi/datasource_avi_ipamdnsproviderprofile.go | 2 +- avi/datasource_avi_systemreport.go | 69 ++++++ avi/datasource_avi_upgradestatusinfo.go | 5 + avi/provider.go | 2 + avi/resource_avi_controllerproperties.go | 6 + avi/resource_avi_customipamdnsprofile.go | 14 +- avi/resource_avi_customipamdnsprofile_test.go | 8 +- avi/resource_avi_dnspolicy.go | 14 +- avi/resource_avi_dnspolicy_test.go | 8 +- avi/resource_avi_dynamicdnsrecord.go | 14 +- avi/resource_avi_ipaddrgroup.go | 14 +- avi/resource_avi_ipaddrgroup_test.go | 8 +- avi/resource_avi_ipamdnsproviderprofile.go | 14 +- ...esource_avi_ipamdnsproviderprofile_test.go | 8 +- avi/resource_avi_rest_dependants.go | 200 ++++++++++++++++++ avi/resource_avi_systemreport.go | 135 ++++++++++++ avi/resource_avi_upgradestatusinfo.go | 5 + website/avi.erb | 6 + .../d/avi_controllerproperties.html.markdown | 1 + website/docs/d/avi_systemreport.html.markdown | 47 ++++ .../d/avi_upgradestatusinfo.html.markdown | 1 + .../r/avi_controllerproperties.html.markdown | 1 + website/docs/r/avi_systemreport.html.markdown | 56 +++++ .../r/avi_upgradestatusinfo.html.markdown | 1 + 33 files changed, 599 insertions(+), 60 deletions(-) create mode 100644 avi/datasource_avi_systemreport.go create mode 100644 avi/resource_avi_systemreport.go create mode 100644 website/docs/d/avi_systemreport.html.markdown create mode 100644 website/docs/r/avi_systemreport.html.markdown diff --git a/avi/data_source_avi_customipamdnsprofile_test.go b/avi/data_source_avi_customipamdnsprofile_test.go index ecd7cd3f1..a5e398f01 100644 --- a/avi/data_source_avi_customipamdnsprofile_test.go +++ b/avi/data_source_avi_customipamdnsprofile_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceCustomIpamDnsProfileBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSCustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_dnspolicy_test.go b/avi/data_source_avi_dnspolicy_test.go index 1d4800d58..ab54f500f 100644 --- a/avi/data_source_avi_dnspolicy_test.go +++ b/avi/data_source_avi_dnspolicy_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceDnsPolicyBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipaddrgroup_test.go b/avi/data_source_avi_ipaddrgroup_test.go index c3e1901c1..d33d34b98 100644 --- a/avi/data_source_avi_ipaddrgroup_test.go +++ b/avi/data_source_avi_ipaddrgroup_test.go @@ -26,7 +26,7 @@ func TestAVIDataSourceIpAddrGroupBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/data_source_avi_ipamdnsproviderprofile_test.go b/avi/data_source_avi_ipamdnsproviderprofile_test.go index c46e3b5f9..342402295 100644 --- a/avi/data_source_avi_ipamdnsproviderprofile_test.go +++ b/avi/data_source_avi_ipamdnsproviderprofile_test.go @@ -28,7 +28,7 @@ func TestAVIDataSourceIpamDnsProviderProfileBasic(t *testing.T) { } -// nolint +//nolint const testAccAVIDSIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/datasource_avi_controllerproperties.go b/avi/datasource_avi_controllerproperties.go index ea3422503..1b00b6fce 100644 --- a/avi/datasource_avi_controllerproperties.go +++ b/avi/datasource_avi_controllerproperties.go @@ -324,6 +324,10 @@ func dataSourceAviControllerProperties() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeInt}, }, + "system_report_limit": { + Type: schema.TypeString, + Computed: true, + }, "unresponsive_se_reboot": { Type: schema.TypeString, Computed: true, diff --git a/avi/datasource_avi_customipamdnsprofile.go b/avi/datasource_avi_customipamdnsprofile.go index d175a6834..ed7cbd662 100644 --- a/avi/datasource_avi_customipamdnsprofile.go +++ b/avi/datasource_avi_customipamdnsprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviCustomIpamDnsProfileRead, diff --git a/avi/datasource_avi_dnspolicy.go b/avi/datasource_avi_dnspolicy.go index 8c59317fa..4783b701d 100644 --- a/avi/datasource_avi_dnspolicy.go +++ b/avi/datasource_avi_dnspolicy.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Read: ResourceAviDnsPolicyRead, diff --git a/avi/datasource_avi_dynamicdnsrecord.go b/avi/datasource_avi_dynamicdnsrecord.go index 22c828a69..153828d78 100644 --- a/avi/datasource_avi_dynamicdnsrecord.go +++ b/avi/datasource_avi_dynamicdnsrecord.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Read: ResourceAviDynamicDnsRecordRead, diff --git a/avi/datasource_avi_ipaddrgroup.go b/avi/datasource_avi_ipaddrgroup.go index 523a0f4a7..8eace16a2 100644 --- a/avi/datasource_avi_ipaddrgroup.go +++ b/avi/datasource_avi_ipaddrgroup.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpAddrGroupRead, diff --git a/avi/datasource_avi_ipamdnsproviderprofile.go b/avi/datasource_avi_ipamdnsproviderprofile.go index e6e92da91..de9274f1a 100644 --- a/avi/datasource_avi_ipamdnsproviderprofile.go +++ b/avi/datasource_avi_ipamdnsproviderprofile.go @@ -5,7 +5,7 @@ package avi import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -// nolint +//nolint func dataSourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Read: ResourceAviIpamDnsProviderProfileRead, diff --git a/avi/datasource_avi_systemreport.go b/avi/datasource_avi_systemreport.go new file mode 100644 index 000000000..52cbb4fb5 --- /dev/null +++ b/avi/datasource_avi_systemreport.go @@ -0,0 +1,69 @@ +// 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 dataSourceAviSystemReport() *schema.Resource { + return &schema.Resource{ + Read: ResourceAviSystemReportRead, + Schema: map[string]*schema.Schema{ + "archive_ref": { + Type: schema.TypeString, + Computed: true, + }, + "controller_patch_image_ref": { + Type: schema.TypeString, + Computed: true, + }, + "downloadable": { + Type: schema.TypeString, + Computed: true, + }, + "events": { + Type: schema.TypeList, + Computed: true, + Elem: ResourceReportEventSchema(), + }, + "image_ref": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "readiness_reports": { + Type: schema.TypeList, + Computed: true, + Elem: ResourceReportDetailSchema(), + }, + "se_patch_image_ref": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceReportOpsStateSchema(), + }, + "summary": { + Type: schema.TypeSet, + Computed: true, + Elem: ResourceReportSummarySchema(), + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} diff --git a/avi/datasource_avi_upgradestatusinfo.go b/avi/datasource_avi_upgradestatusinfo.go index ece7a2713..b561e94e3 100644 --- a/avi/datasource_avi_upgradestatusinfo.go +++ b/avi/datasource_avi_upgradestatusinfo.go @@ -174,6 +174,11 @@ func dataSourceAviUpgradeStatusInfo() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "system_report_refs": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "tasks_completed": { Type: schema.TypeString, Computed: true, diff --git a/avi/provider.go b/avi/provider.go index ffc2c6ee3..3ff5f0efa 100644 --- a/avi/provider.go +++ b/avi/provider.go @@ -85,6 +85,7 @@ func Provider() *schema.Provider { "avi_upgradestatussummary": dataSourceAviUpgradeStatusSummary(), "avi_licenseledgerdetails": dataSourceAviLicenseLedgerDetails(), "avi_ssopolicy": dataSourceAviSSOPolicy(), + "avi_systemreport": dataSourceAviSystemReport(), "avi_authprofile": dataSourceAviAuthProfile(), "avi_authmappingprofile": dataSourceAviAuthMappingProfile(), "avi_controllerproperties": dataSourceAviControllerProperties(), @@ -200,6 +201,7 @@ func Provider() *schema.Provider { "avi_upgradestatussummary": resourceAviUpgradeStatusSummary(), "avi_licenseledgerdetails": resourceAviLicenseLedgerDetails(), "avi_ssopolicy": resourceAviSSOPolicy(), + "avi_systemreport": resourceAviSystemReport(), "avi_authprofile": resourceAviAuthProfile(), "avi_authmappingprofile": resourceAviAuthMappingProfile(), "avi_controllerproperties": resourceAviControllerProperties(), diff --git a/avi/resource_avi_controllerproperties.go b/avi/resource_avi_controllerproperties.go index 6ae365f50..244d5b251 100644 --- a/avi/resource_avi_controllerproperties.go +++ b/avi/resource_avi_controllerproperties.go @@ -476,6 +476,12 @@ func ResourceControllerPropertiesSchema() map[string]*schema.Schema { Optional: true, Elem: &schema.Schema{Type: schema.TypeInt}, }, + "system_report_limit": { + Type: schema.TypeString, + Optional: true, + Default: "10", + ValidateFunc: validateInteger, + }, "unresponsive_se_reboot": { Type: schema.TypeString, Optional: true, diff --git a/avi/resource_avi_customipamdnsprofile.go b/avi/resource_avi_customipamdnsprofile.go index dcb1be529..9d56c3315 100644 --- a/avi/resource_avi_customipamdnsprofile.go +++ b/avi/resource_avi_customipamdnsprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -43,7 +43,7 @@ func ResourceCustomIpamDnsProfileSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviCustomIpamDnsProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviCustomIpamDnsProfileCreate, @@ -57,13 +57,13 @@ func resourceAviCustomIpamDnsProfile() *schema.Resource { } } -// nolint +//nolint func ResourceCustomIpamDnsProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceCustomIpamDnsProfileSchema() return ResourceImporter(d, m, "customipamdnsprofile", s) } -// nolint +//nolint func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APIRead(d, meta, "customipamdnsprofile", s) @@ -73,7 +73,7 @@ func ResourceAviCustomIpamDnsProfileRead(d *schema.ResourceData, meta interface{ return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() err := APICreateOrUpdate(d, meta, "customipamdnsprofile", s) @@ -83,7 +83,7 @@ func resourceAviCustomIpamDnsProfileCreate(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceCustomIpamDnsProfileSchema() var err error @@ -94,7 +94,7 @@ func resourceAviCustomIpamDnsProfileUpdate(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviCustomIpamDnsProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_customipamdnsprofile_test.go b/avi/resource_avi_customipamdnsprofile_test.go index 3c1acb491..409a14fff 100644 --- a/avi/resource_avi_customipamdnsprofile_test.go +++ b/avi/resource_avi_customipamdnsprofile_test.go @@ -43,7 +43,7 @@ func TestAVICustomIpamDnsProfileBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVICustomIpamDnsProfileExists(resourcename string) resource.Tes } -// nolint +//nolint func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVICustomIpamDnsProfileDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVICustomIpamDnsProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_customipamdnsprofile" "testCustomIpamDnsProfile" { } ` -// nolint +//nolint const testAccAVICustomIpamDnsProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dnspolicy.go b/avi/resource_avi_dnspolicy.go index ff4fec895..7d1a58152 100644 --- a/avi/resource_avi_dnspolicy.go +++ b/avi/resource_avi_dnspolicy.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceDnsPolicySchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "configpb_attributes": { @@ -60,7 +60,7 @@ func ResourceDnsPolicySchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviDnsPolicy() *schema.Resource { return &schema.Resource{ Create: resourceAviDnsPolicyCreate, @@ -74,13 +74,13 @@ func resourceAviDnsPolicy() *schema.Resource { } } -// nolint +//nolint func ResourceDnsPolicyImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDnsPolicySchema() return ResourceImporter(d, m, "dnspolicy", s) } -// nolint +//nolint func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APIRead(d, meta, "dnspolicy", s) @@ -90,7 +90,7 @@ func ResourceAviDnsPolicyRead(d *schema.ResourceData, meta interface{}) error { return err } -// nolint +//nolint func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() err := APICreateOrUpdate(d, meta, "dnspolicy", s) @@ -100,7 +100,7 @@ func resourceAviDnsPolicyCreate(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDnsPolicySchema() var err error @@ -111,7 +111,7 @@ func resourceAviDnsPolicyUpdate(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviDnsPolicyDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_dnspolicy_test.go b/avi/resource_avi_dnspolicy_test.go index d070de8de..ca7694dd8 100644 --- a/avi/resource_avi_dnspolicy_test.go +++ b/avi/resource_avi_dnspolicy_test.go @@ -43,7 +43,7 @@ func TestAVIDnsPolicyBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIDnsPolicyExists(resourcename string) resource.TestCheckFunc } -// nolint +//nolint func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIDnsPolicyDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIDnsPolicyConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -104,7 +104,7 @@ resource "avi_dnspolicy" "testDnsPolicy" { } ` -// nolint +//nolint const testAccAVIDnsPolicyupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_dynamicdnsrecord.go b/avi/resource_avi_dynamicdnsrecord.go index 439ee9f80..306ec328e 100644 --- a/avi/resource_avi_dynamicdnsrecord.go +++ b/avi/resource_avi_dynamicdnsrecord.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "algorithm": { @@ -119,7 +119,7 @@ func ResourceDynamicDnsRecordSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviDynamicDnsRecord() *schema.Resource { return &schema.Resource{ Create: resourceAviDynamicDnsRecordCreate, @@ -133,13 +133,13 @@ func resourceAviDynamicDnsRecord() *schema.Resource { } } -// nolint +//nolint func ResourceDynamicDnsRecordImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceDynamicDnsRecordSchema() return ResourceImporter(d, m, "dynamicdnsrecord", s) } -// nolint +//nolint func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APIRead(d, meta, "dynamicdnsrecord", s) @@ -149,7 +149,7 @@ func ResourceAviDynamicDnsRecordRead(d *schema.ResourceData, meta interface{}) e return err } -// nolint +//nolint func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() err := APICreateOrUpdate(d, meta, "dynamicdnsrecord", s) @@ -159,7 +159,7 @@ func resourceAviDynamicDnsRecordCreate(d *schema.ResourceData, meta interface{}) return err } -// nolint +//nolint func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceDynamicDnsRecordSchema() var err error @@ -170,7 +170,7 @@ func resourceAviDynamicDnsRecordUpdate(d *schema.ResourceData, meta interface{}) return err } -// nolint +//nolint func resourceAviDynamicDnsRecordDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup.go b/avi/resource_avi_ipaddrgroup.go index 328c65429..f5429ca75 100644 --- a/avi/resource_avi_ipaddrgroup.go +++ b/avi/resource_avi_ipaddrgroup.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceIpAddrGroupSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "addrs": { @@ -80,7 +80,7 @@ func ResourceIpAddrGroupSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviIpAddrGroup() *schema.Resource { return &schema.Resource{ Create: resourceAviIpAddrGroupCreate, @@ -94,13 +94,13 @@ func resourceAviIpAddrGroup() *schema.Resource { } } -// nolint +//nolint func ResourceIpAddrGroupImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpAddrGroupSchema() return ResourceImporter(d, m, "ipaddrgroup", s) } -// nolint +//nolint func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APIRead(d, meta, "ipaddrgroup", s) @@ -110,7 +110,7 @@ func ResourceAviIpAddrGroupRead(d *schema.ResourceData, meta interface{}) error return err } -// nolint +//nolint func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() err := APICreateOrUpdate(d, meta, "ipaddrgroup", s) @@ -120,7 +120,7 @@ func resourceAviIpAddrGroupCreate(d *schema.ResourceData, meta interface{}) erro return err } -// nolint +//nolint func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpAddrGroupSchema() var err error @@ -131,7 +131,7 @@ func resourceAviIpAddrGroupUpdate(d *schema.ResourceData, meta interface{}) erro return err } -// nolint +//nolint func resourceAviIpAddrGroupDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipaddrgroup_test.go b/avi/resource_avi_ipaddrgroup_test.go index 3609b932d..0d7d99c0e 100644 --- a/avi/resource_avi_ipaddrgroup_test.go +++ b/avi/resource_avi_ipaddrgroup_test.go @@ -43,7 +43,7 @@ func TestAVIIpAddrGroupBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -67,7 +67,7 @@ func testAccCheckAVIIpAddrGroupExists(resourcename string) resource.TestCheckFun } -// nolint +//nolint func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -92,7 +92,7 @@ func testAccCheckAVIIpAddrGroupDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIIpAddrGroupConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -124,7 +124,7 @@ prefixes { } ` -// nolint +//nolint const testAccAVIIpAddrGroupupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_ipamdnsproviderprofile.go b/avi/resource_avi_ipamdnsproviderprofile.go index 35512c4e8..ee85e487d 100644 --- a/avi/resource_avi_ipamdnsproviderprofile.go +++ b/avi/resource_avi_ipamdnsproviderprofile.go @@ -8,7 +8,7 @@ import ( "log" ) -// nolint +//nolint func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "allocate_ip_in_vrf": { @@ -109,7 +109,7 @@ func ResourceIpamDnsProviderProfileSchema() map[string]*schema.Schema { } } -// nolint +//nolint func resourceAviIpamDnsProviderProfile() *schema.Resource { return &schema.Resource{ Create: resourceAviIpamDnsProviderProfileCreate, @@ -123,13 +123,13 @@ func resourceAviIpamDnsProviderProfile() *schema.Resource { } } -// nolint +//nolint func ResourceIpamDnsProviderProfileImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { s := ResourceIpamDnsProviderProfileSchema() return ResourceImporter(d, m, "ipamdnsproviderprofile", s) } -// nolint +//nolint func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APIRead(d, meta, "ipamdnsproviderprofile", s) @@ -139,7 +139,7 @@ func ResourceAviIpamDnsProviderProfileRead(d *schema.ResourceData, meta interfac return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() err := APICreateOrUpdate(d, meta, "ipamdnsproviderprofile", s) @@ -149,7 +149,7 @@ func resourceAviIpamDnsProviderProfileCreate(d *schema.ResourceData, meta interf return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interface{}) error { s := ResourceIpamDnsProviderProfileSchema() var err error @@ -160,7 +160,7 @@ func resourceAviIpamDnsProviderProfileUpdate(d *schema.ResourceData, meta interf return err } -// nolint +//nolint func resourceAviIpamDnsProviderProfileDelete(d *schema.ResourceData, meta interface{}) error { var err error if APIDeleteSystemDefaultCheck(d) { diff --git a/avi/resource_avi_ipamdnsproviderprofile_test.go b/avi/resource_avi_ipamdnsproviderprofile_test.go index b4230a33e..6008064a5 100644 --- a/avi/resource_avi_ipamdnsproviderprofile_test.go +++ b/avi/resource_avi_ipamdnsproviderprofile_test.go @@ -47,7 +47,7 @@ func TestAVIIpamDnsProviderProfileBasic(t *testing.T) { } -// nolint +//nolint func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession @@ -71,7 +71,7 @@ func testAccCheckAVIIpamDnsProviderProfileExists(resourcename string) resource.T } -// nolint +//nolint func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*clients.AviClient).AviSession var obj interface{} @@ -96,7 +96,7 @@ func testAccCheckAVIIpamDnsProviderProfileDestroy(s *terraform.State) error { return nil } -// nolint +//nolint const testAccAVIIpamDnsProviderProfileConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" @@ -112,7 +112,7 @@ resource "avi_ipamdnsproviderprofile" "testIpamDnsProviderProfile" { } ` -// nolint +//nolint const testAccAVIIpamDnsProviderProfileupdatedConfig = ` data "avi_tenant" "default_tenant"{ name= "admin" diff --git a/avi/resource_avi_rest_dependants.go b/avi/resource_avi_rest_dependants.go index a7068411c..9d8cbf69c 100644 --- a/avi/resource_avi_rest_dependants.go +++ b/avi/resource_avi_rest_dependants.go @@ -24429,6 +24429,12 @@ func ResourcePatchControllerParamsSchema() *schema.Resource { Type: schema.TypeString, Required: true, }, + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "skip_warnings": { Type: schema.TypeString, Optional: true, @@ -24487,6 +24493,12 @@ func ResourcePatchInfoSchema() *schema.Resource { func ResourcePatchSeGroupParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -24520,6 +24532,12 @@ func ResourcePatchSystemParamsSchema() *schema.Resource { Type: schema.TypeString, Required: true, }, + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -25755,6 +25773,122 @@ func ResourceReplicationPolicySchema() *schema.Resource { } } +func ResourceReportDetailSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "node_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "node_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "obj_cloud_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "system_readiness": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceUpgradeReadinessCheckObjSchema(), + }, + }, + } +} + +func ResourceReportEventSchema() *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, + }, + "event_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "messages": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "start_time": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + +func ResourceReportOpsStateSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "last_changed_time": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceTimeStampSchema(), + }, + "reason": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + +func ResourceReportSummarySchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "previews": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "title": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + func ResourceResponseMatchTargetSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -25847,6 +25981,12 @@ func ResourceResponseMatchTargetSchema() *schema.Resource { func ResourceResumeSeGroupParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -26385,6 +26525,12 @@ func ResourceRoleMatchOperationMatchLabelSchema() *schema.Resource { func ResourceRollbackControllerParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "skip_warnings": { Type: schema.TypeString, Optional: true, @@ -26398,6 +26544,12 @@ func ResourceRollbackControllerParamsSchema() *schema.Resource { func ResourceRollbackPatchControllerParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "skip_warnings": { Type: schema.TypeString, Optional: true, @@ -26411,6 +26563,12 @@ func ResourceRollbackPatchControllerParamsSchema() *schema.Resource { func ResourceRollbackPatchSeGroupParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -26435,6 +26593,12 @@ func ResourceRollbackPatchSeGroupParamsSchema() *schema.Resource { func ResourceRollbackPatchSystemParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -26454,6 +26618,12 @@ func ResourceRollbackPatchSystemParamsSchema() *schema.Resource { func ResourceRollbackSeGroupParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -26478,6 +26648,12 @@ func ResourceRollbackSeGroupParamsSchema() *schema.Resource { func ResourceRollbackSystemParamsSchema() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -33759,6 +33935,12 @@ func ResourceUpgradeControllerParamsSchema() *schema.Resource { Type: schema.TypeString, Required: true, }, + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "skip_warnings": { Type: schema.TypeString, Optional: true, @@ -33934,6 +34116,12 @@ func ResourceUpgradeParamsSchema() *schema.Resource { Optional: true, Computed: true, }, + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -34034,6 +34222,12 @@ func ResourceUpgradeSeGroupParamsSchema() *schema.Resource { Type: schema.TypeString, Required: true, }, + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, @@ -34072,6 +34266,12 @@ func ResourceUpgradeSystemParamsSchema() *schema.Resource { Type: schema.TypeString, Required: true, }, + "prechecks_only": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, "se_group_options": { Type: schema.TypeSet, Optional: true, diff --git a/avi/resource_avi_systemreport.go b/avi/resource_avi_systemreport.go new file mode 100644 index 000000000..ed2c14bfb --- /dev/null +++ b/avi/resource_avi_systemreport.go @@ -0,0 +1,135 @@ +// Copyright 2019 VMware, Inc. +// SPDX-License-Identifier: Mozilla Public License 2.0 + +package avi + +import ( + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" +) + +func ResourceSystemReportSchema() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "archive_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "controller_patch_image_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "downloadable": { + Type: schema.TypeString, + Optional: true, + Default: "false", + ValidateFunc: validateBool, + }, + "events": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceReportEventSchema(), + }, + "image_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "readiness_reports": { + Type: schema.TypeList, + Optional: true, + Elem: ResourceReportDetailSchema(), + }, + "se_patch_image_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "state": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceReportOpsStateSchema(), + }, + "summary": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: ResourceReportSummarySchema(), + }, + "tenant_ref": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "uuid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + } +} + +func resourceAviSystemReport() *schema.Resource { + return &schema.Resource{ + Create: resourceAviSystemReportCreate, + Read: ResourceAviSystemReportRead, + Update: resourceAviSystemReportUpdate, + Delete: resourceAviSystemReportDelete, + Schema: ResourceSystemReportSchema(), + Importer: &schema.ResourceImporter{ + State: ResourceSystemReportImporter, + }, + } +} + +func ResourceSystemReportImporter(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { + s := ResourceSystemReportSchema() + return ResourceImporter(d, m, "systemreport", s) +} + +func ResourceAviSystemReportRead(d *schema.ResourceData, meta interface{}) error { + s := ResourceSystemReportSchema() + err := APIRead(d, meta, "systemreport", s) + if err != nil { + log.Printf("[ERROR] in reading object %v\n", err) + } + return err +} + +func resourceAviSystemReportCreate(d *schema.ResourceData, meta interface{}) error { + s := ResourceSystemReportSchema() + err := APICreateOrUpdate(d, meta, "systemreport", s) + if err == nil { + err = ResourceAviSystemReportRead(d, meta) + } + return err +} + +func resourceAviSystemReportUpdate(d *schema.ResourceData, meta interface{}) error { + s := ResourceSystemReportSchema() + var err error + err = APICreateOrUpdate(d, meta, "systemreport", s) + if err == nil { + err = ResourceAviSystemReportRead(d, meta) + } + return err +} + +func resourceAviSystemReportDelete(d *schema.ResourceData, meta interface{}) error { + var err error + if APIDeleteSystemDefaultCheck(d) { + return nil + } + err = APIDelete(d, meta, "systemreport") + if err != nil { + log.Printf("[ERROR] in deleting object %v\n", err) + } + return err +} diff --git a/avi/resource_avi_upgradestatusinfo.go b/avi/resource_avi_upgradestatusinfo.go index cbd0e8320..102bffe7d 100644 --- a/avi/resource_avi_upgradestatusinfo.go +++ b/avi/resource_avi_upgradestatusinfo.go @@ -217,6 +217,11 @@ func ResourceUpgradeStatusInfoSchema() map[string]*schema.Schema { Computed: true, ValidateFunc: validateBool, }, + "system_report_refs": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "tasks_completed": { Type: schema.TypeString, Optional: true, diff --git a/website/avi.erb b/website/avi.erb index c225e3d75..b29712655 100644 --- a/website/avi.erb +++ b/website/avi.erb @@ -94,6 +94,9 @@ > SSOPolicy + + > + SystemReport > AuthProfile @@ -439,6 +442,9 @@ > SSOPolicy + + > + SystemReport > AuthProfile diff --git a/website/docs/d/avi_controllerproperties.html.markdown b/website/docs/d/avi_controllerproperties.html.markdown index 042a7bf3b..5721fab68 100644 --- a/website/docs/d/avi_controllerproperties.html.markdown +++ b/website/docs/d/avi_controllerproperties.html.markdown @@ -110,6 +110,7 @@ In addition to all arguments above, the following attributes are exported: * `seupgrade_segroup_min_dead_timeout` - Time to wait before marking segroup upgrade as stuck. Unit is sec. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `shared_ssl_certificates` - Ssl certificates in the admin tenant can be used in non-admin tenants. Field introduced in 18.2.5. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `ssl_certificate_expiry_warning_days` - Number of days for ssl certificate expiry warning. Unit is days. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `system_report_limit` - Number of systemreports retained in the system. Once the number of system reports exceed this threshold, the oldest systemreport will be removed and the latest one retained. I.e. The systemreport will be rotated and the reports don't exceed the threshold. Allowed values are 5-50. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `unresponsive_se_reboot` - Unit is sec. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `update_dns_entry_retry_limit` - Number of times to retry a dns entry update/delete operation. Field introduced in 21.1.4. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `update_dns_entry_timeout` - Timeout period for a dns entry update/delete operation. Field introduced in 21.1.4. Unit is sec. Allowed in enterprise edition with any value, enterprise with cloud services edition. diff --git a/website/docs/d/avi_systemreport.html.markdown b/website/docs/d/avi_systemreport.html.markdown new file mode 100644 index 000000000..d1ac60875 --- /dev/null +++ b/website/docs/d/avi_systemreport.html.markdown @@ -0,0 +1,47 @@ + +--- +layout: "avi" +page_title: "AVI: avi_systemreport" +sidebar_current: "docs-avi-datasource-systemreport" +description: |- + Get information of Avi SystemReport. +--- + +# avi_systemreport + +This data source is used to to get avi_systemreport objects. + +## Example Usage + +```hcl +data "avi_systemreport" "foo_systemreport" { + uuid = "systemreport-f9cf6b3e-a411-436f-95e2-2982ba2b217b" + name = "foo" +} +``` + +## Argument Reference + +* `name` - (Optional) Search SystemReport by name. +* `uuid` - (Optional) Search SystemReport by uuid. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `archive_ref` - Relative path to the report archive file on filesystem.the archive includes exported system configuration and current object as json. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `controller_patch_image_ref` - Controller patch image associated with the report. It is a reference to an object of type image. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `downloadable` - Indicates whether this report is downloadable as an archive. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `events` - List of events associated with the report. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `image_ref` - System image associated with the report. It is a reference to an object of type image. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `name` - Name of the report dervied from operation in a readable format. Ex upgrade_system_1a5c. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `readiness_reports` - Readiness state of the system. Ex upgrade pre-check results. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `se_patch_image_ref` - Se patch image associated with the report. It is a reference to an object of type image. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `state` - Report state combines all applicable states. Ex readiness_reports.system_readiness.state. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `summary` - Summary of the report. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `tenant_ref` - Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `uuid` - Uuid identifier for the report. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. + diff --git a/website/docs/d/avi_upgradestatusinfo.html.markdown b/website/docs/d/avi_upgradestatusinfo.html.markdown index 53f4705aa..211a7d0d1 100644 --- a/website/docs/d/avi_upgradestatusinfo.html.markdown +++ b/website/docs/d/avi_upgradestatusinfo.html.markdown @@ -71,6 +71,7 @@ In addition to all arguments above, the following attributes are exported: * `state` - Current status of the upgrade operation. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `statediff_ref` - Record of pre/post snapshot captured for current upgrade operation. It is a reference to an object of type statediffoperation. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `system` - Flag is set only in the cluster if the upgrade is initiated as a system-upgrade. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `system_report_refs` - Tracks the list of reports created for node. It is a reference to an object of type systemreport. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `tasks_completed` - Completed set of tasks in the upgrade operation. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `tenant_ref` - Tenant that this object belongs to. It is a reference to an object of type tenant. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `total_tasks` - Total number of tasks in the upgrade operation. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. diff --git a/website/docs/r/avi_controllerproperties.html.markdown b/website/docs/r/avi_controllerproperties.html.markdown index 0d621a23a..9140bdf3b 100644 --- a/website/docs/r/avi_controllerproperties.html.markdown +++ b/website/docs/r/avi_controllerproperties.html.markdown @@ -105,6 +105,7 @@ The following arguments are supported: * `seupgrade_segroup_min_dead_timeout` - (Optional) Time to wait before marking segroup upgrade as stuck. Unit is sec. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `shared_ssl_certificates` - (Optional) Ssl certificates in the admin tenant can be used in non-admin tenants. Field introduced in 18.2.5. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `ssl_certificate_expiry_warning_days` - (Optional) Number of days for ssl certificate expiry warning. Unit is days. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `system_report_limit` - (Optional) Number of systemreports retained in the system. Once the number of system reports exceed this threshold, the oldest systemreport will be removed and the latest one retained. I.e. The systemreport will be rotated and the reports don't exceed the threshold. Allowed values are 5-50. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `unresponsive_se_reboot` - (Optional) Unit is sec. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `update_dns_entry_retry_limit` - (Optional) Number of times to retry a dns entry update/delete operation. Field introduced in 21.1.4. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `update_dns_entry_timeout` - (Optional) Timeout period for a dns entry update/delete operation. Field introduced in 21.1.4. Unit is sec. Allowed in enterprise edition with any value, enterprise with cloud services edition. diff --git a/website/docs/r/avi_systemreport.html.markdown b/website/docs/r/avi_systemreport.html.markdown new file mode 100644 index 000000000..2249c4a52 --- /dev/null +++ b/website/docs/r/avi_systemreport.html.markdown @@ -0,0 +1,56 @@ + +--- +layout: "avi" +page_title: "Avi: avi_systemreport" +sidebar_current: "docs-avi-resource-systemreport" +description: |- + Creates and manages Avi SystemReport. +--- + +# avi_systemreport + +The SystemReport resource allows the creation and management of Avi SystemReport + +## Example Usage + +```hcl +resource "avi_systemreport" "foo" { + name = "terraform-example-foo" + tenant_ref = "/api/tenant/?name=admin" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `archive_ref` - (Optional) Relative path to the report archive file on filesystem.the archive includes exported system configuration and current object as json. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `controller_patch_image_ref` - (Optional) Controller patch image associated with the report. It is a reference to an object of type image. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `downloadable` - (Optional) Indicates whether this report is downloadable as an archive. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `events` - (Optional) List of events associated with the report. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `image_ref` - (Optional) System image associated with the report. It is a reference to an object of type image. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `name` - (Optional) Name of the report dervied from operation in a readable format. Ex upgrade_system_1a5c. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `readiness_reports` - (Optional) Readiness state of the system. Ex upgrade pre-check results. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `se_patch_image_ref` - (Optional) Se patch image associated with the report. It is a reference to an object of type image. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `state` - (Optional) Report state combines all applicable states. Ex readiness_reports.system_readiness.state. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `summary` - (Optional) Summary of the report. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. +* `tenant_ref` - (Optional) Tenant uuid associated with the object. It is a reference to an object of type tenant. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. + + +### Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: + +* `create` - (Defaults to 40 mins) Used when creating the AMI +* `update` - (Defaults to 40 mins) Used when updating the AMI +* `delete` - (Defaults to 90 mins) Used when deregistering the AMI + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `uuid` - Uuid identifier for the report. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. + diff --git a/website/docs/r/avi_upgradestatusinfo.html.markdown b/website/docs/r/avi_upgradestatusinfo.html.markdown index ff2ae4406..51496b921 100644 --- a/website/docs/r/avi_upgradestatusinfo.html.markdown +++ b/website/docs/r/avi_upgradestatusinfo.html.markdown @@ -66,6 +66,7 @@ The following arguments are supported: * `state` - (Optional) Current status of the upgrade operation. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `statediff_ref` - (Optional) Record of pre/post snapshot captured for current upgrade operation. It is a reference to an object of type statediffoperation. Field introduced in 21.1.3. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `system` - (Optional) Flag is set only in the cluster if the upgrade is initiated as a system-upgrade. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. +* `system_report_refs` - (Optional) Tracks the list of reports created for node. It is a reference to an object of type systemreport. Field introduced in 22.1.6. Allowed in enterprise edition with any value, enterprise with cloud services edition. * `tasks_completed` - (Optional) Completed set of tasks in the upgrade operation. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `tenant_ref` - (Optional) Tenant that this object belongs to. It is a reference to an object of type tenant. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. * `total_tasks` - (Optional) Total number of tasks in the upgrade operation. Field introduced in 18.2.6. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. From 908c9e64b1624ecda123a9540c8f55e5f97be2b8 Mon Sep 17 00:00:00 2001 From: Sagar Date: Wed, 31 Jan 2024 22:08:31 -0800 Subject: [PATCH 20/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 9fcac85b6..f4a45e58a 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07 + github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493 ) diff --git a/go.sum b/go.sum index ffe223331..663285039 100644 --- a/go.sum +++ b/go.sum @@ -319,6 +319,8 @@ github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a h1:RhAToMxGqXnKM3uw github.com/vmware/alb-sdk v0.0.0-20240117092856-6e5b22b0264a/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07 h1:MI0TN9IrDm0PQF5WJZS8+ZS3rQmlqNOLIRYKHL/qtqU= github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493 h1:RffxyzR8roxQqMtVkYeyCNoUE4+AV3tMfIEnGUKt2n0= +github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 90d124532897ba93105cbf8fd9b15c707b5940b7 Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 1 Feb 2024 21:15:49 -0800 Subject: [PATCH 21/22] Updated assets for terraform Signed-off-by: Sagar --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index f4a45e58a..921756669 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493 + github.com/vmware/alb-sdk v0.0.0-20240201091120-f9ffbc62c12a ) diff --git a/go.sum b/go.sum index 663285039..39d0a5715 100644 --- a/go.sum +++ b/go.sum @@ -321,6 +321,8 @@ github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07 h1:MI0TN9IrDm0PQF5W github.com/vmware/alb-sdk v0.0.0-20240119040723-3db284650e07/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493 h1:RffxyzR8roxQqMtVkYeyCNoUE4+AV3tMfIEnGUKt2n0= github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240201091120-f9ffbc62c12a h1:TlUv2QXE0jDBMMMADLbUi+GcGOwBZXwN8rx1kNlEyvs= +github.com/vmware/alb-sdk v0.0.0-20240201091120-f9ffbc62c12a/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 6e48a30a19238718c4c16e38513705da68c49ac2 Mon Sep 17 00:00:00 2001 From: Sagar Date: Wed, 7 Feb 2024 01:00:57 -0800 Subject: [PATCH 22/22] Updated assets for terraform Signed-off-by: Sagar --- avi/resource_avi_rest_dependants.go | 5 +++++ go.mod | 2 +- go.sum | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/avi/resource_avi_rest_dependants.go b/avi/resource_avi_rest_dependants.go index 9d8cbf69c..eb49e60fd 100644 --- a/avi/resource_avi_rest_dependants.go +++ b/avi/resource_avi_rest_dependants.go @@ -21692,6 +21692,11 @@ func ResourceMustChecksInfoSchema() *schema.Resource { Optional: true, Computed: true, }, + "error_details": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "start_time": { Type: schema.TypeString, Optional: true, diff --git a/go.mod b/go.mod index 921756669..74ae91cbf 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0 - github.com/vmware/alb-sdk v0.0.0-20240201091120-f9ffbc62c12a + github.com/vmware/alb-sdk v0.0.0-20240207071130-2bc01aff4190 ) diff --git a/go.sum b/go.sum index 39d0a5715..b6c779868 100644 --- a/go.sum +++ b/go.sum @@ -323,6 +323,8 @@ github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493 h1:RffxyzR8roxQqMtV github.com/vmware/alb-sdk v0.0.0-20240131052021-34833221d493/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= github.com/vmware/alb-sdk v0.0.0-20240201091120-f9ffbc62c12a h1:TlUv2QXE0jDBMMMADLbUi+GcGOwBZXwN8rx1kNlEyvs= github.com/vmware/alb-sdk v0.0.0-20240201091120-f9ffbc62c12a/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= +github.com/vmware/alb-sdk v0.0.0-20240207071130-2bc01aff4190 h1:BfJd7KCx1Xmnwg3sAfteU4zqiYCszpPeelacECUv1tA= +github.com/vmware/alb-sdk v0.0.0-20240207071130-2bc01aff4190/go.mod h1:fuRb4saDY/xy/UMeMvyKYmcplNknEL9ysaqYSw7reNE= 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.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=