Skip to content

Commit

Permalink
device creation does not support custom data
Browse files Browse the repository at this point in the history
I got a report from two colleagues about a custom not being able to
create a device with custom data.

It was a bug in our cli, this PR fixed it.

```
packet-cli device create -f ams1 -H test -P c1.small.x86 -o centos_7 --customdata '{"customdatatest":"heythere"}' -p $PACKET_PROJECT_ID
```
  • Loading branch information
Gianluca Arbezzano committed May 28, 2020
1 parent d9b36f6 commit d34c80c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/create_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ packet device create --hostname [hostname] --plan [plan] --facility [facility_co
request.UserData = userdata
}

if customdata != "" {
request.CustomData = customdata
}

if len(tags) > 0 {
request.Tags = tags
}
Expand Down

0 comments on commit d34c80c

Please sign in to comment.