Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am using cloud-init to provision my droplet with custom apt repositories, and I have the public keys inline using this form:
apt:
primary:
- arches: [default]
search_dns: true
security:
- arches: [default]
search_dns: true
sources:
nodejs:
source: "deb http://deb.nodesource.com/node_8.x stretch main"
key: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFObJLYBEADkFW8HMjsoYRJQ4nCYC/6Eh0yLWHWfCh+/9ZSIj4w/pOe2V6V+
<snip>
-----END PGP PUBLIC KEY BLOCK-----
And I get this error in /var/log/cloud-init-output.log
2018-05-26 11:05:19,807 - cc_apt_configure.py[ERROR]: failed to add apt GPG Key to apt keyring
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_configure.py", line 530, in add_apt_key_raw
util.subp(['apt-key', 'add', '-'], data=key.encode(), target=target)
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1850, in subp
cmd=args)
cloudinit.util.ProcessExecutionError: Unexpected error while running command.
Command: ['apt-key', 'add', '-']
Exit code: 2
Reason: -
Stdout: -
Stderr: Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: invalid armor header: mQINBFObJLYBEADkFW8HMjsoYRJQ4nCYC/6Eh0yLWHWfCh+/9ZSIj4w/pOe2V6V+\n
2018-05-26 11:05:19,811 - util.py[WARNING]: Running module apt-configure (<module 'cloudinit.config.cc_apt_configure' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_configure.py'>) failed
This seems to be a bug in cloud-init, but I can’t even figure out a workaround. I’ve tried putting the key in the YAML as a flow scalar instead of a block scalar, but that gave the same error (at a different point in the key input).
220b5e1380f8416db566e9737f7170
newdoaccount
b1ce657f03b24202bfb1e84d954a18
Rashwan
Rashwan
rozerin.yildiz
bffe20e2d092407798209addeb821c
hanz
Ban Alexandru
Alif