Skip to content

AWS: to create resources or not? #1388

Closed

Description

@talentedmrjones

Currently universe has limited support for direct AWS API calls to create resources such as S3 buckets alpha.dagger.io/aws/s3. To continue this pattern universe would need to support 250 services which is a huge—no YUGE— undertaking. Should Dagger simply support IaC tools such as CloudFormation, Terraform, et al? Or should we duplicate what those tools do and provide CUE packages for each and every resource AWS provides?

This is further complicated by the lack of dagger down. Would users really want to use a tool to create hundreds of resources only to have that tool force them to delete those resources manually? CloudFormation and Terraform (among others) already support the full gamut of services and resources complete with automatic tear down.

Activity

  1. added this to the next milestone on Jan 11, 2022
  2. aluzzardi commented on Jan 25, 2022

    @aluzzardi
    Contributor

    /cc @shykes @samalba

    IMHO for packages such as rds etc that create resources, this is debatable.

    However for packages that deploy stuff (S3), I think it makes sense to have a dagger package, right? s3, ecr, ecs, ...

  3. talentedmrjones commented on Jan 25, 2022

    @talentedmrjones
    Author

    s3, ecr, and ecs are interesting cases:

    s3

    • definitely support object operations like GetObject and PutObject
    • CreateBucket ? Why here and not with CloudFormation that has built-in tear down capabilities?

    ecr:

    • seems like the only thing we need is login since we already have #Push
    • everything else can be done via CloudFormation/Terraform

    ecs: I can't think of anything that can't be updated via CloudFormation/Terraform.

    @jlongtine ?

  4. jlongtine commented on Jan 25, 2022

    @jlongtine
    Contributor

    My recommendation would be that unless there is a compelling reason to use direct API calls, like in the s3 Get/PutObject or ecr image push, we should rely on CloudFormation. That said, I don't see any reason we can't or shouldn't packages on top of CFN within universe.dagger.io. Having easy-to-use packages for those things makes a lot of sense to me.

  5. talentedmrjones commented on Jan 26, 2022

    @talentedmrjones
    Author

    To summarize:

    For things that CloudFormation can't do such as s3 PutObject or s3 GetObject we can write those in aws/s3 , later we can add support for creating resources as wrappers to aws/cloudformation e.g.: aws/rds uses aws/cloudformation to deploy via best practices

  6. shykes commented on Jan 26, 2022

    @shykes
    Contributor

    My recommendation would be that unless there is a compelling reason to use direct API calls, like in the s3 Get/PutObject or ecr image push, we should rely on CloudFormation. That said, I don't see any reason we can't or shouldn't packages on top of CFN within universe.dagger.io. Having easy-to-use packages for those things makes a lot of sense to me.

    Yeah I agree with that. To generalize:

    • If it makes Dagger more useful for a Universe package to exist, then it should exist
    • Each package should leverage the best available technology for its implementation. Criteria for “best” include reliability (does it work well?), security (will people get hacked because of it?), sustainability (will we regret choosing it next year?), and familiarity (will the target audience be comfortable with this choice?)
    • In doubt, go with the native best practices for the platform you’re targeting

    In the case of AWS integrations, that probably means “use CloudFormation whenever possible”.

  7. talentedmrjones commented on Jan 26, 2022

    @talentedmrjones
    Author

    Closing this on these wise words: "use CloudFormation whenever possible"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions