Skip to content
Draft
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6bbd79f
refact(terraform): restructured terraform directory and cloudfront mo…
alexrdrgz Jun 1, 2022
1787a62
feat(variables.tf): changed values of vars and added environment folder
alexrdrgz Jun 1, 2022
ed18fd1
feat(test.tfvars): made web domain name be set by env file
alexrdrgz Jun 1, 2022
f1ca598
chore(terraform): pushing to make sure all changes are pushed
alexrdrgz Jun 2, 2022
5053087
feat(variables.tf): refactored var values to be located in .tfvars file
alexrdrgz Jun 2, 2022
634f410
feat(terraform): refactored to use environment files
alexrdrgz Jun 8, 2022
62e78fc
feat(variables.tf): added new variables to pass to cloudfront gh modules
alexrdrgz Jun 9, 2022
7fe1ef9
feat(main.tf): refactored so github name is not stored in vars
alexrdrgz Jun 9, 2022
c6193bd
refact(staging.tfvars): deleted values that were used to test deployment
alexrdrgz Jun 9, 2022
3854524
refact(vazriables.tf): deleted unused var
alexrdrgz Jun 9, 2022
26c6ad2
refact(main.tf): changed value to be a placeholder value
alexrdrgz Jun 9, 2022
7b97c82
refact(--profile): deleted unneccessary file
alexrdrgz Jun 9, 2022
fe5a678
feat(varaiables.tf): added environment var for tagging purposes
alexrdrgz Jun 9, 2022
034cc6c
refact(staging.tfvars): added example value to tfvars file
alexrdrgz Jun 9, 2022
2bb6e52
refact(main.tf): got rid of string interpolation
alexrdrgz Jun 10, 2022
35bc95e
feat(variables.tf): changed policy to react-boilerplate-client cors p…
alexrdrgz Jun 10, 2022
59df629
feat(environment): added backend config files, added terraform plan a…
alexrdrgz Jun 16, 2022
c17ac10
feat(environment/.conf): replaced web domain with generic values
alexrdrgz Jun 23, 2022
1e1504a
feat(terraform): fixing merging conflicts
alexrdrgz Apr 4, 2023
aefc216
feat(readme): updated docs and naming conventions for npm scripts
alexrdrgz Apr 5, 2023
1191f80
feat(.gitigon): removed tf lock file, updated some documnetaion
alexrdrgz Apr 5, 2023
b6ebd29
featpushing latest chagesn
alexrdrgz Apr 27, 2023
8500ee6
feat(yarn.lock): removed from git tracking
alexrdrgz Apr 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,23 @@
"test-cov": "react-scripts test --coverage .",
"test-cov-ci": "react-scripts test -w 1 --watchAll=false --coverage",
"eject": "react-scripts eject",
"prepare": "husky install"
"prepare": "husky install",
"switch-state": "npm run terra:init -target=\"$npm_config_target\" -- -reconfigure",
"switch-state:dev": "npm run switch-state -target=development",
"switch-state:stg": "npm run switch-state -target=staging",
"switch-state:prod": "npm run switch-state -target=production",
"terra:init": "cd terraform && terraform init -backend-config=\"environment/$npm_config_target.backend.conf\"",
"terra:init-wrks": "cd terraform && if ! terraform workspace list | grep -q \"\\s$npm_config_name$\"; then terraform workspace new \"$npm_config_name\"; fi",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is terra:init-wrks needed here? Was this added to test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah and for the pre-provision

"terra:update": "cd terraform && terraform get -update",
"preprovision": "npm run terra:init && npm run terra:init-wrks -name=\"$npm_config_target\"",
"provision": "cd terraform && terraform workspace select \"$npm_config_target\" && terraform apply -var-file \"environment/$npm_config_target.tfvars\"",
"provision:dev": "npm run provision -target=development",
"provision:stg": "npm run provision -target=staging",
"provision:prod": "npm run provision -target=production",
"plan": "cd terraform && terraform workspace select \"$npm_config_target\" && terraform plan -var-file \"environment/$npm_config_target.tfvars\"",
"plan:dev": "npm run plan -target=development",
"plan:stg": "npm run plan -target=staging",
"plan:prod": "npm run plan -target=production"
},
"browserslist": {
"production": [
Expand Down
21 changes: 21 additions & 0 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

226 changes: 0 additions & 226 deletions terraform/cloudfront/main.tf

This file was deleted.

4 changes: 4 additions & 0 deletions terraform/environment/development.backend.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bucket = "shift3-terraform-state"
key = "test-staging-boilerplate-client-react/terraform.tfstate"
region = "us-west-2"
profile = "shift3"
1 change: 1 addition & 0 deletions terraform/environment/development.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web_domain_name = "ar-test-development.shift3sandbox.com"
1 change: 1 addition & 0 deletions terraform/environment/production.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web_domain_name = "ar-test-production.shift3sandbox.com"
4 changes: 4 additions & 0 deletions terraform/environment/productions.backend.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bucket = "shift3-terraform-state"
key = "test-production-boilerplate-client-react/terraform.tfstate"
region = "us-west-2"
profile = "shift3"
4 changes: 4 additions & 0 deletions terraform/environment/staging.backend.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bucket = "shift3-terraform-state"
key = "test-staging-boilerplate-client-react/terraform.tfstate"
region = "us-west-2"
profile = "shift3"
Copy link

@mwallert mwallert Aug 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexrdrgz I think shift3-super is the new default, let's swap this out, update the merge conflicts and this should be good to merge!

1 change: 1 addition & 0 deletions terraform/environment/staging.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web_domain_name = "ar-test-staging.shift3sandbox.com"
21 changes: 21 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
provider "aws" {
profile = var.aws_profile
region = var.aws_region
}

terraform {
backend "s3" {}
}

locals {
workspace_name = terraform.workspace
}

module "cloudfront" {
source = "git@github.com:Shift3/terraform-modules.git//modules/aws/cloudfront"
web_domain_name = var.web_domain_name
profile = var.aws_profile
secure_response_headers_id = var.secure_response_headers_id
route53_zone = var.route53_zone
environment = var.environment
}
22 changes: 0 additions & 22 deletions terraform/staging/.terraform.lock.hcl

This file was deleted.

24 changes: 0 additions & 24 deletions terraform/staging/main.tf

This file was deleted.

18 changes: 0 additions & 18 deletions terraform/staging/variables.tf

This file was deleted.

Loading