Skip to content

Commit

Permalink
🔧 (terraform): Set prod price class to 200
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 2, 2023
1 parent 2fbcb12 commit a0c9b30
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
9 changes: 5 additions & 4 deletions terraform/mnemonic_ninja_prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ variable "prod_hostname" {
module "prod" {
source = "./modules/mnemonic-ninja"

aws_account_id = data.aws_caller_identity.current.account_id
env = "prod"
hostname = var.prod_hostname
acm_certificate_arn = aws_acm_certificate.app.arn
aws_account_id = data.aws_caller_identity.current.account_id
env = "prod"
hostname = var.prod_hostname
acm_certificate_arn = aws_acm_certificate.app.arn
cloudfront_price_class = "PriceClass_200"
}

output "prod_cloudfront_hostname" {
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/mnemonic-ninja/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ No modules.
|------|-------------|------|---------|:--------:|
| <a name="input_acm_certificate_arn"></a> [acm\_certificate\_arn](#input\_acm\_certificate\_arn) | ACM certificate ARN | `string` | n/a | yes |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | AWS account ID | `string` | n/a | yes |
| <a name="input_cloudfront_price_class"></a> [cloudfront\_price\_class](#input\_cloudfront\_price\_class) | n/a | `string` | `"PriceClass_100"` | no |
| <a name="input_env"></a> [env](#input\_env) | Environment name | `string` | n/a | yes |
| <a name="input_hostname"></a> [hostname](#input\_hostname) | Deployment hostname | `string` | n/a | yes |

Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/mnemonic-ninja/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_cloudfront_distribution" "app" {
viewer_protocol_policy = "redirect-to-https"
}

price_class = "PriceClass_100"
price_class = var.cloudfront_price_class

viewer_certificate {
acm_certificate_arn = var.acm_certificate_arn
Expand Down
5 changes: 5 additions & 0 deletions terraform/modules/mnemonic-ninja/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ variable "acm_certificate_arn" {
type = string
description = "ACM certificate ARN"
}

variable "cloudfront_price_class" {
type = string
default = "PriceClass_100"
}

0 comments on commit a0c9b30

Please sign in to comment.