Skip to content

Commit

Permalink
Indentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
carlssonk committed Sep 26, 2024
1 parent 215b8b3 commit ecceea1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions common/services/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module "service_discovery_namespace" {
namespace_name = module.globals.var.organization
}

module "ec2_instance_nginx_proxy" {
module "ec2_instance_nginx" {
count = var.reverse_proxy_type == "nginx" ? 1 : 0
name = "nginx-reverse-proxy"
source = "../../modules/ec2-instance/default"
Expand Down Expand Up @@ -62,7 +62,7 @@ module "ec2_instance_nginx_proxy" {
module "ec2_instance_nginx_eip" {
count = var.reverse_proxy_type == "nginx" ? 1 : 0
source = "../../modules/elastic-ip/default"
instance_id = module.ec2_instance_nginx_proxy[0].id
instance_id = module.ec2_instance_nginx[0].id
}

module "main_alb_access_logs_bucket" {
Expand Down
16 changes: 8 additions & 8 deletions common/services/nginx_reverse_proxy.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

yum update
yum update -y
if ! rpm -q nginx certbot python3-certbot-nginx > /dev/null; then
yum install -y nginx certbot python3-certbot-nginx
fi
Expand All @@ -13,7 +13,7 @@ events {
http {
map $http_host $upstream {
map $\http_host $\upstream {
hostnames;
%{ for domain, backend in services_map ~}
${domain} ${backend};
Expand All @@ -24,7 +24,7 @@ http {
server {
listen 80;
server_name _;
return 301 https://$host$request_uri;
return 301 https://$\host$\request_uri;
}
server {
Expand All @@ -42,11 +42,11 @@ http {
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
location / {
proxy_pass http://$upstream;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://$\upstream;
proxy_set_header Host $\host;
proxy_set_header X-Real-IP $\remote_addr;
proxy_set_header X-Forwarded-For $\proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $\scheme;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion common/services/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
output "policy_documents" {
value = [
try(module.service_discovery_namespace[0].policy_document, null),
try(module.ec2_instance_nginx_proxy[0].policy_document, null),
try(module.ec2_instance_nginx[0].policy_document, null),
try(module.ec2_instance_nginx_eip[0].policy_document, null),
try(module.main_alb[0].policy_document, null),
try(module.main_alb_access_logs_bucket[0].policy_document, null),
Expand Down
2 changes: 1 addition & 1 deletion common/services/run_every_boot.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ write_files:
- path: /var/lib/cloud/scripts/per-boot/user-script.sh
permissions: '0755'
content: |
${nginx_config}
${indent(8, nginx_config)}

runcmd:
- /var/lib/cloud/scripts/per-boot/user-script.sh

0 comments on commit ecceea1

Please sign in to comment.