Skip to content

Commit

Permalink
Merge pull request #51 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 5.2.2 -- remove old variables
  • Loading branch information
briskt authored Sep 16, 2024
2 parents 312625f + 255dadc commit 13cbb7c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 49 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,31 @@ name: 'Terraform'

on:
push:
pull_request:

permissions:
contents: read
branches: ["**"]

jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-22.04

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash
runs-on: ubuntu-latest

steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "<1.6.0" # only use open source version of Terraform

# Checks that all Terraform configuration files adhere to a canonical format
- name: Terraform Format
run: terraform fmt -check -diff
run: terraform fmt -check -diff -recursive

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
run: terraform init -cloud=false
run: terraform init -backend=false

# Validate the files, referring only to the configuration and not accessing any remote services
- name: Terraform Validate
Expand Down
10 changes: 2 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ locals {

module "app" {
source = "silinternational/ecs-app/aws"
version = "0.8.0"
version = "0.9.0"

app_env = local.app_env
app_name = var.app_name
Expand Down Expand Up @@ -116,8 +116,6 @@ locals {
dynamo_secret_access_key = aws_iam_access_key.user_login_logger.secret
enable_debug = var.enable_debug
help_center_url = var.help_center_url
idp_display_name = var.idp_display_name
idp_name = var.idp_name
memory = var.memory
mysql_host = module.app.database_host
mysql_database = local.mysql_database
Expand Down Expand Up @@ -209,15 +207,11 @@ module "aws_backup" {
app_name = "${var.app_name}-${var.aws_region}"
app_env = var.app_env
source_arns = [
data.aws_db_instance.this.db_instance_arn,
module.app.database_arn,
aws_dynamodb_table.logger.arn
]
backup_schedule = "cron(${var.aws_backup_cron_schedule})"
notification_events = var.aws_backup_notification_events
sns_topic_name = "${local.app_name_and_env}-backup-vault-events"
sns_email_subscription = var.backup_sns_email
}

data "aws_db_instance" "this" {
db_instance_identifier = "${var.app_name}-${var.app_env}"
}
2 changes: 1 addition & 1 deletion op.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CLOUDFLARE_API_TOKEN="op://Apps Dev/Cloudflare Tokens/tokens/iidp.net"
CLOUDFLARE_API_TOKEN="op://Apps Dev/Cloudflare DNS read for iidp/credential"
TF_VAR_cloudflare_domain=iidp.net
AWS_ACCESS_KEY_ID="op://Apps Dev/Terraform Enterprise - AWS IdP Account/username"
AWS_SECRET_ACCESS_KEY="op://Apps Dev/Terraform Enterprise - AWS IdP Account/password"
12 changes: 0 additions & 12 deletions task-def-hub.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
"name": "BASE_URL_PATH",
"value": "https://${subdomain}.${cloudflare_domain}/"
},
{
"name": "ENABLE_HUB_AUTHPROCS",
"value": "true"
},
{
"name": "DYNAMO_ACCESS_KEY_ID",
"value": "${dynamo_access_key_id}"
Expand All @@ -61,14 +57,6 @@
"name": "HUB_MODE",
"value": "true"
},
{
"name": "IDP_DISPLAY_NAME",
"value": "${idp_display_name}"
},
{
"name": "IDP_NAME",
"value": "${idp_name}"
},
{
"name": "MYSQL_HOST",
"value": "${mysql_host}"
Expand Down
2 changes: 0 additions & 2 deletions terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ analytics_id = "G-"
aws_access_key = ""
aws_secret_key = ""
cloudflare_domain = "example.com"
idp_display_name = "IdP Hub"
idp_name = "hub"
subdomain = "hub"
12 changes: 0 additions & 12 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,6 @@ variable "enable_debug" {
default = "false"
}

variable "idp_display_name" {
description = "The name of the hub as presented to the end user."
type = string
default = "IdP dev hub"
}

variable "idp_name" {
description = "Required by ssp-base, but not actually used."
type = string
default = "hub"
}

variable "help_center_url" {
description = "The URL for the \"Help\" link at the top of the IDP selection page"
type = string
Expand Down

0 comments on commit 13cbb7c

Please sign in to comment.