Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs on when to use data sources #496

Open
osterman opened this issue Aug 11, 2020 · 0 comments
Open

Add docs on when to use data sources #496

osterman opened this issue Aug 11, 2020 · 0 comments

Comments

@osterman
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant