Skip to content

Commit

Permalink
Merge pull request #70 from ddymko/user-data-changes
Browse files Browse the repository at this point in the history
bumping govultr + userdata b64 changes
  • Loading branch information
ddymko authored Nov 9, 2020
2 parents 2a59c47 + 3299a18 commit 973f6fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ require (
github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 // indirect
github.com/hashicorp/terraform-plugin-sdk v1.8.0
github.com/pkg/errors v0.9.1
github.com/vultr/govultr v1.0.0
github.com/vultr/govultr v1.1.1
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4A
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU=
github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vultr/govultr v1.0.0 h1:yeJrYp9wyA4xXaQZ7eOL2u1wKn2JU79HjRevwvpxbJ4=
github.com/vultr/govultr v1.0.0/go.mod h1:wZZXZbYbqyY1n3AldoeYNZK4Wnmmoq6dNFkvd5TV3ss=
github.com/vultr/govultr v1.1.1 h1:ntltxMYyJstjKz1v2CLNxFZiqjlt/8HqD1GZeJ/fAMc=
github.com/vultr/govultr v1.1.1/go.mod h1:QXCNTRg0nwu95ayiMC3feYvrAFTLnj94s2FiibIpoC4=
github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v1.1.0 h1:uJwc9HiBOCpoKIObTQaLR+tsEXx1HBHnOsOOpcdhZgw=
github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
Expand Down
8 changes: 1 addition & 7 deletions vultr/resource_vultr_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func resourceVultrServer() *schema.Resource {
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
},
"notify_activate": {
Type: schema.TypeBool,
Expand Down Expand Up @@ -526,13 +527,6 @@ func resourceVultrServerUpdate(d *schema.ResourceData, meta interface{}) error {

}

if d.HasChange("user_data") {
log.Printf("[INFO] Updating user_data")
if err := client.Server.SetUserData(context.Background(), d.Id(), base64.StdEncoding.EncodeToString([]byte(d.Get("user_data").(string)))); err != nil {
return fmt.Errorf("error occured while updating user_data for server %s : %v", d.Id(), err)
}
}

if d.HasChange("firewall_group_id") {
log.Printf("[INFO] Updating firewall_group_id")
if err := client.Server.SetFirewallGroup(context.Background(), d.Id(), d.Get("firewall_group_id").(string)); err != nil {
Expand Down

0 comments on commit 973f6fd

Please sign in to comment.