bottlerocket-os / bottlerocket

An operating system designed for hosting containers
https://bottlerocket.dev
Other
8.78k stars 519 forks source link

Cloudformation settings extension #4010

Closed mgsharm closed 5 months ago

mgsharm commented 5 months ago

Issue number:

Closes #3660

Description of changes:

Testing done:

[ssm-user@control]$ apiclient set --json '{"settings": {"cloudformation": {"logical-resource-id": "MyEC2Instance", "should-signal":true, "stack-name":"MyStack"}}}'
[ssm-user@control]$ apiclient get settings.cloudformation
{
  "settings": {
    "cloudformation": {
      "logical-resource-id": "MyEC2Instance",
      "should-signal": true,
      "stack-name": "MyStack"
    }
  }
}
> cargo run proto1 set --setting-version v1 --value '{"logical-resource-id": "MyEC2Instance", "should-signal":true, "stack-name":"MyStack"}'
   Compiling settings-extension-cloudformation v0.1.0 (/Users/mgsharm/bottlerocket/bottlerocket/sources/settings-extensions/cloudformation)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.28s
     Running `/Users/mgsharm/bottlerocket/bottlerocket/sources/target/debug/settings-extension-cloudformation proto1 set --setting-version v1 --value '{"logical-resource-id": "MyEC2Instance", "should-signal":true, "stack-name":"MyStack"}'`

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.