aws / aws/ec2-macos-init

Documentation request - valid `userdata` examples

Open
#6 12 comments 7 reactions 0 assignees View on GitHub
documentation enhancement
Dominant language
Go
Stars
167
Forks
21
Avg merge
58m
Merged PRs (30d)
1

Description

As someone deploying default macOS AMIs, I'd like to see what sort of `userdata` I can provide via the AWS Web Console.

The [Userdata Example](https://github.com/aws/ec2-macos-init/blob/682b99acaee89dda322d3d785b192434daac5ef9/README.md#example-3) shows how to include a `Execute-User-Data` module in my `init.toml`. I think this example would be useful if I were editing `init.toml` with the intent to make a reusable AMI.

I would like to configure some automatic tasks without creating a new AMI. I would not be changing `init.toml`, and would instead only vary the `userdata`. Examples would be helpful because the dedicated hosts have a 24 hour minimum (so I don't want to spin up multiple hosts to experiment) and since they take a while to wipe between runs.

My ideal solution would include:

- [ ] Explicitly stating that you cannot use `#cloud-config` **or** an example showing how you can add. (I don't think the examples from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html work with `ec2-macos-init`)
- [ ] Explicitly stating that you can use a shell script, and including a screenshot of doing so via the aws web console.
- [ ] Explicitly stating that you can (or cannot) include an executable, and how it's run. (I'm assuming that the userdata is written to disk, given the `+x` flag, and then `ec2-macos-init` basically just invokes `/path/to/userdata`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.