Skip to content

Commit

Permalink
Merge pull request #8 from itsmechlark/support-servers-ips
Browse files Browse the repository at this point in the history
Expose IPv6 & IPv6
  • Loading branch information
itsmechlark authored Jul 5, 2023
2 parents 386e48f + 73fd5ab commit e5356df
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 24 deletions.
15 changes: 15 additions & 0 deletions cloud66/data_source_servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ func dataSourceCloud66Servers() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"ext_ipv6": {
Type: schema.TypeString,
Computed: true,
},
"int_ipv4": {
Type: schema.TypeString,
Computed: true,
},
"int_ipv6": {
Type: schema.TypeString,
Computed: true,
},
"dns_record": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -75,6 +87,9 @@ func dataSourceCloud66StackServers(d *schema.ResourceData, meta interface{}) err
server["name"] = serverResp.Name
server["address"] = serverResp.Address
server["ext_ipv4"] = serverResp.ExtIpV4
server["ext_ipv6"] = serverResp.ExtIpV6
server["int_ipv4"] = serverResp.IntIpV4
server["int_ipv6"] = serverResp.IntIpV6
server["dns_record"] = serverResp.DnsRecord
server["server_type"] = serverResp.ServerType
server["roles"] = serverResp.Roles
Expand Down
2 changes: 1 addition & 1 deletion cloud66/data_source_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"log"

api "github.com/cloud66-oss/cloud66"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
api "github.com/itsmechlark/cloud66"
)

func dataSourceCloud66Stack() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion cloud66/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"
"regexp"

api "github.com/cloud66-oss/cloud66"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
api "github.com/itsmechlark/cloud66"
)

type ProviderConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion cloud66/resource_cloud66_env_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"time"

api "github.com/cloud66-oss/cloud66"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
api "github.com/itsmechlark/cloud66"
)

func resourceCloud66EnvVariable() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion cloud66/resource_cloud66_ssl_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"time"

api "github.com/cloud66-oss/cloud66"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
api "github.com/itsmechlark/cloud66"
)

func resourceCloud66SslCertificate() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion cloud66/resource_cloud66_ssl_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"testing"

api "github.com/cloud66-oss/cloud66"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
api "github.com/itsmechlark/cloud66"
)

func TestAccCloud66SslCertificate_LetsEncrypt(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cloud66/schema_cloud66_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strconv"

api "github.com/cloud66-oss/cloud66"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
api "github.com/itsmechlark/cloud66"
)

type Firewall struct {
Expand Down
33 changes: 17 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/itsmechlark/terraform-provider-cloud66
go 1.17

require (
github.com/cloud66-oss/cloud66 v0.0.0-20211216112306-a0442984d6b7
github.com/itsmechlark/cloud66 v0.1.30
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
)

Expand All @@ -12,27 +12,28 @@ require (
github.com/apparentlymart/go-textseg v1.0.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/cloud66/fayego v0.0.0-20161110052602-62f173dff4c0 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v0.16.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.1 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.3.0 // indirect
github.com/hashicorp/terraform-plugin-docs v0.13.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.5.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.2.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/khash/oauth v0.0.0-20161110045103-29933d91e1e3 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.10 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
Expand All @@ -41,10 +42,10 @@ require (
github.com/oklog/run v1.0.0 // indirect
github.com/pborman/uuid v0.0.0-20161005151609-3d4f2ba23642 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/zclconf/go-cty v1.9.1 // indirect
golang.org/x/net v0.0.0-20210326060303-6b1517762897 // indirect
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
golang.org/x/text v0.3.5 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
google.golang.org/grpc v1.32.0 // indirect
Expand All @@ -55,10 +56,10 @@ require (
github.com/apparentlymart/go-cidr v1.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/hc-install v0.3.1 // indirect
github.com/hashicorp/hc-install v0.4.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.15.0 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
github.com/hashicorp/terraform-exec v0.17.2 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/jarcoal/httpmock v1.1.0
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
)
Loading

0 comments on commit e5356df

Please sign in to comment.