examples
examples copied to clipboard
[Tutorial][AWS] Request for example on building and uploading static web apps
Problem description
It would be great to have a tutorial on how to upload static web apps on that require some form of build phase that requires environment variables from pulumi.Outputs before uploading files to the host. Specifically with AWS S3 would be great.
Affected product version(s)
Suggestions for a fix
@Lepozepo Is this something you still feel would be useful? If so, can you provide a few more details?
Ah yeah! @scottslowe This is old now but I think an example could be pretty useful regardless. This is what I ended up building back then which internally uses this construct. You can see in the construct that there is a build command with environment variables being passed to the project before uploading the build to S3. I believe the better path now is to use local.Command instead with triggers to have it run every single time though unless you believe there is a better way.
@Lepozepo Thanks for responding! OK, I'll keep this in our backlog, although something like this may be better suited to go into a blog post or similar instead as an example in this repository.
Yes! This might also be a good "next steps" add-on to our existing static-website template pages, given how common it is.
Indeed, for the serverless templates, I needed something kind like this myself -- some way to tell the UI what the computed serverless API endpoint was. I ended up building a JSON config file for it, and then fetching that file from the UI, but an example of how to bake output values right into a front-end build process would be great. Thanks for suggesting it. (And FWIW, I do think an example could also be a good fit for this.)