-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SP-2064 - Integrate with Dev Slack Workspace #minor (#263)
* SP-2064 - Add AWS Dev Config for Django #minor * SP-2064 - Make Dev/Prod individually configurable #minor * SP-2064 - Fix Branch Versions #patch * SP-2064 - Make dev the default config #patch
- Loading branch information
1 parent
2bfef79
commit afb55df
Showing
12 changed files
with
76 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
|
||
from .base import * # noqa: F401, F403 | ||
|
||
SITE_URL = os.environ.get("SITE_URL") | ||
|
||
DEBUG = False | ||
|
||
DATABASES = { | ||
"default": { | ||
"ENGINE": "django.db.backends.postgresql", | ||
"HOST": os.environ.get("DB_HOST"), | ||
"PORT": os.environ.get("DB_PORT"), | ||
"USER": os.environ.get("DB_USER"), | ||
"NAME": os.environ.get("DB_NAME"), | ||
"PASSWORD": os.environ.get("DB_PASSWORD"), | ||
"OPTIONS": {"sslmode": os.getenv("DB_SSL_MODE", "disable")}, | ||
} | ||
} | ||
|
||
RESPONSE_LOGIN_REQUIRED = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
resource "aws_secretsmanager_secret" "slack_token" { | ||
name = "response/${terraform.workspace}/slack-token" | ||
name = "response/${local.environment}/slack-token" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "slack_signing_key" { | ||
name = "response/${terraform.workspace}/slack-signing-key" | ||
name = "response/${local.environment}/slack-signing-key" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "slack_team_id" { | ||
name = "response/${terraform.workspace}/slack-team-id" | ||
name = "response/${local.environment}/slack-team-id" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "database_password" { | ||
name = "response/${terraform.workspace}/rds-password" | ||
name = "response/${local.environment}/rds-password" | ||
} | ||
|
||
data "aws_secretsmanager_secret_version" "database_password" { | ||
secret_id = aws_secretsmanager_secret.database_password.id | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "django_secret_key" { | ||
name = "response/${terraform.workspace}/django-secret-key" | ||
name = "response/${local.environment}/django-secret-key" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "github_client_id" { | ||
name = "response/${terraform.workspace}/github-client-id" | ||
name = "response/${local.environment}/github-client-id" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "github_client_secret" { | ||
name = "response/${terraform.workspace}/github-client-secret" | ||
name = "response/${local.environment}/github-client-secret" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "statuspage_io_page_id" { | ||
name = "response/${terraform.workspace}/statuspageio-page-id" | ||
name = "response/${local.environment}/statuspageio-page-id" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "statuspage_io_api_key" { | ||
name = "response/${terraform.workspace}/statuspageio-api-key" | ||
name = "response/${local.environment}/statuspageio-api-key" | ||
} | ||
|
||
resource "aws_secretsmanager_secret" "pagerduty_api_key" { | ||
name = "response/${terraform.workspace}/pagerduty-api-key" | ||
name = "response/${local.environment}/pagerduty-api-key" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,13 @@ locals { | |
"production" = "incident" | ||
} | ||
|
||
environment = terraform.workspace == "production" ? "production" : "development" | ||
|
||
mandatory_moj_tags = { | ||
business-unit = "OPG" | ||
application = "opg-incident-response" | ||
environment-name = terraform.workspace | ||
is-production = tostring(terraform.workspace == "production" ? true : false) | ||
environment-name = local.environment | ||
is-production = tostring(local.environment == "production" ? true : false) | ||
owner = "OPG Webops: [email protected]" | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters