Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Add account-manager env vars to account-api
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Mar 12, 2021
1 parent a855552 commit e3cbf8b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ task :check_consistency_between_aws_and_carrenza do
licensify::apps::licensify::environment
licensify::apps::licensify_admin::environment
licensify::apps::licensify_feed::environment
govuk::apps::account_api::plek_account_manager_uri
govuk::apps::account_api::db::allow_auth_from_lb
govuk::apps::account_api::db::backend_ip_range
govuk::apps::account_api::db::lb_ip_range
Expand Down
1 change: 1 addition & 0 deletions hieradata_aws/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cron::daily_hour: 6

environment_ip_prefix: '10.1'

govuk::apps::account_api::plek_account_manager_uri: 'https://www.account.staging.publishing.service.gov.uk'
govuk::apps::asset_manager::aws_s3_bucket_name: 'govuk-assets-integration'
govuk::apps::asset_manager::aws_region: 'eu-west-1'
govuk::apps::ckan::ckan_site_url: 'https://ckan.integration.publishing.service.gov.uk'
Expand Down
1 change: 1 addition & 0 deletions hieradata_aws/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ govuk_jenkins::deploy_all_apps::apps_on_nodes:
- licensify-admin
- licensify-feed

govuk::apps::account_api::plek_account_manager_uri: 'https://www.account.publishing.service.gov.uk'
govuk::apps::asset_manager::aws_s3_bucket_name: 'govuk-assets-production'
govuk::apps::asset_manager::aws_region: 'eu-west-1'
govuk::apps::ckan::ckan_site_url: 'https://ckan.publishing.service.gov.uk'
Expand Down
1 change: 1 addition & 0 deletions hieradata_aws/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ govuk_jenkins::deploy_all_apps::apps_on_nodes:
- licensify-admin
- licensify-feed

govuk::apps::account_api::plek_account_manager_uri: 'https://www.account.staging.publishing.service.gov.uk'
govuk::apps::asset_manager::aws_s3_bucket_name: 'govuk-assets-staging'
govuk::apps::asset_manager::aws_region: 'eu-west-1'
govuk::apps::ckan::ckan_site_url: 'https://ckan.staging.publishing.service.gov.uk'
Expand Down
21 changes: 21 additions & 0 deletions modules/govuk/manifests/apps/account_api.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
# [*db_name*]
# The database name to use for the DATABASE_URL environment variable
#
# [*account_oauth_client_id*]
# Client ID for the Transition Checker in GOV.UK Account Manager
#
# [*account_oauth_client_secret*]
# Client secret for the Transition Checker in GOV.UK Account Manager
#
# [*plek_account_manager_uri*]
# Path to the GOV.UK Account Manager
#
class govuk::apps::account_api (
$port,
$enabled = true,
Expand All @@ -54,6 +63,9 @@
$db_allow_prepared_statements = undef,
$db_password = undef,
$db_name = 'account-api_production',
$account_oauth_client_id = undef,
$account_oauth_client_secret = undef,
$plek_account_manager_uri = undef,
) {
$app_name = 'account-api'

Expand Down Expand Up @@ -92,6 +104,15 @@
"${title}-GDS_SSO_OAUTH_SECRET":
varname => 'GDS_SSO_OAUTH_SECRET',
value => $oauth_secret;
"${title}-ACCOUNT-OAUTH-CLIENT-ID":
varname => 'GOVUK_ACCOUNT_OAUTH_CLIENT_ID',
value => $account_oauth_client_id;
"${title}-ACCOUNT-OAUTH-CLIENT-SECRET":
varname => 'GOVUK_ACCOUNT_OAUTH_CLIENT_SECRET',
value => $account_oauth_client_secret;
"${title}-PLEK-ACCOUNT-MANAGER-URI":
varname => 'PLEK_SERVICE_ACCOUNT_MANAGER_URI',
value => $plek_account_manager_uri;
}

govuk::app::envvar::database_url { $app_name:
Expand Down

0 comments on commit e3cbf8b

Please sign in to comment.