Skip to content

Add docs on when to use data sources #496

Open
@osterman

Description

@osterman

Quoting from slack:

Hi All, got sort of an opinion question here. Does anyone have a preference on using remote state for looking up resources, or using data sources to look them up at runtime? Been trying to research, and not having much luck finding which is recommended or preferred

Rhawnk 13 minutes ago
I assume it might be related to a size thing, that is size of terraform repos, or amount of resources under management

Erik Osterman (Cloud Posse) 7 minutes ago
I don't think there's a black/white rule on this. Off the cuff, here's my recommendation:
Use SSM for sharing values across toolchains (e.g. #terraform and helmfile) or where you need to access the values outside of terraform
Use remote state between terraform projects. E.g. everything you provision that you are in control over.
Use data sources for things which you might not have control over but depend on.
New

Rhawnk 3 minutes ago
Thanks @erik Osterman (Cloud Posse), this pretty much aligns with at least my personal opinion. Though i never thought about the first bullet, that is a really cool idea

Activity

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Add docs on when to use data sources · Issue #496 · cloudposse/docs