We already have a feature for this that renders out to the right format: https://github.com/coreos/coreos-cloudinit/blob/master/Documentation/cloud-config.md#coreosoem