Skip to content

Commit

Permalink
Merge pull request #542 from vmware/jenkins_sync_30.1.1_tf
Browse files Browse the repository at this point in the history
Auto updated assets for terraform 30.1.1
  • Loading branch information
sagarpsalvi committed Jun 26, 2023
2 parents a88d17f + 3f3bd1c commit 6aa5d65
Show file tree
Hide file tree
Showing 74 changed files with 1,211 additions and 213 deletions.
2 changes: 1 addition & 1 deletion avi/data_source_avi_certificatemanagementprofile_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* ========================================================================
* Copyright 2022 VMware, Inc. All rights reserved. VMware Confidential
* Copyright 2023 VMware, Inc. All rights reserved. VMware Confidential
* ========================================================================
*/

Expand Down
2 changes: 1 addition & 1 deletion avi/data_source_avi_cluster_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* ========================================================================
* Copyright 2022 VMware, Inc. All rights reserved. VMware Confidential
* Copyright 2023 VMware, Inc. All rights reserved. VMware Confidential
* ========================================================================
*/

Expand Down
2 changes: 1 addition & 1 deletion avi/data_source_avi_pool_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* ========================================================================
* Copyright 2022 VMware, Inc. All rights reserved. VMware Confidential
* Copyright 2023 VMware, Inc. All rights reserved. VMware Confidential
* ========================================================================
*/

Expand Down
2 changes: 1 addition & 1 deletion avi/data_source_avi_useraccount_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* ========================================================================
* Copyright 2022 VMware, Inc. All rights reserved. VMware Confidential
* Copyright 2023 VMware, Inc. All rights reserved. VMware Confidential
* ========================================================================
*/

Expand Down
10 changes: 10 additions & 0 deletions avi/datasource_avi_albservicesconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ func dataSourceAviALBServicesConfig() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"polling_interval": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -61,6 +66,11 @@ func dataSourceAviALBServicesConfig() *schema.Resource {
Computed: true,
Elem: ResourceProxyConfigurationSchema(),
},
"tenant_ref": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"use_split_proxy": {
Type: schema.TypeString,
Computed: true,
Expand Down
20 changes: 20 additions & 0 deletions avi/datasource_avi_controllerproperties.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,18 @@ func dataSourceAviControllerProperties() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"gslb_purge_batch_size": {
Type: schema.TypeString,
Computed: true,
},
"gslb_purge_sleep_time_ms": {
Type: schema.TypeString,
Computed: true,
},
"ignore_vrf_in_networksubnetlist": {
Type: schema.TypeString,
Computed: true,
},
"max_dead_se_in_grp": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -207,6 +219,10 @@ func dataSourceAviControllerProperties() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"postgres_vacuum_period": {
Type: schema.TypeString,
Computed: true,
},
"process_locked_useraccounts_timeout_period": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -275,6 +291,10 @@ func dataSourceAviControllerProperties() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"seupgrade_copy_buffer_size": {
Type: schema.TypeString,
Computed: true,
},
"seupgrade_copy_pool_size": {
Type: schema.TypeString,
Computed: true,
Expand Down
2 changes: 1 addition & 1 deletion avi/datasource_avi_fileservice.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* ========================================================================
* Copyright 2022 VMware, Inc. All rights reserved. VMware Confidential
* Copyright 2023 VMware, Inc. All rights reserved. VMware Confidential
* ========================================================================
*/

Expand Down
4 changes: 4 additions & 0 deletions avi/datasource_avi_licensestatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func dataSourceAviLicenseStatus() *schema.Resource {
Computed: true,
Elem: ResourceLicenseServiceUpdateSchema(),
},
"tenant_uuid": {
Type: schema.TypeString,
Computed: true,
},
"uuid": {
Type: schema.TypeString,
Optional: true,
Expand Down
5 changes: 5 additions & 0 deletions avi/datasource_avi_pkiprofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ func dataSourceAviPKIProfile() *schema.Resource {
return &schema.Resource{
Read: ResourceAviPKIProfileRead,
Schema: map[string]*schema.Schema{
"allow_pki_errors": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"ca_certs": {
Type: schema.TypeList,
Computed: true,
Expand Down
8 changes: 8 additions & 0 deletions avi/datasource_avi_serviceenginegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"replay_vrf_routes_interval": {
Type: schema.TypeString,
Computed: true,
},
"resync_time_interval": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -1012,6 +1016,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"use_dp_util_for_scaleout": {
Type: schema.TypeString,
Computed: true,
},
"use_hyperthreaded_cores": {
Type: schema.TypeString,
Computed: true,
Expand Down
5 changes: 5 additions & 0 deletions avi/datasource_avi_tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ func dataSourceAviTenant() *schema.Resource {
return &schema.Resource{
Read: ResourceAviTenantRead,
Schema: map[string]*schema.Schema{
"attrs": {
Type: schema.TypeList,
Computed: true,
Elem: ResourceKeyValueSchema(),
},
"config_settings": {
Type: schema.TypeSet,
Computed: true,
Expand Down
39 changes: 39 additions & 0 deletions avi/datasource_avi_tenantsystemconfiguration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2019 VMware, Inc.
// SPDX-License-Identifier: Mozilla Public License 2.0

package avi

import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

func dataSourceAviTenantSystemConfiguration() *schema.Resource {
return &schema.Resource{
Read: ResourceAviTenantSystemConfigurationRead,
Schema: map[string]*schema.Schema{
"configpb_attributes": {
Type: schema.TypeSet,
Computed: true,
Elem: ResourceConfigPbAttributesSchema(),
},
"dns_virtualservice_refs": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"tenant_ref": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"uuid": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
},
}
}
48 changes: 48 additions & 0 deletions avi/datasource_avi_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ func dataSourceAviUser() *schema.Resource {
Computed: true,
Elem: ResourceUserRoleSchema(),
},
"anonymous_user": {
Type: schema.TypeString,
Computed: true,
},
"date_joined": {
Type: schema.TypeString,
Computed: true,
},
"default_tenant_ref": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -26,6 +34,18 @@ func dataSourceAviUser() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"is_active": {
Type: schema.TypeString,
Computed: true,
},
"is_internal_user": {
Type: schema.TypeString,
Computed: true,
},
"is_staff": {
Type: schema.TypeString,
Computed: true,
},
"is_superuser": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -34,6 +54,10 @@ func dataSourceAviUser() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"logged_in": {
Type: schema.TypeString,
Computed: true,
},
"name": {
Type: schema.TypeString,
Optional: true,
Expand All @@ -43,6 +67,30 @@ func dataSourceAviUser() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"passwordless": {
Type: schema.TypeString,
Computed: true,
},
"recovery_token": {
Type: schema.TypeString,
Computed: true,
},
"token_expiration_date": {
Type: schema.TypeString,
Computed: true,
},
"ui_property": {
Type: schema.TypeString,
Computed: true,
},
"uid": {
Type: schema.TypeString,
Computed: true,
},
"unix_crypt_password": {
Type: schema.TypeString,
Computed: true,
},
"user_profile_ref": {
Type: schema.TypeString,
Computed: true,
Expand Down
14 changes: 14 additions & 0 deletions avi/datasource_avi_webapput.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ func dataSourceAviWebappUT() *schema.Resource {
Optional: true,
Computed: true,
},
"sensitive_test": {
Type: schema.TypeSet,
Computed: true,
Elem: ResourceL1FSensitiveTestCaseSchema(),
},
"sensitive_tests": {
Type: schema.TypeList,
Computed: true,
Elem: ResourceL1FSensitiveTestCaseSchema(),
},
"string_length_test": {
Type: schema.TypeSet,
Computed: true,
Expand All @@ -44,6 +54,10 @@ func dataSourceAviWebappUT() *schema.Resource {
Optional: true,
Computed: true,
},
"test_sensitive_string": {
Type: schema.TypeString,
Computed: true,
},
"test_string": {
Type: schema.TypeString,
Computed: true,
Expand Down
2 changes: 1 addition & 1 deletion avi/diff_suppress_func.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* ========================================================================
* Copyright 2022 VMware, Inc. All rights reserved. VMware Confidential
* Copyright 2023 VMware, Inc. All rights reserved. VMware Confidential
* ========================================================================
*/

Expand Down
27 changes: 26 additions & 1 deletion avi/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ func Provider() *schema.Provider {
DefaultFunc: schema.EnvDefaultFunc("AVI_API_TIMEOUT", nil),
Description: "Session timeout for Avi Controller.",
},
"avi_csp_token": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("AVI_CSP_TOKEN", nil),
Description: "Csp token for Avi Controller.",
},
"avi_csp_host": {
Type: schema.TypeString,
Optional: true,
DefaultFunc: schema.EnvDefaultFunc("AVI_CSP_HOST", "console.cloud.vmware.com"),
Description: "Csp host for Avi Controller.",
},
},
DataSourcesMap: map[string]*schema.Resource{
"avi_rmcloudopsproto": dataSourceAviRmCloudOpsProto(),
Expand Down Expand Up @@ -170,6 +182,7 @@ func Provider() *schema.Provider {
"avi_backup": dataSourceAviBackup(),
"avi_securitymanagerdata": dataSourceAviSecurityManagerData(),
"avi_pingaccessagent": dataSourceAviPingAccessAgent(),
"avi_tenantsystemconfiguration": dataSourceAviTenantSystemConfiguration(),
"avi_fileservice": dataSourceAviFileService(),
"avi_server": dataSourceAviServer(),
},
Expand Down Expand Up @@ -285,6 +298,7 @@ func Provider() *schema.Provider {
"avi_backup": resourceAviBackup(),
"avi_securitymanagerdata": resourceAviSecurityManagerData(),
"avi_pingaccessagent": resourceAviPingAccessAgent(),
"avi_tenantsystemconfiguration": resourceAviTenantSystemConfiguration(),
"avi_useraccount": resourceAviUserAccount(),
"avi_fileservice": resourceAviFileService(),
"avi_server": resourceAviServer(),
Expand All @@ -301,6 +315,8 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
Tenant: "admin",
Version: "18.2.8",
AuthToken: d.Get("avi_authtoken").(string),
CSP_TOKEN: d.Get("avi_csp_token").(string),
CSP_HOST: d.Get("avi_csp_host").(string),
Timeout: time.Duration(d.Get("avi_api_timeout").(int)) * time.Second,
}
if username, ok := d.GetOk("avi_username"); ok {
Expand All @@ -313,10 +329,15 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
if tenant, ok := d.GetOk("avi_tenant"); ok {
config.Tenant = tenant.(string)
}

if timeout, ok := d.GetOk("avi_api_timeout"); ok {
config.Timeout = time.Duration(timeout.(int)) * time.Second
}
if Csp_token, ok := d.GetOk("avi_csp_token"); ok {
config.CSP_TOKEN = Csp_token.(string)
}
if Csp_host, ok := d.GetOk("avi_csp_host"); ok {
config.CSP_HOST = Csp_host.(string)
}

aviClient, err := clients.NewAviClient(
config.Controller, config.Username,
Expand All @@ -325,6 +346,8 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
session.SetVersion(config.Version),
session.SetAuthToken(config.AuthToken),
session.SetInsecure, session.SetTimeout(config.Timeout),
session.SetCSPHost(config.CSP_HOST),
session.SetCSPToken(config.CSP_TOKEN),
session.SetLazyAuthentication(true))

log.Printf("Avi Client created for user %s tenant %s version %s\n",
Expand All @@ -340,5 +363,7 @@ type Credentials struct {
Tenant string
Version string
AuthToken string
CSP_HOST string
CSP_TOKEN string
Timeout time.Duration
}
2 changes: 1 addition & 1 deletion avi/provider_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* ========================================================================
* Copyright 2022 VMware, Inc. All rights reserved. VMware Confidential
* Copyright 2023 VMware, Inc. All rights reserved. VMware Confidential
* ========================================================================
*/

Expand Down

0 comments on commit 6aa5d65

Please sign in to comment.