Skip to content

Commit

Permalink
Tf updated terraform to 0.12.24 (#54)
Browse files Browse the repository at this point in the history
* Terraform rebase upstream (#14)

* v0.2.1

* Cleanup after v0.2.1 release

* Create horizon_l7_l4_sharedvip_vcenter.tf

* Create variables.tf

* Create horizon_l4only.tf

* Create variables.tf

* Av 75946 Updated Terraform resources and data sources from 18.2.7 (#22)

* updating avi for avi_terraform.tgz release 18.2.6

* updating website for avi_terraform.tgz release 18.2.6

* Updated travis.yml to clone repo properly (#10)

* Updated travis.yml to clone repo properly

* Added email for notification

* updating avi for avi_terraform.tgz release 18.2.6

* updating website for avi_terraform.tgz release 18.2.6

* Updated travis.yml to clone repo properly (#10)

* Updated travis.yml to clone repo properly

* Added email for notification

* Updated notification email (#12)

* Updated terraform resources, data sources and website docs

  Author:    Rohan Suryawanshi <[email protected]>

* Updated go sdk to 18.2.7

* Updated the go clients with go fmt

Co-authored-by: Kiron Haltore <[email protected]>
Co-authored-by: Gaurav Rastogi <[email protected]>

Co-authored-by: Reghunath Rajendran <[email protected]>
Co-authored-by: Rohan Suryawanshi <[email protected]>
Co-authored-by: Kiron Haltore <[email protected]>
Co-authored-by: Gaurav Rastogi <[email protected]>

* updated from upstream

* Updated terraform to 12.24

* Updated terraform to 0.12.24

* updated go.sum

Co-authored-by: Chaitanya Deshpande <[email protected]>
Co-authored-by: Reghunath Rajendran <[email protected]>
Co-authored-by: Kiron Haltore <[email protected]>
Co-authored-by: Gaurav Rastogi <[email protected]>
  • Loading branch information
5 people authored Apr 3, 2020
1 parent 2f08f15 commit 19c9c7a
Show file tree
Hide file tree
Showing 937 changed files with 51,523 additions and 32,754 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dist: trusty
sudo: false
language: go
go:
- 1.12.6
- 1.13.3

before_install:
- mkdir -p $HOME/gopath/src/github.com/terraform-providers/terraform-provider-avi
Expand Down
6 changes: 2 additions & 4 deletions avi/data_source_avi_applicationprofile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ resource "avi_applicationprofile" "testApplicationProfile" {
keepalive_timeout = "30000"
ssl_client_certificate_mode = "SSL_CLIENT_CERTIFICATE_NONE"
http_to_https = true
spdy_enabled = false
respond_with_100_continue = true
client_body_timeout = "30000"
httponly_enabled = true
hsts_max_age = "365"
client_max_header_size = "12"
server_side_redirect_to_https = true
max_bad_rps_cip = "0"
server_side_redirect_to_https = true
client_max_header_size = "12"
client_max_request_size = "48"
cache_config {
min_object_size = "100"
Expand All @@ -84,7 +83,6 @@ resource "avi_applicationprofile" "testApplicationProfile" {
mime_types_group_refs = [data.avi_stringgroup.system_cacheablestringgroup.id]
}
max_rps_unknown_uri = "0"
spdy_fwd_proxy_mode = false
allow_dots_in_header_name = false
client_header_timeout = "10000"
post_accept_timeout = "30000"
Expand Down
4 changes: 4 additions & 0 deletions avi/datasource_avi_healthmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ func dataSourceAviHealthMonitor() *schema.Resource {
return &schema.Resource{
Read: ResourceAviHealthMonitorRead,
Schema: map[string]*schema.Schema{
"allow_duplicate_monitors": {
Type: schema.TypeBool,
Computed: true,
},
"description": {
Type: schema.TypeString,
Computed: true,
Expand Down
12 changes: 12 additions & 0 deletions avi/datasource_avi_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ func dataSourceAviImage() *schema.Resource {
Computed: true,
Elem: ResourcePackageDetailsSchema(),
},
"controller_patch_uuid": {
Type: schema.TypeString,
Computed: true,
},
"migrations": {
Type: schema.TypeSet,
Computed: true,
Expand All @@ -31,6 +35,10 @@ func dataSourceAviImage() *schema.Resource {
Computed: true,
Elem: ResourcePackageDetailsSchema(),
},
"se_patch_uuid": {
Type: schema.TypeString,
Computed: true,
},
"status": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -44,6 +52,10 @@ func dataSourceAviImage() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"uber_bundle": {
Type: schema.TypeBool,
Computed: true,
},
"uuid": {
Type: schema.TypeString,
Optional: true,
Expand Down
16 changes: 16 additions & 0 deletions avi/datasource_avi_serviceenginegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ func dataSourceAviServiceEngineGroup() *schema.Resource {
Type: schema.TypeInt,
Computed: true,
},
"core_shm_app_cache": {
Type: schema.TypeBool,
Computed: true,
},
"core_shm_app_learning": {
Type: schema.TypeBool,
Computed: true,
},
"cpu_reserve": {
Type: schema.TypeBool,
Computed: true,
Expand Down Expand Up @@ -393,6 +401,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource {
Type: schema.TypeInt,
Computed: true,
},
"pcap_tx_mode": {
Type: schema.TypeString,
Computed: true,
},
"per_app": {
Type: schema.TypeBool,
Computed: true,
Expand Down Expand Up @@ -467,6 +479,10 @@ func dataSourceAviServiceEngineGroup() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"se_mtu": {
Type: schema.TypeInt,
Computed: true,
},
"se_name_prefix": {
Type: schema.TypeString,
Computed: true,
Expand Down
4 changes: 4 additions & 0 deletions avi/datasource_avi_stringgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ func dataSourceAviStringGroup() *schema.Resource {
Computed: true,
Elem: ResourceKeyValueSchema(),
},
"longest_match": {
Type: schema.TypeBool,
Computed: true,
},
"name": {
Type: schema.TypeString,
Optional: true,
Expand Down
14 changes: 14 additions & 0 deletions avi/datasource_avi_upgradestatusinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func dataSourceAviUpgradeStatusInfo() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"patch_list": {
Type: schema.TypeList,
Computed: true,
Elem: ResourcePatchDataSchema(),
},
"patch_version": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -69,6 +74,11 @@ func dataSourceAviUpgradeStatusInfo() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"previous_patch_list": {
Type: schema.TypeList,
Computed: true,
Elem: ResourcePatchDataSchema(),
},
"previous_patch_version": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -77,6 +87,10 @@ func dataSourceAviUpgradeStatusInfo() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"progress": {
Type: schema.TypeInt,
Computed: true,
},
"se_upgrade_events": {
Type: schema.TypeList,
Computed: true,
Expand Down
31 changes: 6 additions & 25 deletions avi/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
package avi

import (
"fmt"
"github.com/avinetworks/sdk/go/clients"
"github.com/avinetworks/sdk/go/session"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"log"
Expand Down Expand Up @@ -82,10 +80,10 @@ func Provider() terraform.ResourceProvider {
"avi_l4policyset": dataSourceAviL4PolicySet(),
"avi_scheduler": dataSourceAviScheduler(),
"avi_backupconfiguration": dataSourceAviBackupConfiguration(),
"avi_tenant": dataSourceAviTenant(),
"avi_serviceenginegroup": dataSourceAviServiceEngineGroup(),
"avi_networkservice": dataSourceAviNetworkService(),
"avi_dnspolicy": dataSourceAviDnsPolicy(),
"avi_tenant": dataSourceAviTenant(),
"avi_hardwaresecuritymodulegroup": dataSourceAviHardwareSecurityModuleGroup(),
"avi_upgradestatussummary": dataSourceAviUpgradeStatusSummary(),
"avi_upgradestatusinfo": dataSourceAviUpgradeStatusInfo(),
Expand Down Expand Up @@ -118,7 +116,7 @@ func Provider() terraform.ResourceProvider {
"avi_errorpageprofile": dataSourceAviErrorPageProfile(),
"avi_customerportalinfo": dataSourceAviCustomerPortalInfo(),
"avi_controllerproperties": dataSourceAviControllerProperties(),
"avi_applicationprofile": dataSourceAviApplicationProfile(),
"avi_healthmonitor": dataSourceAviHealthMonitor(),
"avi_virtualservice": dataSourceAviVirtualService(),
"avi_vsvip": dataSourceAviVsVip(),
"avi_analyticsprofile": dataSourceAviAnalyticsProfile(),
Expand All @@ -141,7 +139,7 @@ func Provider() terraform.ResourceProvider {
"avi_network": dataSourceAviNetwork(),
"avi_serverautoscalepolicy": dataSourceAviServerAutoScalePolicy(),
"avi_autoscalelaunchconfig": dataSourceAviAutoScaleLaunchConfig(),
"avi_healthmonitor": dataSourceAviHealthMonitor(),
"avi_applicationprofile": dataSourceAviApplicationProfile(),
"avi_httppolicyset": dataSourceAviHTTPPolicySet(),
"avi_serviceengine": dataSourceAviServiceEngine(),
"avi_fileservice": dataSourceAviFileService(),
Expand All @@ -167,10 +165,10 @@ func Provider() terraform.ResourceProvider {
"avi_l4policyset": resourceAviL4PolicySet(),
"avi_scheduler": resourceAviScheduler(),
"avi_backupconfiguration": resourceAviBackupConfiguration(),
"avi_tenant": resourceAviTenant(),
"avi_serviceenginegroup": resourceAviServiceEngineGroup(),
"avi_networkservice": resourceAviNetworkService(),
"avi_dnspolicy": resourceAviDnsPolicy(),
"avi_tenant": resourceAviTenant(),
"avi_hardwaresecuritymodulegroup": resourceAviHardwareSecurityModuleGroup(),
"avi_upgradestatussummary": resourceAviUpgradeStatusSummary(),
"avi_upgradestatusinfo": resourceAviUpgradeStatusInfo(),
Expand Down Expand Up @@ -203,7 +201,7 @@ func Provider() terraform.ResourceProvider {
"avi_errorpageprofile": resourceAviErrorPageProfile(),
"avi_customerportalinfo": resourceAviCustomerPortalInfo(),
"avi_controllerproperties": resourceAviControllerProperties(),
"avi_applicationprofile": resourceAviApplicationProfile(),
"avi_healthmonitor": resourceAviHealthMonitor(),
"avi_virtualservice": resourceAviVirtualService(),
"avi_vsvip": resourceAviVsVip(),
"avi_analyticsprofile": resourceAviAnalyticsProfile(),
Expand All @@ -226,7 +224,7 @@ func Provider() terraform.ResourceProvider {
"avi_network": resourceAviNetwork(),
"avi_serverautoscalepolicy": resourceAviServerAutoScalePolicy(),
"avi_autoscalelaunchconfig": resourceAviAutoScaleLaunchConfig(),
"avi_healthmonitor": resourceAviHealthMonitor(),
"avi_applicationprofile": resourceAviApplicationProfile(),
"avi_httppolicyset": resourceAviHTTPPolicySet(),
"avi_serviceengine": resourceAviServiceEngine(),
"avi_useraccount": resourceAviUserAccount(),
Expand Down Expand Up @@ -262,10 +260,6 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config.Timeout = time.Duration(time.Duration(timeout.(int)) * time.Second)
}

if err := config.validate(); err != nil {
return nil, err
}

aviClient, err := clients.NewAviClient(
config.Controller, config.Username,
session.SetPassword(config.Password),
Expand All @@ -290,16 +284,3 @@ type Credentials struct {
AuthToken string
Timeout time.Duration
}

func (c *Credentials) validate() error {
var err *multierror.Error

if c.Controller == "" {
err = multierror.Append(err, fmt.Errorf("Avi Controller must be provided"))
}

if c.Password == "" && c.AuthToken == "" {
err = multierror.Append(err, fmt.Errorf("Avi Controller password or authtoken must be provided"))
}
return err.ErrorOrNil()
}
12 changes: 4 additions & 8 deletions avi/resource_avi_applicationprofile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,13 @@ resource "avi_applicationprofile" "testApplicationProfile" {
keepalive_timeout = "30000"
ssl_client_certificate_mode = "SSL_CLIENT_CERTIFICATE_NONE"
http_to_https = true
spdy_enabled = false
respond_with_100_continue = true
client_body_timeout = "30000"
httponly_enabled = true
hsts_max_age = "365"
client_max_header_size = "12"
server_side_redirect_to_https = true
max_bad_rps_cip = "0"
server_side_redirect_to_https = true
client_max_header_size = "12"
client_max_request_size = "48"
cache_config {
min_object_size = "100"
Expand All @@ -155,7 +154,6 @@ resource "avi_applicationprofile" "testApplicationProfile" {
mime_types_group_refs = [data.avi_stringgroup.system_cacheablestringgroup.id]
}
max_rps_unknown_uri = "0"
spdy_fwd_proxy_mode = false
allow_dots_in_header_name = false
client_header_timeout = "10000"
post_accept_timeout = "30000"
Expand Down Expand Up @@ -208,14 +206,13 @@ resource "avi_applicationprofile" "testApplicationProfile" {
keepalive_timeout = "30000"
ssl_client_certificate_mode = "SSL_CLIENT_CERTIFICATE_NONE"
http_to_https = true
spdy_enabled = false
respond_with_100_continue = true
client_body_timeout = "30000"
httponly_enabled = true
hsts_max_age = "365"
client_max_header_size = "12"
server_side_redirect_to_https = true
max_bad_rps_cip = "0"
server_side_redirect_to_https = true
client_max_header_size = "12"
client_max_request_size = "48"
cache_config {
min_object_size = "100"
Expand All @@ -232,7 +229,6 @@ resource "avi_applicationprofile" "testApplicationProfile" {
mime_types_group_refs = [data.avi_stringgroup.system_cacheablestringgroup.id]
}
max_rps_unknown_uri = "0"
spdy_fwd_proxy_mode = false
allow_dots_in_header_name = false
client_header_timeout = "10000"
post_accept_timeout = "30000"
Expand Down
5 changes: 5 additions & 0 deletions avi/resource_avi_healthmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import (

func ResourceHealthMonitorSchema() map[string]*schema.Schema {
return map[string]*schema.Schema{
"allow_duplicate_monitors": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
},
"description": {
Type: schema.TypeString,
Optional: true,
Expand Down
15 changes: 15 additions & 0 deletions avi/resource_avi_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ func ResourceImageSchema() map[string]*schema.Schema {
Computed: true,
Elem: ResourcePackageDetailsSchema(),
},
"controller_patch_uuid": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"migrations": {
Type: schema.TypeSet,
Optional: true,
Expand All @@ -37,6 +42,11 @@ func ResourceImageSchema() map[string]*schema.Schema {
Computed: true,
Elem: ResourcePackageDetailsSchema(),
},
"se_patch_uuid": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"status": {
Type: schema.TypeString,
Optional: true,
Expand All @@ -52,6 +62,11 @@ func ResourceImageSchema() map[string]*schema.Schema {
Optional: true,
Computed: true,
},
"uber_bundle": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"uuid": {
Type: schema.TypeString,
Optional: true,
Expand Down
Loading

0 comments on commit 19c9c7a

Please sign in to comment.