Deploy to localstack #34
-
Hello. I'm seeking a straightforward method to deploy my instance of the ref arch to LocalStack (and yes, I understand that I'll have to use the paid version of LocalStack, and not everything is going to work). The approach shown at demo-localstack uses mixins. How can I apply this approach to the ref arch dynamically, so that the |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
We don’t primarily use LocalStack ourselves, so we can’t personally attest to the reference architecture running that way. However, @hans-d (a reference architecture user) has successfully set it up entirely using LocalStack. To better guide you, I’d love to understand more about what you’re trying to achieve. One straightforward approach would be to create a |
Beta Was this translation helpful? Give feedback.
-
You could probably use a mixin file, or some stage - like @osterman said, and import a file that conditionally overrides to point at localstack. e.g. {{ if eq (getenv "DEPLOYMENT_TARGET") "localstack" }}
terraform:
providers:
aws:
region: "us-east-1"
access_key: "test"
secret_key: "test"
s3_use_path_style: false
skip_credentials_validation: true
...
{{ end }} Essentially wrapping it all in an env, that would I think, handle the case you're talking about. The reason we don't do things like this typically though, is it becomes environment specific for the stack configuration - someones machine has a different source of truth than someone else's (based on env vars). This goes against the idea of gitops and git being the source of truth. Similar to @osterman - whats your goal? might be an easier way to accomplish that task. |
Beta Was this translation helpful? Give feedback.
-
I’m concerned that the feedback loop is too lengthy. This is a general issue I have with IaC and is not specific to the ref arch. |
Beta Was this translation helpful? Give feedback.
-
We are using some local overrides in our components, to specify if certain functionality is available or nor, and adjust the component accordingly. (eg budgets cannot be used on localstack). |
Beta Was this translation helpful? Give feedback.
-
Thank you everyone, I've made significant progress and will be publishing my "how-to" soon. |
Beta Was this translation helpful? Give feedback.
-
Here's my How-To guide for running the Cloud Posse Ref Arch on LocalStack. Enjoy! |
Beta Was this translation helpful? Give feedback.
Here's my How-To guide for running the Cloud Posse Ref Arch on LocalStack. Enjoy!
https://github.com/petabook/cloudposse-ref-arch/blob/main/docs/howto-localstack.md