Repository navigation
Implements universe/aws and universe/aws/cli - #1622
Conversation
6e14228 to
2a4d1dc
Compare
c6d6a22 to
e645057
Compare
samalba
left a comment
There was a problem hiding this comment.
Overall this is an impvrovement from what we had before. Although there is no active use case for aws yet, I would still merge this as we're gonna need it pretty soon. However I would not implement top-level aws packages until we get a higher user need.
There was a problem hiding this comment.
nitpick: I usually use aliases for that (let DefaultCLIVersion = ""). Just a coding-style thing.
There was a problem hiding this comment.
I'm actually referencing this in the test via aws.#DefaultCliVersion that way we don't have to change it in 2 places.
There was a problem hiding this comment.
if at some point this gets challenging to maintain, I would not validate and just set a type string.
There was a problem hiding this comment.
This can be automated actually
e645057 to
66074c2
Compare
Signed-off-by: Richard Jones <[email protected]>
66074c2 to
2b3f6e8
Compare
|
Would have loved to review this one FYI. |
|
We had an ongoing review in another PR which I had outstanding comments on. Then PR got closed and I just realized by chance that this got opened separately and merged. |
|
My concerns are mostly around enforcing consistent pattern around the use of Please please ping me for every universe PR, it’s not great to have an individual review bottleneck but it’s better than breaking every developer later or giving up on consistency altogether. |
This implements the following in
universe/awsanduniverse/aws/cliaws.#Buildprovides a ready madedocker.#Imagewith the CLI pre-installed to Amazon Linux 2 which avoids trust issues with installing glibc to Alpine from unknown partiesaws.#Containerprovides an environment pre-configured with credentials and an optional config file. This is meant to execute any command that uses an AWS SDK (not just CLI). Other packages underuniverse/awswill use this as a base primitive such asaws/cliand eventuallyaws/cloudformationandaws/s3. (This is generally not intended for direct use except in cases to support highly customized scripts that require the AWS SDK, but may prove very useful for teams migrating existing scripts to dagger.)cli.#Commandas a declarative wrapper to theawsCLI. By specifying the global options, service name, and sub-command,#Commandwill automatically format the correct shell syntax and execute viaaws.#Containerstoring the output in/output.txt. Furthermore when settingunmarshal: true(default) this definition will automaticallyjson.Unmarshalthe result into a CUE struct that can be referenced byresult.fieldwherefieldwas present in the JSON output.To use: