From 2e6c373e24455369cd3dcfc9eff5a06b03f6572a Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Tue, 1 Nov 2022 12:24:54 -0400 Subject: [PATCH 01/13] update roadmap --- app/templates/views/roadmap.html | 79 +++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/app/templates/views/roadmap.html b/app/templates/views/roadmap.html index ff9d38a01..23a1bdfac 100644 --- a/app/templates/views/roadmap.html +++ b/app/templates/views/roadmap.html @@ -12,61 +12,88 @@ {{ content_metadata( data={ - "Last updated": "27 April 2022", - "Next review due": "12 July 2022" + "Last updated": "1 November 2022", + "Next review due on": "15 December 2022" } ) }} -

The US Notify roadmap shows what we’re working on and some of the things we’ve done.

-

The roadmap is only a guide. It does not cover everything we do, and some things may change.

+

The Notify roadmap shows what we’re working on and what we're planning to do next.

+

This roadmap is only a guide. It does not cover everything we do, and some things may change.

You can contact us if you have any questions about the roadmap or suggestions for new features.

-

Things we’re working on

+

What we’re working on

Now

+

We are investigating the Notify concept, building on the notifications tool pioneered by the UK.

+

To do this, we are convening a pilot with a small set of partners.

+

Goals during this stage:

+ + +

Features prioritized during this stage:

+ +

Next

+

If the pilot is successful, we hope to recruit additional high-impact partners to improve outcomes for low-income individuals and families.

+ +

Goals during this stage:

+ + +

Features prioritized during this stage:

+ +

Later

+

In the future, we may decide to expand beyond SMS, or to offer the service government-wide

+ +

Features to be considered during this stage:

+ -

Things we’ve done

+ {% endblock %} From 7a857d1f44086d886287b24018352187755c5039 Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Tue, 1 Nov 2022 13:19:19 -0400 Subject: [PATCH 02/13] comment out another letters thing --- app/templates/views/message-status.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/message-status.html b/app/templates/views/message-status.html index 30c551f1e..08a6e2195 100644 --- a/app/templates/views/message-status.html +++ b/app/templates/views/message-status.html @@ -67,7 +67,7 @@ {% endcall %} -

Letters

+ {% endblock %} From a2f5bd2616acd7460cc6f3cc59c656ceb5082450 Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Tue, 1 Nov 2022 15:26:39 -0400 Subject: [PATCH 03/13] update 500 error page --- app/templates/error/500.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/templates/error/500.html b/app/templates/error/500.html index dff42f48f..503141543 100644 --- a/app/templates/error/500.html +++ b/app/templates/error/500.html @@ -9,11 +9,11 @@

Try again later.

-

+

- To report a problem, email gov-uk-notify-support@digital.cabinet-office.gov.uk + To report a problem, please email tts-benefits-studio@gsa.gov.

From 14a8afee12738578823d7a1445d49240c96b66bc Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Tue, 1 Nov 2022 15:27:29 -0400 Subject: [PATCH 04/13] streamline navs & menus --- app/main/views/pricing.py | 10 +-- app/main/views/sub_navigation_dictionaries.py | 25 +----- app/templates/admin_template.html | 79 ++++--------------- .../components/footer/template.njk | 31 -------- app/templates/views/features.html | 6 +- app/templates/views/guidance/index.html | 2 +- .../views/guidance/who-can-use-notify.html | 51 ------------ app/templates/views/pricing/how-to-pay.html | 4 +- app/templates/views/security.html | 22 +++--- app/templates/views/support/index.html | 17 ++-- 10 files changed, 52 insertions(+), 195 deletions(-) delete mode 100644 app/templates/views/guidance/who-can-use-notify.html diff --git a/app/main/views/pricing.py b/app/main/views/pricing.py index f532737e0..52bc273f3 100644 --- a/app/main/views/pricing.py +++ b/app/main/views/pricing.py @@ -6,7 +6,7 @@ from notifications_utils.international_billing_rates import ( from app.main import main from app.main.forms import SearchByNameForm -from app.main.views.sub_navigation_dictionaries import pricing_nav +from app.main.views.sub_navigation_dictionaries import using_notify_nav CURRENT_SMS_RATE = '1.72' @@ -21,7 +21,7 @@ def pricing(): for cc, country in INTERNATIONAL_BILLING_RATES.items() ], key=lambda x: x[0]), search_form=SearchByNameForm(), - navigation_links=pricing_nav(), + navigation_links=using_notify_nav(), ) @@ -29,7 +29,7 @@ def pricing(): def how_to_pay(): return render_template( 'views/pricing/how-to-pay.html', - navigation_links=pricing_nav(), + navigation_links=using_notify_nav(), ) @@ -39,9 +39,9 @@ def billing_details(): return render_template( 'views/pricing/billing-details.html', billing_details=current_app.config['NOTIFY_BILLING_DETAILS'], - navigation_links=pricing_nav(), + navigation_links=using_notify_nav(), ) return render_template( 'views/pricing/billing-details-signed-out.html', - navigation_links=pricing_nav(), + navigation_links=using_notify_nav(), ) diff --git a/app/main/views/sub_navigation_dictionaries.py b/app/main/views/sub_navigation_dictionaries.py index a86ffcf1f..314f92c63 100644 --- a/app/main/views/sub_navigation_dictionaries.py +++ b/app/main/views/sub_navigation_dictionaries.py @@ -22,10 +22,6 @@ def features_nav(): "name": "Roadmap", "link": "main.roadmap", }, - { - "name": "Who can use Notify", - "link": "main.who_can_use_notify", - }, { "name": "Security", "link": "main.security", @@ -37,29 +33,16 @@ def features_nav(): ] -def pricing_nav(): - return [ - { - "name": "Pricing", - "link": "main.pricing", - }, - { - "name": "How to pay", - "link": "main.how_to_pay", - }, - { - "name": "Billing details", - "link": "main.billing_details", - }, - ] - - def using_notify_nav(): return [ { "name": "Get started", "link": "main.get_started", }, + { + "name": "Pricing", + "link": "main.pricing", + }, { "name": "Trial mode", "link": "main.trial_mode_new", diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index d23a91979..3c6cd9fe2 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -138,20 +138,7 @@ {% endblock %} {% block footer %} - {% set meta_items = [ - { - "href": url_for("main.privacy"), - "text": "Privacy" - }, - { - "href": url_for("main.cookies"), - "text": "Cookies" - }, - { - "href": url_for("main.accessibility_statement"), - "text": "Accessibility statement" - } - ] %} + {% if current_service and current_service.research_mode %} {% set meta_suffix = 'Built by the Technology Transformation Serviceresearch mode' %} @@ -162,28 +149,6 @@ {{ govukFooter({ "classes": "js-footer", "navigation": [ - { - "title": "Support", - "columns": 1, - "items": [ - { - "href": url_for('main.support'), - "text": "Contact support" - }, - { - "href": "https://status.notifications.service.gov.uk", - "text": "System status" - }, - { - "href": url_for('main.performance'), - "text": "Performance data" - }, - { - "href": "https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC", - "text": "Chat to us on Slack" - } - ] - }, { "title": "About Notify", "columns": 1, @@ -196,10 +161,6 @@ "href": url_for("main.roadmap"), "text": "Roadmap" }, - { - "href": url_for("main.who_can_use_notify"), - "text": "Who can use Notify", - }, { "href": url_for("main.security"), "text": "Security" @@ -208,28 +169,6 @@ "href": url_for("main.terms"), "text": "Terms of use" }, - { - "href": "https://gds.blog.gov.uk/category/gov-uk-notify/", - "text": "Blog" - } - ] - }, - { - "title": "Pricing and payment", - "columns": 1, - "items": [ - { - "href": url_for("main.pricing"), - "text": "Pricing" - }, - { - "href": url_for("main.how_to_pay"), - "text": "How to pay" - }, - { - "href": url_for("main.billing_details"), - "text": "Billing details" - } ] }, { @@ -240,6 +179,10 @@ "href": url_for("main.get_started"), "text": "Get started" }, + { + "href": url_for("main.pricing"), + "text": "Pricing" + }, { "href": url_for("main.trial_mode_new"), "text": "Trial mode" @@ -257,7 +200,17 @@ "text": "API documentation" } ] - } + }, + { + "title": "Support", + "columns": 1, + "items": [ + { + "href": url_for('main.support'), + "text": "Contact us" + }, + ] + }, ], "meta": { "items": meta_items, diff --git a/app/templates/vendor/govuk-frontend/components/footer/template.njk b/app/templates/vendor/govuk-frontend/components/footer/template.njk index 1e797312a..7c6439071 100644 --- a/app/templates/vendor/govuk-frontend/components/footer/template.njk +++ b/app/templates/vendor/govuk-frontend/components/footer/template.njk @@ -50,37 +50,6 @@ {% endif %} {% endif %} - {#- The SVG needs `focusable="false"` so that Internet Explorer does not - treat it as an interactive element - without this it will be - 'focusable' when using the keyboard to navigate. #} - - - All content is available under the - Open Government Licence v3.0, except where otherwise stated - - - diff --git a/app/templates/views/features.html b/app/templates/views/features.html index 0f3352f54..5024f51fa 100644 --- a/app/templates/views/features.html +++ b/app/templates/views/features.html @@ -9,7 +9,7 @@ {% block content_column_content %}

Features

-

If you work for central government, a local authority or the NHS, you can use US Notify to keep your users updated.

+

If you work for the federal government, you can use US Notify to keep your users updated.

Notify makes it easy to create, customise and send:

  • emails
  • @@ -70,8 +70,8 @@

    Notify uses two-factor authentication (2FA) to keep your account secure. When you sign in, we’ll send a unique one-time code to your phone and ask you to enter it before we let you use your account.

    Read more about security. -

    Support

    + {% endblock %} diff --git a/app/templates/views/guidance/index.html b/app/templates/views/guidance/index.html index 29af61c8b..747dabb28 100644 --- a/app/templates/views/guidance/index.html +++ b/app/templates/views/guidance/index.html @@ -23,7 +23,7 @@

    More information

    -

    The US Notify Service Manual has advice on:

    +

    The UK Notify Service Manual has additional advice on:

    • planning and writing text messages and emails
    • diff --git a/app/templates/views/guidance/who-can-use-notify.html b/app/templates/views/guidance/who-can-use-notify.html deleted file mode 100644 index f6ac41bfb..000000000 --- a/app/templates/views/guidance/who-can-use-notify.html +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "content_template.html" %} -{% from "components/page-header.html" import page_header %} - -{% block per_page_title %} - Who can use Notify -{% endblock %} - -{% block content_column_content %} - - {{ page_header( - 'Who can use Notify' - ) }} - -

      - US Notify is available to: -

      -
        -
      • central government departments
      • -
      • emergency services
      • -
      • local authorities
      • -
      • the armed forces
      • -
      • the NHS and GP practices
      • -
      • state-funded schools
      • -
      -

      - If you work for one of these organisations but get an error when you try to create an account, contact support. -

      - -

      Suppliers

      -

      - If you’re doing work for a public sector organisation you can use US Notify. -

      -

      - Someone from the public sector organisation you’re working with needs to set up the account. Then they can invite you as a team member. -

      - -

      Charities

      -

      - Notify is not currently available to charities. -

      - -

      Members of the public

      -

      - The US Notify service is only for people who work in the government - or other public sector organisations. -

      -

      - Find government services and information on usa.gov. -

      - -{% endblock %} diff --git a/app/templates/views/pricing/how-to-pay.html b/app/templates/views/pricing/how-to-pay.html index afc8b6c2e..9598ba50e 100644 --- a/app/templates/views/pricing/how-to-pay.html +++ b/app/templates/views/pricing/how-to-pay.html @@ -9,7 +9,7 @@ {{ page_header('How to pay') }} -

      + {% endblock %} diff --git a/app/templates/views/security.html b/app/templates/views/security.html index 7f27f353a..02548ebad 100644 --- a/app/templates/views/security.html +++ b/app/templates/views/security.html @@ -23,22 +23,22 @@

    Any recipient data you upload is only held for 7 days.

    If you send a file by email, the file will be available for the recipient to download for 18 months.

    -

    The Cabinet Office acts as data processor for Notify. Your organisation is the data controller.

    -

    Data Protection Act

    + +

    Technical security

    -

    Other technical security controls on Notify include:

    +

    Protect sensitive information

    Some messages include sensitive information like security codes or password reset links.

    @@ -54,16 +54,16 @@

If signing in with a text message is a problem for your team, contact us to find out about using an email link instead.

-

Information risk management

+ -

How we manage risks on Notify

+ -

Cabinet Office approval

+ {% endblock %} diff --git a/app/templates/views/support/index.html b/app/templates/views/support/index.html index 9473a65e1..9958024a1 100644 --- a/app/templates/views/support/index.html +++ b/app/templates/views/support/index.html @@ -3,15 +3,20 @@ {% from "components/form.html" import form_wrapper %} {% block per_page_title %} - Support + Contact us {% endblock %} {% block maincolumn_content %} -

Support

-

US Notify provides 24-hour online support.

+

Contact us

+ +

We are available at tts-benefits-studio@gsa.gov.

- {% call form_wrapper() %} +

You can expect a response within 1 business day.

+ + + + {% endblock %} From 182130d15847363440010cd55059c15a542b6f0a Mon Sep 17 00:00:00 2001 From: Tim Lowden Date: Wed, 2 Nov 2022 08:16:30 -0400 Subject: [PATCH 05/13] Update roadmap.html @em-herrick made a good point that `unidirectional` and `bidirectional` were prob not the best choices for plain language. I have swapped to `one-way` and `two-way` messaging here. --- app/templates/views/roadmap.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/templates/views/roadmap.html b/app/templates/views/roadmap.html index 23a1bdfac..cbacecc28 100644 --- a/app/templates/views/roadmap.html +++ b/app/templates/views/roadmap.html @@ -39,8 +39,7 @@

Features prioritized during this stage:

    - -
  • Bulk, individually customizable SMS sending via web UI
  • +
  • Bulk, individually customizable one-way SMS sending via web UI
  • Organization permissions settings for various team members to edit/send
  • Reusable message templates
  • 7-day records deletion
  • @@ -63,7 +62,7 @@
    • SMS sending via API integration
    • -
    • Single-level decision bidirectionality (e.g. reply “YES” if, or “NO” if…)
    • +
    • Single-level decision two-way messaging (e.g. reply “YES” if, or “NO” if…)
    • Self-service account creation
    • Application status page
    • Scheduled send option
    • @@ -78,8 +77,8 @@
      • Email sending via UI and API
      • -
      • Multiple-level decision bidirectionality (greater than one layer decision-tree)
      • -
      • Open-text reply bidirectionality (rather than reply yes or no, 1 or 2, etc.)
      • +
      • Multiple-level decision two-way messaging (greater than one layer decision-tree)
      • +
      • Open-text reply two-way messaging (rather than reply yes or no, 1 or 2, etc.)
      • Multilingual interface and content library options
      • Recurring scheduled send (e.g. “Send each Monday for 3 weeks”)
      • From 919ac4f1ab77ddc8a9fad905b07e2fc2243a481b Mon Sep 17 00:00:00 2001 From: Tim Lowden Date: Wed, 2 Nov 2022 08:18:50 -0400 Subject: [PATCH 06/13] Update features.html Quick UK to US English spelling change --- app/templates/views/features.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/views/features.html b/app/templates/views/features.html index 5024f51fa..dc2ee2051 100644 --- a/app/templates/views/features.html +++ b/app/templates/views/features.html @@ -10,7 +10,7 @@

        Features

        If you work for the federal government, you can use US Notify to keep your users updated.

        -

        Notify makes it easy to create, customise and send:

        +

        Notify makes it easy to create, customize and send:

        • emails
        • text messages
        • From 9692185cd6a6869cf39985a7ae206a102b940a0f Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Wed, 2 Nov 2022 10:42:08 -0400 Subject: [PATCH 07/13] some test tweaks for page reductions --- app/templates/views/support/index.html | 2 +- tests/app/main/views/test_feedback.py | 2 ++ tests/app/main/views/test_index.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/templates/views/support/index.html b/app/templates/views/support/index.html index 9958024a1..be8d9dfcc 100644 --- a/app/templates/views/support/index.html +++ b/app/templates/views/support/index.html @@ -10,7 +10,7 @@

          Contact us

          -

          We are available at tts-benefits-studio@gsa.gov.

          +

          We are available at tts-benefits-studio@gsa.gov.

          You can expect a response within 1 business day.

          diff --git a/tests/app/main/views/test_feedback.py b/tests/app/main/views/test_feedback.py index 4c01d2a37..a0f0bd0ea 100644 --- a/tests/app/main/views/test_feedback.py +++ b/tests/app/main/views/test_feedback.py @@ -21,6 +21,7 @@ def no_redirect(): return lambda: None +@pytest.mark.skip(reason="Not currently using Zendesk") def test_get_support_index_page( client_request, ): @@ -41,6 +42,7 @@ def test_get_support_index_page( ) == 'Continue' +@pytest.mark.skip(reason="Not currently using Zendesk") def test_get_support_index_page_when_signed_out( client_request, ): diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index 71c5a78be..3185b5135 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -98,7 +98,7 @@ def test_hiding_pages_from_search_engines( 'features_letters', 'how_to_pay', 'get_started', 'guidance_index', 'branding_and_customisation', 'create_and_send_messages', 'edit_and_format_messages', - 'send_files_by_email', 'upload_a_letter', 'who_can_use_notify', + 'send_files_by_email', 'upload_a_letter', 'billing_details', ]) def test_static_pages( From 3386317f5b0881225109fc3ff27b1faeb315491b Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Wed, 2 Nov 2022 11:02:32 -0400 Subject: [PATCH 08/13] trim non-existant pages further --- app/main/validators.py | 2 +- app/main/views/index.py | 10 +--------- app/templates/views/get-started.html | 3 --- tests/app/main/views/test_index.py | 1 - tests/app/main/views/test_register.py | 2 +- tests/app/test_navigation.py | 1 - 6 files changed, 3 insertions(+), 16 deletions(-) diff --git a/app/main/validators.py b/app/main/validators.py index 6294764fc..3b1d5ab61 100644 --- a/app/main/validators.py +++ b/app/main/validators.py @@ -47,7 +47,7 @@ class ValidGovEmail: message = ''' Enter a public sector email address or find out who can use Notify - '''.format(url_for('main.who_can_use_notify')) + '''.format(url_for('main.features')) if not is_gov_user(field.data.lower()): raise ValidationError(message) diff --git a/app/main/views/index.py b/app/main/views/index.py index 6b1dae713..836adf39d 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -293,15 +293,7 @@ def get_started(): @main.route('/using-notify/who-its-for') def who_its_for(): - return redirect(url_for('.who_can_use_notify'), 301) - - -@main.route('/using-notify/who-can-use-notify') -def who_can_use_notify(): - return render_template( - 'views/guidance/who-can-use-notify.html', - navigation_links=features_nav(), - ) + return redirect(url_for('.features'), 301) @main.route('/trial-mode') diff --git a/app/templates/views/get-started.html b/app/templates/views/get-started.html index 7dd6f83fc..b8d522a45 100644 --- a/app/templates/views/get-started.html +++ b/app/templates/views/get-started.html @@ -15,9 +15,6 @@
        • Check if US Notify is right for you

          Read about our features, pricing and roadmap.

          -

          - Check whether your organisation can use Notify. -

        • diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index 3185b5135..5c342da70 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -163,7 +163,6 @@ def test_guidance_pages_link_to_service_pages_when_signed_in( ('old_using_notify', 'using_notify'), ('delivery_and_failure', 'message_status'), ('callbacks', 'documentation'), - ('who_its_for', 'who_can_use_notify'), ]) def test_old_static_pages_redirect( client_request, diff --git a/tests/app/main/views/test_register.py b/tests/app/main/views/test_register.py index d9c523b3c..525b905a8 100644 --- a/tests/app/main/views/test_register.py +++ b/tests/app/main/views/test_register.py @@ -125,7 +125,7 @@ def test_should_return_200_when_email_is_not_gov_uk( page.select_one('.govuk-error-message').text ) assert page.select_one('.govuk-error-message a')['href'] == url_for( - 'main.who_can_use_notify' + 'main.features' ) diff --git a/tests/app/test_navigation.py b/tests/app/test_navigation.py index 334190815..d2a52a2b2 100644 --- a/tests/app/test_navigation.py +++ b/tests/app/test_navigation.py @@ -332,7 +332,6 @@ EXCLUDED_ENDPOINTS = tuple(map(Navigation.get_endpoint_with_blueprint, { 'webauthn_complete_register', 'webauthn_begin_authentication', 'webauthn_complete_authentication', - 'who_can_use_notify', 'who_its_for', })) From 43201f37fa8a8fb443cd49a151848d295252b866 Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Wed, 2 Nov 2022 14:42:32 -0400 Subject: [PATCH 09/13] Switch terraform over to cloud.gov org --- terraform/bootstrap/import.sh | 4 +-- terraform/bootstrap/main.tf | 4 +-- terraform/bootstrap/run.sh | 2 +- terraform/bootstrap/teardown_creds.sh | 2 +- terraform/bootstrap/variables.tf | 4 ++- terraform/create_service_account.sh | 2 +- terraform/demo/main.tf | 48 +++++++++++++++++++++++++++ terraform/demo/providers.tf | 17 ++++++++++ terraform/demo/variables.tf | 5 +++ terraform/destroy_service_account.sh | 2 +- terraform/production/main.tf | 8 ++--- terraform/production/providers.tf | 2 +- terraform/set_space_egress.sh | 2 +- terraform/staging/main.tf | 30 ++++++++++------- terraform/staging/providers.tf | 2 +- 15 files changed, 106 insertions(+), 28 deletions(-) create mode 100644 terraform/demo/main.tf create mode 100644 terraform/demo/providers.tf create mode 100644 terraform/demo/variables.tf diff --git a/terraform/bootstrap/import.sh b/terraform/bootstrap/import.sh index 88b1e40d2..9140711f5 100755 --- a/terraform/bootstrap/import.sh +++ b/terraform/bootstrap/import.sh @@ -4,8 +4,8 @@ read -p "Are you sure you want to import terraform state (y/n)? " verify if [[ $verify == "y" ]]; then echo "Importing bootstrap state" - ./run.sh import module.s3.cloudfoundry_service_instance.bucket 31204bcc-aae3-4cd3-8b59-5055a338d44f - ./run.sh import cloudfoundry_service_key.bucket_creds 483a6ac5-4ba0-48ad-9850-ef87b51aaa08 + ./run.sh import module.s3.cloudfoundry_service_instance.bucket 6b759c13-6253-4a64-9bda-dd1f620185b0 + ./run.sh import cloudfoundry_service_key.bucket_creds a8e40295-68b7-42ba-8955-d82ba262e948 ./run.sh plan else echo "Not importing bootstrap state" diff --git a/terraform/bootstrap/main.tf b/terraform/bootstrap/main.tf index f00fff4c5..f51d5bd2d 100644 --- a/terraform/bootstrap/main.tf +++ b/terraform/bootstrap/main.tf @@ -9,8 +9,8 @@ module "s3" { cf_api_url = local.cf_api_url cf_user = var.cf_user cf_password = var.cf_password - cf_org_name = "gsa-10x-prototyping" - cf_space_name = "10x-notifications" + cf_org_name = "gsa-tts-benefits-studio-prototyping" + cf_space_name = "notify-management" s3_service_name = local.s3_service_name } diff --git a/terraform/bootstrap/run.sh b/terraform/bootstrap/run.sh index 404987590..1ac395444 100755 --- a/terraform/bootstrap/run.sh +++ b/terraform/bootstrap/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash if [[ ! -f "secrets.auto.tfvars" ]]; then - ../create_service_account.sh -s 10x-notifications -u config-bootstrap-deployer > secrets.auto.tfvars + ../create_service_account.sh -s notify-management -u config-bootstrap-deployer > secrets.auto.tfvars fi if [[ $# -gt 0 ]]; then diff --git a/terraform/bootstrap/teardown_creds.sh b/terraform/bootstrap/teardown_creds.sh index 196e3756f..77207a69b 100755 --- a/terraform/bootstrap/teardown_creds.sh +++ b/terraform/bootstrap/teardown_creds.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -../destroy_service_account.sh -s 10x-notifications -u config-bootstrap-deployer +../destroy_service_account.sh -s notify-management -u config-bootstrap-deployer rm secrets.auto.tfvars diff --git a/terraform/bootstrap/variables.tf b/terraform/bootstrap/variables.tf index 2fe500544..a24f2f3f8 100644 --- a/terraform/bootstrap/variables.tf +++ b/terraform/bootstrap/variables.tf @@ -1,2 +1,4 @@ -variable "cf_password" {} +variable "cf_password" { + sensitive = true +} variable "cf_user" {} diff --git a/terraform/create_service_account.sh b/terraform/create_service_account.sh index 1a6b0eb1c..fafe83adf 100755 --- a/terraform/create_service_account.sh +++ b/terraform/create_service_account.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -org="gsa-10x-prototyping" +org="gsa-tts-benefits-studio-prototyping" usage=" $0: Create a Service User Account for a given space diff --git a/terraform/demo/main.tf b/terraform/demo/main.tf new file mode 100644 index 000000000..14ed3cea4 --- /dev/null +++ b/terraform/demo/main.tf @@ -0,0 +1,48 @@ +locals { + cf_org_name = "gsa-tts-benefits-studio-prototyping" + cf_space_name = "notify-demo" + env = "demo" + app_name = "notify-admin" + recursive_delete = false +} + +module "redis" { + source = "github.com/18f/terraform-cloudgov//redis" + + cf_user = var.cf_user + cf_password = var.cf_password + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + env = local.env + app_name = local.app_name + recursive_delete = local.recursive_delete + redis_plan_name = "redis-dev" +} + +module "logo_upload_bucket" { + source = "github.com/18f/terraform-cloudgov//s3" + + cf_user = var.cf_user + cf_password = var.cf_password + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + recursive_delete = local.recursive_delete + s3_service_name = "${local.app_name}-logo-upload-bucket-${local.env}" +} + +# ########################################################################## +# The following lines need to be commented out for the initial `terraform apply` +# It can be re-enabled after: +# 1) the api app has first been deployed +# 2) the admin app has first been deployed +########################################################################### +# module "api_network_route" { +# source = "../shared/container_networking" + +# cf_user = var.cf_user +# cf_password = var.cf_password +# cf_org_name = local.cf_org_name +# cf_space_name = local.cf_space_name +# source_app_name = "${local.app_name}-${local.env}" +# destination_app_name = "notify-api-${local.env}" +# } diff --git a/terraform/demo/providers.tf b/terraform/demo/providers.tf new file mode 100644 index 000000000..5a7691ff0 --- /dev/null +++ b/terraform/demo/providers.tf @@ -0,0 +1,17 @@ +terraform { + required_version = "~> 1.0" + required_providers { + cloudfoundry = { + source = "cloudfoundry-community/cloudfoundry" + version = "0.15.5" + } + } + + backend "s3" { + bucket = "cg-6b759c13-6253-4a64-9bda-dd1f620185b0" + key = "admin.tfstate.demo" + encrypt = "true" + region = "us-gov-west-1" + profile = "notify-terraform-backend" + } +} diff --git a/terraform/demo/variables.tf b/terraform/demo/variables.tf new file mode 100644 index 000000000..bd8f74131 --- /dev/null +++ b/terraform/demo/variables.tf @@ -0,0 +1,5 @@ +variable "cf_password" { + type = string + sensitive = true +} +variable "cf_user" {} diff --git a/terraform/destroy_service_account.sh b/terraform/destroy_service_account.sh index caeb12901..e8db20474 100755 --- a/terraform/destroy_service_account.sh +++ b/terraform/destroy_service_account.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -org="gsa-10x-prototyping" +org="gsa-tts-benefits-studio-prototyping" usage=" $0: Destroy a Service User Account in a given space diff --git a/terraform/production/main.tf b/terraform/production/main.tf index 377654b01..88ccb5ae5 100644 --- a/terraform/production/main.tf +++ b/terraform/production/main.tf @@ -1,8 +1,8 @@ locals { - cf_org_name = "TKTK" - cf_space_name = "TKTK" + cf_org_name = "gsa-tts-benefits-studio-prototyping" + cf_space_name = "notify-prod" env = "production" - app_name = "notifications-admin" + app_name = "notify-admin" recursive_delete = false } @@ -44,7 +44,7 @@ module "logo_upload_bucket" { # cf_org_name = local.cf_org_name # cf_space_name = local.cf_space_name # source_app_name = "${local.app_name}-${local.env}" -# destination_app_name = "notifications-api-${local.env}" +# destination_app_name = "notify-api-${local.env}" # } # ########################################################################## diff --git a/terraform/production/providers.tf b/terraform/production/providers.tf index 685d356f9..276ad5105 100644 --- a/terraform/production/providers.tf +++ b/terraform/production/providers.tf @@ -8,7 +8,7 @@ terraform { } backend "s3" { - bucket = "cg-31204bcc-aae3-4cd3-8b59-5055a338d44f" + bucket = "cg-6b759c13-6253-4a64-9bda-dd1f620185b0" key = "admin.tfstate.prod" encrypt = "true" region = "us-gov-west-1" diff --git a/terraform/set_space_egress.sh b/terraform/set_space_egress.sh index 7eeaaf989..e3893e809 100755 --- a/terraform/set_space_egress.sh +++ b/terraform/set_space_egress.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -org="gsa-10x-prototyping" +org="gsa-tts-benefits-studio-prototyping" usage=" $0: Set egress rules for given space diff --git a/terraform/staging/main.tf b/terraform/staging/main.tf index d2a62db7f..a23570ca7 100644 --- a/terraform/staging/main.tf +++ b/terraform/staging/main.tf @@ -1,8 +1,8 @@ locals { - cf_org_name = "gsa-10x-prototyping" - cf_space_name = "10x-notifications" + cf_org_name = "gsa-tts-benefits-studio-prototyping" + cf_space_name = "notify-staging" env = "staging" - app_name = "notifications-admin" + app_name = "notify-admin" recursive_delete = true } @@ -30,13 +30,19 @@ module "logo_upload_bucket" { s3_service_name = "${local.app_name}-logo-upload-bucket-${local.env}" } -module "api_network_route" { - source = "../shared/container_networking" +# ########################################################################## +# The following lines need to be commented out for the initial `terraform apply` +# It can be re-enabled after: +# 1) the api app has first been deployed +# 2) the admin app has first been deployed +########################################################################### +# module "api_network_route" { +# source = "../shared/container_networking" - cf_user = var.cf_user - cf_password = var.cf_password - cf_org_name = local.cf_org_name - cf_space_name = local.cf_space_name - source_app_name = "${local.app_name}-${local.env}" - destination_app_name = "notifications-api-${local.env}" -} +# cf_user = var.cf_user +# cf_password = var.cf_password +# cf_org_name = local.cf_org_name +# cf_space_name = local.cf_space_name +# source_app_name = "${local.app_name}-${local.env}" +# destination_app_name = "notify-api-${local.env}" +# } diff --git a/terraform/staging/providers.tf b/terraform/staging/providers.tf index 826e74267..ab8e8ced0 100644 --- a/terraform/staging/providers.tf +++ b/terraform/staging/providers.tf @@ -8,7 +8,7 @@ terraform { } backend "s3" { - bucket = "cg-31204bcc-aae3-4cd3-8b59-5055a338d44f" + bucket = "cg-6b759c13-6253-4a64-9bda-dd1f620185b0" key = "admin.tfstate.stage" encrypt = "true" region = "us-gov-west-1" From bdc38b2e72b82df541de0dba05a3dd41852c043c Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Wed, 2 Nov 2022 15:31:01 -0400 Subject: [PATCH 10/13] Setup github workflows for new spaces --- .github/workflows/deploy-demo.yml | 68 +++++++++++++++++++ .github/workflows/deploy.yml | 31 +++------ .github/workflows/terraform-demo.yml | 79 ++++++++++++++++++++++ .github/workflows/terraform-production.yml | 10 +-- .github/workflows/terraform-staging.yml | 5 +- deploy-config/demo.yml | 4 ++ deploy-config/production.yml | 4 ++ deploy-config/staging.yml | 4 ++ 8 files changed, 178 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/deploy-demo.yml create mode 100644 .github/workflows/terraform-demo.yml create mode 100644 deploy-config/demo.yml create mode 100644 deploy-config/production.yml create mode 100644 deploy-config/staging.yml diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml new file mode 100644 index 000000000..a0ae9f598 --- /dev/null +++ b/.github/workflows/deploy-demo.yml @@ -0,0 +1,68 @@ +name: Deploy to demo environment + +on: + push: + branches: [ production ] + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + environment: demo + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Check for changes to Terraform + id: changed-terraform-files + uses: tj-actions/changed-files@v1.1.2 + with: + files: terraform/demo + - name: Terraform init + if: steps.changed-terraform-files.outputs.any_changed == 'true' + working-directory: terraform/demo + env: + AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} + run: terraform init + - name: Terraform apply + if: steps.changed-terraform-files.outputs.any_changed == 'true' + working-directory: terraform/demo + env: + AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} + TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }} + TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} + run: terraform apply -auto-approve -input=false + + - uses: ./.github/actions/setup-project + + - name: Deploy to cloud.gov + uses: 18f/cg-deploy-action@main + env: + DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }} + BASIC_AUTH_PASSWORD: ${{ secrets.BASIC_AUTH_PASSWORD }} + REDIS_ENABLED: ${{ secrets.REDIS_ENABLED }} + with: + cf_username: ${{ secrets.CLOUDGOV_USERNAME }} + cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} + cf_org: gsa-tts-benefits-studio-prototyping + cf_space: notify-demo + push_arguments: >- + --vars-file deploy-config/staging.yml + --var DANGEROUS_SALT="$DANGEROUS_SALT" + --var SECRET_KEY="$SECRET_KEY" + --var AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" + --var AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" + --var REDIS_ENABLED="$REDIS_ENABLED" + --var ADMIN_CLIENT_USERNAME="notify-admin" + --var ADMIN_CLIENT_SECRET="$ADMIN_CLIENT_SECRET" + --var BASIC_AUTH_USERNAME="curiousabout" + --var BASIC_AUTH_PASSWORD="$BASIC_AUTH_PASSWORD" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1efb81a27..5795c1f15 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,13 +15,8 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' }} + environment: staging steps: - - name: Install container dependencies - run: | - sudo apt-get update \ - && sudo apt-get install -y --no-install-recommends \ - libcurl4-openssl-dev - - uses: actions/checkout@v3 with: fetch-depth: 2 @@ -48,31 +43,25 @@ jobs: TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} run: terraform apply -auto-approve -input=false - - name: Set up Python 3.9 - uses: actions/setup-python@v3 - with: - python-version: "3.9" - - - name: Install application dependencies - run: make bootstrap + - uses: ./.github/actions/setup-project - name: Deploy to cloud.gov uses: 18f/cg-deploy-action@main env: - DANGEROUS_SALT: ${{ secrets.PROD_DANGEROUS_SALT }} - SECRET_KEY: ${{ secrets.PROD_SECRET_KEY }} + DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - ADMIN_CLIENT_SECRET: ${{ secrets.PROD_ADMIN_CLIENT_SECRET }} + ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }} BASIC_AUTH_PASSWORD: ${{ secrets.BASIC_AUTH_PASSWORD }} REDIS_ENABLED: ${{ secrets.REDIS_ENABLED }} with: cf_username: ${{ secrets.CLOUDGOV_USERNAME }} cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} - cf_org: gsa-10x-prototyping - cf_space: 10x-notifications + cf_org: gsa-tts-benefits-studio-prototyping + cf_space: notify-staging push_arguments: >- - --var env=staging + --vars-file deploy-config/staging.yml --var DANGEROUS_SALT="$DANGEROUS_SALT" --var SECRET_KEY="$SECRET_KEY" --var AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" @@ -87,4 +76,6 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'failure' }} steps: - - run: echo 'Checks failed, not deploying' + - uses: actions/github-script@v6 + with: + script: core.setFailed('Checks failed, not deploying') diff --git a/.github/workflows/terraform-demo.yml b/.github/workflows/terraform-demo.yml new file mode 100644 index 000000000..29b8fa397 --- /dev/null +++ b/.github/workflows/terraform-demo.yml @@ -0,0 +1,79 @@ +name: Run Terraform plan in demo + +on: + pull_request: + branches: [ production ] + paths: [ 'terraform/**' ] + +defaults: + run: + working-directory: terraform/demo + +jobs: + terraform: + name: Terraform plan + runs-on: ubuntu-latest + environment: demo + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Terraform format + id: format + run: terraform fmt -check + + - name: Terraform init + id: init + env: + AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} + run: terraform init + + - name: Terraform validate + id: validation + run: terraform validate -no-color + + - name: Terraform plan + id: plan + env: + AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} + TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }} + TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} + run: terraform plan -no-color -input=false 2>&1 | tee plan_output.txt + + - name: Read Terraform plan output file + id: terraform_output + uses: juliangruber/read-file-action@v1 + if: ${{ always() }} + with: + path: ./terraform/demo/plan_output.txt + + # inspiration: https://learn.hashicorp.com/tutorials/terraform/github-actions#review-actions-workflow + - name: Update PR + uses: actions/github-script@v6 + # we would like to update the PR even when a prior step failed + if: ${{ always() }} + with: + script: | + const output = `Terraform Format and Style: ${{ steps.format.outcome }} + Terraform Initialization: ${{ steps.init.outcome }} + Terraform Validation: ${{ steps.validation.outcome }} + Terraform Plan: ${{ steps.plan.outcome }} + +
          Show Plan + + \`\`\`\n + ${{ steps.terraform_output.outputs.content }} + \`\`\` + +
          + + *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: output + }) diff --git a/.github/workflows/terraform-production.yml b/.github/workflows/terraform-production.yml index 7861c3205..e48000438 100644 --- a/.github/workflows/terraform-production.yml +++ b/.github/workflows/terraform-production.yml @@ -2,7 +2,7 @@ name: Run Terraform plan in production on: pull_request: - branches: [ production ] + branches: [ production-disabled-for-now ] paths: [ 'terraform/**' ] defaults: @@ -38,8 +38,8 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} - TF_VAR_cf_user: ${{ secrets.CF_USERNAME }} - TF_VAR_cf_password: ${{ secrets.CF_PASSWORD }} + TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }} + TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} run: terraform plan -no-color -input=false 2>&1 | tee plan_output.txt - name: Read Terraform plan output file @@ -51,7 +51,7 @@ jobs: # inspiration: https://learn.hashicorp.com/tutorials/terraform/github-actions#review-actions-workflow - name: Update PR - uses: actions/github-script@v4 + uses: actions/github-script@v6 # we would like to update the PR even when a prior step failed if: ${{ always() }} with: @@ -71,7 +71,7 @@ jobs: *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, diff --git a/.github/workflows/terraform-staging.yml b/.github/workflows/terraform-staging.yml index 5c7d2a6ff..b1ac54f8f 100644 --- a/.github/workflows/terraform-staging.yml +++ b/.github/workflows/terraform-staging.yml @@ -13,6 +13,7 @@ jobs: terraform: name: Terraform plan runs-on: ubuntu-latest + environment: staging steps: - name: Checkout uses: actions/checkout@v2 @@ -50,7 +51,7 @@ jobs: # inspiration: https://learn.hashicorp.com/tutorials/terraform/github-actions#review-actions-workflow - name: Update PR - uses: actions/github-script@v4 + uses: actions/github-script@v6 # we would like to update the PR even when a prior step failed if: ${{ always() }} with: @@ -70,7 +71,7 @@ jobs: *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, diff --git a/deploy-config/demo.yml b/deploy-config/demo.yml new file mode 100644 index 000000000..2f82ea6e6 --- /dev/null +++ b/deploy-config/demo.yml @@ -0,0 +1,4 @@ +env: demo +instances: 1 +memory: 1G +public_admin_route: notify-demo.app.cloud.gov diff --git a/deploy-config/production.yml b/deploy-config/production.yml new file mode 100644 index 000000000..add5bbef2 --- /dev/null +++ b/deploy-config/production.yml @@ -0,0 +1,4 @@ +env: production +instances: 2 +memory: 1G +public_admin_route: notify.app.cloud.gov diff --git a/deploy-config/staging.yml b/deploy-config/staging.yml new file mode 100644 index 000000000..9478a72a2 --- /dev/null +++ b/deploy-config/staging.yml @@ -0,0 +1,4 @@ +env: staging +instances: 1 +memory: 1G +public_admin_route: notify-staging.app.cloud.gov From 3c74027a4ab28fe0149c9790c5018e5d38f08a5e Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Wed, 2 Nov 2022 16:05:53 -0400 Subject: [PATCH 11/13] Add demo application environment --- app/config.py | 5 +++++ manifest.yml | 29 ++++++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/app/config.py b/app/config.py index cabc33ab7..3cb91b68e 100644 --- a/app/config.py +++ b/app/config.py @@ -148,6 +148,10 @@ class Staging(Production): HEADER_COLOUR = '#6F72AF' # $mauve +class Demo(Staging): + pass + + class Scanning(Production): BASIC_AUTH_FORCE = False HTTP_PROTOCOL = 'http' @@ -162,5 +166,6 @@ configs = { 'test': Test, 'scanning': Scanning, 'staging': Staging, + 'demo': Demo, 'production': Production } diff --git a/manifest.yml b/manifest.yml index 36b4eaf62..8b7b5a18b 100644 --- a/manifest.yml +++ b/manifest.yml @@ -1,45 +1,44 @@ --- applications: - - name: notifications-admin-((env)) + - name: notify-admin-((env)) buildpack: python_buildpack - memory: 1G + instances: ((instances)) + memory: ((memory)) health-check-type: http health-check-http-endpoint: '/_status?simple=true' health-check-invocation-timeout: 10 routes: - - route: notifications-admin.app.cloud.gov + - route: ((public_admin_route)) services: - - notifications-admin-redis-((env)) - - notifications-api-csv-upload-bucket-((env)) - - notifications-api-contact-list-bucket-((env)) - - notifications-admin-logo-upload-bucket-((env)) + - notify-admin-redis-((env)) + - notify-api-csv-upload-bucket-((env)) + - notify-api-contact-list-bucket-((env)) + - notify-admin-logo-upload-bucket-((env)) env: + NOTIFY_ENVIRONMENT: ((env)) NOTIFY_APP_NAME: admin NOTIFY_LOG_PATH: /home/vcap/logs/app.log NOTIFY_LOG_LEVEL: INFO FLASK_APP: application.py FLASK_ENV: production - DEPLOY_ENV: ((env)) REDIS_ENABLED: ((REDIS_ENABLED)) - - NOTIFY_ENVIRONMENT: ((env)) + ADMIN_BASE_URL: https://((public_admin_route)) + API_HOST_NAME: https://notify-api-((env)).apps.internal:61443 # Credentials variables ADMIN_CLIENT_SECRET: ((ADMIN_CLIENT_SECRET)) ADMIN_CLIENT_USERNAME: ((ADMIN_CLIENT_USERNAME)) - ADMIN_BASE_URL: https://notifications-admin.app.cloud.gov - API_HOST_NAME: https://notifications-api-((env)).apps.internal:61443 DANGEROUS_SALT: ((DANGEROUS_SALT)) SECRET_KEY: ((SECRET_KEY)) + BASIC_AUTH_USERNAME: ((BASIC_AUTH_USERNAME)) + BASIC_AUTH_PASSWORD: ((BASIC_AUTH_PASSWORD)) AWS_REGION: us-west-2 AWS_ACCESS_KEY_ID: ((AWS_ACCESS_KEY_ID)) AWS_SECRET_ACCESS_KEY: ((AWS_SECRET_ACCESS_KEY)) - BASIC_AUTH_USERNAME: ((BASIC_AUTH_USERNAME)) - BASIC_AUTH_PASSWORD: ((BASIC_AUTH_PASSWORD)) - NOTIFY_BILLING_DETAILS: [] + NOTIFY_BILLING_DETAILS: '[]' REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt" From 0528638e5e2b77350cfbd7da0af600a6a3a0a7c8 Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Wed, 2 Nov 2022 21:56:42 +0000 Subject: [PATCH 12/13] Update cryptography library --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index adcef5503..5a5c773c2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,7 +41,7 @@ click==8.1.3 # via flask colorama==0.4.4 # via awscli -cryptography==37.0.2 +cryptography==38.0.3 # via fido2 deprecated==1.2.13 # via redis From 9364268affa841fb1c075df3922c2331e02d118d Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Thu, 3 Nov 2022 11:43:34 -0400 Subject: [PATCH 13/13] Enable network policy in staging env --- terraform/staging/main.tf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/terraform/staging/main.tf b/terraform/staging/main.tf index a23570ca7..4df6471e5 100644 --- a/terraform/staging/main.tf +++ b/terraform/staging/main.tf @@ -36,13 +36,13 @@ module "logo_upload_bucket" { # 1) the api app has first been deployed # 2) the admin app has first been deployed ########################################################################### -# module "api_network_route" { -# source = "../shared/container_networking" +module "api_network_route" { + source = "../shared/container_networking" -# cf_user = var.cf_user -# cf_password = var.cf_password -# cf_org_name = local.cf_org_name -# cf_space_name = local.cf_space_name -# source_app_name = "${local.app_name}-${local.env}" -# destination_app_name = "notify-api-${local.env}" -# } + cf_user = var.cf_user + cf_password = var.cf_password + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + source_app_name = "${local.app_name}-${local.env}" + destination_app_name = "notify-api-${local.env}" +}