...
InĀ edx/terraform, create two files:
plans/edx/prod-frontends/frontend-app-XXXXX.tf
Code Block variable "frontend_app_XXXXX_hostname" { type = string description = "Hostname of the frontend-app-XXXXX used for bucket naming and routing" } module "frontend_app_XXXXX_frontend" { source = "../../../modules/frontends/frontend" cloudflare_record_name = "XXXXX" route53_zone_id = var.route53_zone_id_edx_org frontend_hostname = var.frontend_app_XXXXX_hostname internal_frontend_hostname = "${var.environment}-XXXXX.edx.org" aws_region = var.aws_region deployer_user = aws_iam_user.frontend_deployer_user.arn cloudflare_zone_id = var.cloudflare_zone_id_edx_org cdn_type = "cloudflare" }
plans/edx/stage-frontends/frontend-app-XXXXX.tfCode Block variable "frontend_app_XXXXX_hostname" { type = string description = "Hostname of the frontend-app-XXXXX used for bucket naming and routing" } module "frontend_app_XXXXX_frontend" { source = "../../../modules/frontends/frontend" cloudflare_record_name = "XXXXX.stage" route53_zone_id = var.route53_zone_id_edx_org frontend_hostname = var.frontend_app_XXXXX_hostname internal_frontend_hostname = "${var.environment}-XXXXX.edx.org" aws_region = var.aws_region deployer_user = aws_iam_user.frontend_deployer_user.arn cloudflare_zone_id = var.cloudflare_zone_id_edx_org cdn_type = "cloudflare" }
Note the only difference between the stage plan and the prod plan is the
cloudflare_record_name
. For examples, see the existingplans/edx/prod-frontends/frontend-app-*
configurations.Add variables for your application for stage and prod:
plans/edx/prod-frontends/terraform.tfvars
Code Block ... # frontend-app-XXXXX frontend_app_XXXXX_hostname = "YYYYY.edx.org"
plans/edx/stage-frontends/terraform.tfvarsCode Block ... # frontend-app-XXXXX frontend_app_XXXXX_hostname = "YYYYY.stage.edx.org"
Optional for edge deployment
...