Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Commit

Permalink
fix up types
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiggi33 committed Aug 19, 2024
1 parent 1ac98b9 commit 4af57a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module terraform-provider-pterodactyl
go 1.21

require (
github.com/Luiggi33/pterodactyl-client-go v0.1.1
github.com/Luiggi33/pterodactyl-client-go v0.2.0
github.com/hashicorp/terraform-plugin-docs v0.19.4
github.com/hashicorp/terraform-plugin-framework v1.11.0
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0=
github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc=
github.com/Luiggi33/pterodactyl-client-go v0.1.0 h1:NBB2hz9ZfQFFTUJGHxh7BfwXk8iNi+l7iVC0yT6/18M=
github.com/Luiggi33/pterodactyl-client-go v0.1.0/go.mod h1:lGesDuNHKaPCdArSZw3t3OIkVyIaj0H5nYEONXBJXVk=
github.com/Luiggi33/pterodactyl-client-go v0.1.1 h1:IKcehIBPUA4LqLTyblNhWvOzuG6SHusvHhitphWk7uc=
github.com/Luiggi33/pterodactyl-client-go v0.1.1/go.mod h1:lGesDuNHKaPCdArSZw3t3OIkVyIaj0H5nYEONXBJXVk=
github.com/Luiggi33/pterodactyl-client-go v0.2.0 h1:+useQNmmPAsvE4x6lgtqfEQubHAYXC+N5BZUT8KE9fs=
github.com/Luiggi33/pterodactyl-client-go v0.2.0/go.mod h1:lGesDuNHKaPCdArSZw3t3OIkVyIaj0H5nYEONXBJXVk=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/node_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (r *nodeResource) Create(ctx context.Context, req resource.CreateRequest, r
// Create partial allocation
partialAllocation := pterodactyl.PartialAllocation{
IP: allocation.IP.ValueString(),
Ports: []int32{allocation.Port.ValueInt32()},
Ports: []string{strconv.Itoa(int(allocation.Port.ValueInt32()))},
}

// Create new allocation
Expand Down Expand Up @@ -445,7 +445,7 @@ func (r *nodeResource) Update(ctx context.Context, req resource.UpdateRequest, r
if allocation.ID.IsNull() {
partialAllocation := pterodactyl.PartialAllocation{
IP: allocation.IP.ValueString(),
Ports: []int32{allocation.Port.ValueInt32()},
Ports: []string{strconv.Itoa(int(allocation.Port.ValueInt32()))},
}
// Create new allocation
err := r.client.CreateAllocation(plan.ID.ValueInt32(), partialAllocation)
Expand Down

0 comments on commit 4af57a0

Please sign in to comment.