Deploy to localstack #34
Replies: 3 comments 3 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.
-
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
mixin/localstack.yaml
is only included if, say, an environment variable likeDEPLOYMENT_TARGET
is set tolocalstack
? And, generally speaking, is this the right approach at all?Beta Was this translation helpful? Give feedback.
All reactions