scaleway / scaleway-cli

Command Line Interface for Scaleway

Home Page:https://www.scaleway.com/en/cli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_userdata body truncated on '='

bchatelard opened this issue · comments

scw -D _userdata 5dbc6184-a646-4ec5-ab9e-ada170eeda73 cloud-init="`cat ~/Downloads/cloud-init.yml`"                           bastien@Bastien
DEBU[0000] curl -X PATCH -d "#cloud-config\n\nhostname: \"coreos\"\n\ncoreos:\n  units:\n    - name: runcmd.service\n      command: start\n      content: |\n        [Unit]\n        Description" -H "Content-Type: text/plain" -H "User-Agent: scw/v1.7.1+dev" -H "X-Auth-Token: 00000000-0000-1000-0000-000000000000" https://api.scaleway.com/servers/5dbc6184-a646-4ec5-ab9e-ada170eeda73/user_data/cloud-init
cloud-init
DEBU[0000] Writing cache file to disk
cat ~/Downloads/cloud-init.yml
#cloud-config

hostname: "coreos"

coreos:
  units:
    - name: runcmd.service
      command: start
      content: |
        [Unit]
        Description=Mark as booted

        [Service]
        Type=oneshot
        ExecStart=/bin/sh -c "curl http://169.254.42.42/state -X PATCH -d '{\"state_detail\": \"booted\"}' -H 'Content-Type: application/json'"

Hi @bchatelard thank for your feedback ☺️

Fixed here

$> scw _userdata 8cc2d32c-5444-4998-81e9-964134700ba7 CLOUD-INIT="`cat cloud-init.yml`"
CLOUD-INIT
$> scw _userdata 8cc2d32c-5444-4998-81e9-964134700ba7 CLOUD-INIT
#cloud-config

hostname: "coreos"

coreos:
  units:
    - name: runcmd.service
      command: start
      content: |
        [Unit]
        Description=Mark as booted

        [Service]
        Type=oneshot
        ExecStart=/bin/sh -c "curl http://169.254.42.42/state -X PATCH -d '{\"state_detail\": \"booted\"}' -H 'Content-Type: application/json'"