Skip to content

Commit

Permalink
Upgrade to standalone SDK (#40)
Browse files Browse the repository at this point in the history
* migrate to standalone sdk
* upgrade to SDK v2
  • Loading branch information
pablo-ruth authored Mar 3, 2021
1 parent 97d6ce3 commit 9f1301d
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 397 deletions.
2 changes: 1 addition & 1 deletion fortiadc/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/Ouest-France/gofortiadc"

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

func Provider() *schema.Provider {
Expand Down
4 changes: 2 additions & 2 deletions fortiadc/resource_fortiadc_loadbalance_content_rewriting.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

func resourceFortiadcLoadbalanceContentRewriting() *schema.Resource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

func resourceFortiadcLoadbalanceContentRewritingCondition() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion fortiadc/resource_fortiadc_loadbalance_content_routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func resourceFortiadcLoadbalanceContentRouting() *schema.Resource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func resourceFortiadcLoadbalanceContentRoutingCondition() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion fortiadc/resource_fortiadc_loadbalance_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func resourceFortiadcLoadbalancePool() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion fortiadc/resource_fortiadc_loadbalance_pool_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func resourceFortiadcLoadbalancePoolMember() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion fortiadc/resource_fortiadc_loadbalance_real_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func resourceFortiadcLoadbalanceRealServer() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion fortiadc/resource_fortiadc_loadbalance_virtual_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/Ouest-France/gofortiadc"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func resourceFortiadcLoadbalanceVirtualServer() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ go 1.12

require (
github.com/Ouest-France/gofortiadc v0.2.0
github.com/hashicorp/terraform v0.14.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.3
)
465 changes: 84 additions & 381 deletions go.sum

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ package main

import (
"github.com/Ouest-France/terraform-provider-fortiadc/fortiadc"

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

func main() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: func() terraform.ResourceProvider {
ProviderFunc: func() *schema.Provider {
return fortiadc.Provider()
},
})
Expand Down

0 comments on commit 9f1301d

Please sign in to comment.