Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - discussion #13

Open
iongion opened this issue Nov 3, 2022 · 1 comment
Open

Feature request - discussion #13

iongion opened this issue Nov 3, 2022 · 1 comment

Comments

@iongion
Copy link

iongion commented Nov 3, 2022

Highly appreciative of this module!

This is not a bug, more like a question for those new to terraform.
I want to be able to have multiple subdomains provisioned just as the main domain.
Each will host its own SPA application.

The domain: fx.domain

The apps

  • main
  • app1
  • app2

Will this create the following buckets ?

  • app1.fx.domain
  • app2.fx.domain

With their log buckets, together with the main fx.domain bucket ?

provider "aws" {
  region                  = "us-east-1"
  shared_credentials_file = "~/.aws/credentials_fxdomain"
}

module "aws_static_website_main" {
  source = "cloudmaniac/static-website/aws"
  # This is the domain as defined in Route53
  domains-zone-root = "fx.domain"
  # Pretty URL support using 404 redirect to index.html
  support-spa = true
  # Domains used for CloudFront
  website-domain-main        = "fx.domain"
  website-domain-redirect    = "www.fx.domain"
  website-additional-domains = []
}

module "aws_static_website_app1" {
  source = "cloudmaniac/static-website/aws"
  domains-zone-root = "fx.domain"
  support-spa = true
  website-domain-main = "app1.fx.domain"
}

module "aws_static_website_app2" {
  source = "cloudmaniac/static-website/aws"
  domains-zone-root = "fx.domain"
  support-spa = true
  website-domain-main = "app2.fx.domain"
}

Also, do you have a recommended way to have domains and buckets for environments, such as production, staging, development ?

@enjoy2000
Copy link

enjoy2000 commented Jan 12, 2023

I think we can achieve this by exposing variables and output for the website_logs bucket. Then you can reuse it from your main app.
I'm curious, why do you need to reuse log buckets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants