Comments (4)
Haha, yes CloudFront is a configuration monster 🙈
As soon as Hashicorp has merged the support for Origin & Cache policies we plan to move to a more modular structure of this module, so that it is possible use it together with an external CloudFront resource.
We already have support for passing custom origins and cache behaviours to the internal CloudFront distribution, but I think for the most developers it would make more sense to integrate the module into an existing CloudFront setup.
Anyway thanks for testing and reporting the bug caused by using multiple AWS profiles.
I created a follow up ticket for it here #50 so I close this ticket.
from terraform-aws-next-js.
Hi, thanks for reaching out!
ad7047c is an unreleased change, so it should have no impact when installing the module from the Terraform registry as you did here (source = "dealmore/next-js/aws"
).
The code of the latest version from the Terraform registry can be found here: Tag/v0.6.2.
We mostly use eu-central-1
here, so I am a bit surprised that eu-west-1
behaves differently.
Normally no additional provider configuration (pass-through) in the module should be necessary, since we initialize an additional us-east-1
alias provider inside the module for the CloudFront deployment.
Anyway, I will take a look by tomorrow and test some deployment configurations in eu-west-1
region to see if I can reproduce it.
from terraform-aws-next-js.
The problem isn't different region, but different aws profile.
// main.tf
provider "aws" {
profile = "my-profile"
}
// dealmore/terraform-aws-next-js/provider.tf
provider "aws" {
region = "us-east-1"
// profile is missing and terraform uses `default` profile
}
I've just confirmed that those missing resources from proxy-config module were created in my personal AWS account and not my client's account.
Using AWS_PROFILE
environment variable instead of profile
inside provider
block is one possible workaround.
EDIT: Workaround is actually using AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
because s3-put
command doesn't seem to read AWS_PROFILE
env var.
I'll check later if there's another way how to pass profile
to providers in modules. I guess passing providers explicitly to submodules would solve the issue as well.
In more complex situations there may be multiple provider configurations, or a child module may need to use different provider settings than its parent. For such situations, you must pass providers explicitly — Passing Providers Explicitly (last paragraph above the title)
from terraform-aws-next-js.
Unfortunately, I'm gonna drop this module because we simply have too specific requirements for origins and behaviors. Feel free to close this issue.
Thank you anyway! This module has very interesting deployment approach. Pity that cloudfront in terraform doesn't allow more granular management of resources.
from terraform-aws-next-js.
Related Issues (20)
- Modify proxy to force a version change HOT 1
- Unable to attach policy to lambda, since the iam.tf is missing in all versions starting from 1.0.0-canary.2 HOT 1
- Error: Authentication Failed Returns Status Code 0
- What services does this library use internally to manage deployments? HOT 1
- Unable to use redirect inside getServerSideProps HOT 3
- [Bug] Error while using middleware from Next 12.2 HOT 1
- TimeoutError: Promise timed out after 300000 milliseconds HOT 1
- Question: how can I use this module if I am using Cloudflare for DNS management and WAF? HOT 2
- Dynamic Routes like [id].tsx doesn't be update in my github action
- Q: What permissinos are needed for deployment? HOT 1
- Next.js v13 support HOT 10
- One or more of the CNAMEs you provided are already associated with a different resource. HOT 1
- Cannot deploy - .next-tf/lambdas\__NEXT_PAGE_LAMBDA_0.zip: no such file or directory HOT 1
- Is there a localstack sample available? HOT 1
- Getting Error during creating resources with terraform
- Deployment not deletes old files from s3 HOT 1
- NextAuth CLIENT_FETCH_ERROR , NEXTAUTH_URL
- New deployments not possible due as AWS ACLs are disabled by default HOT 1
- Alternatives? HOT 2
- Lambda functions no longer support NodeJS `v14` . HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-next-js.