Profiles not formating correctly after saving

This is a total noob question i’m sure. For the life of me I can’t find out why this is happening. As i’m testing diffrent profiles with cloud init i keep running into some formating issues. It would seem that - in it profiles goes and tries and escape characters maybe. It happens most of the time but sometimes it works.

example:

I’m trying to add users via cloud init

user.user-data: |
   #cloud-config
   packages: 
        - openssh-server    
   users:
        - name: adrean
          sudo: ALL=(ALL) NOPASSWD:ALL
          groups: users, admin
          ssh_authroized_keys:

and save the profile… When I reopen it I get

user.user-data: "#cloud-config\npackages: \n  - openssh-server\nusers:\n  - name: adrean\n    gecos: Adrean \n    sudo: ALL=(ALL) NOPASSWD:ALL\n    groups: users, admin\n    ssh_authroized_keys:\n      - ssh-rsa ssh-rsa ..."

all in one line. What am I doing wrong?

*PS The formatting is a little off on here. It all line up in the yaml kind of ways.
Thanks

It’s technically equivalent, though it’s not a behavior I’ve noticed before.

Note that I often use |- rather than | and tend to indent with two spaces relative to the YAML key (you did 4) not sure why that would make a different though.