Coder Social home page Coder Social logo

Comments (3)

jamesla avatar jamesla commented on July 20, 2024 1

@ofhouse Yes it does I got this fixed up this weekend and deploying nicely. Thanks for such a detailed explanation 👍

from terraform-aws-next-js.

ofhouse avatar ofhouse commented on July 20, 2024

Hi James, thanks for reaching out.

The Terraform module does not perform a rebuild of the application on its own when running terraform apply.

Building or rebuilding the application is done with the tf-next build command via npm or yarn. This creates (or overrides an existing) .tf-next/ folder where the bundled application is stored.

When running terraform apply afterwards, the module checks for changes exclusively in this .tf-next/ folder.

That means in order to update your application you have to run the commands in this order:

  1. tf-next build command (to update the app bundle)
  2. terraform apply to deploy the updated bundle to the resources

Coming from a Vercel or Serverless flow this may seem unintuitive because they perform the build and deploy step in one single step.
But we split the two steps by design because for our own setup we perform the build step and the Terraform commands on two separate machines (in CI/CD) to make use of different pre-configured Docker images that are optimized for each step.

This worked for months without extra configuration while using Terraform 0.12 (We upgraded our systems just last week), so you should not need any workarounds in order to make it work.

from terraform-aws-next-js.

ofhouse avatar ofhouse commented on July 20, 2024

@jamesla does it solve your question?

from terraform-aws-next-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.