Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPF-101 Update createUser() mutation resolver #112

Merged
merged 13 commits into from
Mar 4, 2024

Conversation

Vikariusu
Copy link
Contributor

@Vikariusu Vikariusu commented Feb 19, 2024

Ticket #101

This PR depends on the schema changes implemented in #111

Changes

  1. Updated CreateUserInput in users.sdl.ts to match the requirements (with one exception, see this comment)
  2. Added Redwood service validations in createUser() resolver. We already have checks for required fields on the frontend (in the form), and in GraphQL schema.
    1. Email: valid email address, unique
    2. Name: present, cannot be an empty string (also enforced from gql but the validation here is used so we can display it to the user)
    3. Agency: USDR admins can create all users, organization admins can create users within the same organization
  3. createUser() uses @requireAuth directive so only USDR admins and Organization admins can use the mutation (this was implemented in Bugfix/CPF-84 Incomplete data when creating a new user #95)

@github-actions github-actions bot added enhancement New feature or request javascript labels Feb 19, 2024
name: String!
agencyId: Int!
role: RoleEnum!
isActive: Boolean
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the ticket's requirement isActive field on CreateUserInput should be required. However, this means that we either need to pass isActive: true from the frontend (currently the form for creating users doesn't have this field), or make this field optional on CreateUserInput, allowing schema.prisma to set it to true by default.
If we would rather set it on the frontend, I can make this change.

Copy link

github-actions bot commented Feb 19, 2024

QA Summary

See our documentation for tips on how to resolve failing QA checks.

QA Check Result
🌐 Web Tests
🔗 API Tests
📏 ESLint
🧹 TFLint

Test Coverage

Coverage report for api suite
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🔴 All files 22.67 2.5 30.92 23.05
🟢  directives/requireAuth 100 100 100 100
🟢   requireAuth.ts 100 100 100 100
🟡  directives/skipAuth 50 100 0 50
🟡   skipAuth.ts 50 100 0 50 13
🔴  functions 0 100 0 0
🔴   graphql.ts 0 100 0 0 14-22
🔴  functions/cpfValidation 0 100 0 0
🔴   cpfValidation.scenarios.ts 0 100 100 0 3
🔴   cpfValidation.ts 0 100 0 0 7-26
🔴  functions/excelToJson 0 0 0 0
🔴   excelToJson.scenarios.ts 0 100 100 0 3
🔴   excelToJson.ts 0 0 0 0 12-47
🔴  graphql 0 100 100 0
🔴   agencies.sdl.ts 0 100 100 0 1
🔴   expenditureCategories.sdl.ts 0 100 100 0 1
🔴   inputTemplates.sdl.ts 0 100 100 0 1
🔴   organizations.sdl.ts 0 100 100 0 1
🔴   outputTemplates.sdl.ts 0 100 100 0 1
🔴   projects.sdl.ts 0 100 100 0 1
🔴   reportingPeriods.sdl.ts 0 100 100 0 1
🔴   subrecipients.sdl.ts 0 100 100 0 1
🔴   uploadValidations.sdl.ts 0 100 100 0 1
🔴   uploads.sdl.ts 0 100 100 0 1
🔴   users.sdl.ts 0 100 100 0 1
🔴  lib 5.09 2.22 6.66 5.22
🔴   auth.ts 18.91 9.67 25 20 45-51,84-112,131,135-170
🔴   aws.ts 27.02 12.5 18.18 27.02 46-51,67-99,126-167,180
🟢   constants.ts 100 100 100 100
🔴   db.ts 31.25 50 50 31.25 15-35,45,47
🔴   ec-codes.ts 0 100 100 0 1
🟢   logger.ts 100 100 100 100
🔴   persist-upload.js 0 0 0 0 16-295
🔴   preconditions.ts 0 0 0 0 2-3
🔴   records.js 0 0 0 0 12-214
🔴   templateRules.ts 0 0 0 0
🔴   tracer.ts 0 100 100 0 5-14
🔴   validate-upload.js 0 0 0 0 18-790
🔴   validation-error.ts 0 0 0 0 14-22
🔴   validation-rules.js 0 0 0 0 6-194
🟡  services/agencies 70.58 0 83.33 70.58
🟢   agencies.scenarios.ts 100 100 100 100
🟡   agencies.ts 68.75 0 83.33 68.75 39-47
🟢  services/expenditureCategories 92.3 100 83.33 92.3
🟢   expenditureCategories.scenarios.ts 100 100 100 100
🟢   expenditureCategories.ts 91.66 100 83.33 91.66 46
🟢  services/inputTemplates 92.3 100 83.33 92.3
🟢   inputTemplates.scenarios.ts 100 100 100 100
🟢   inputTemplates.ts 91.66 100 83.33 91.66 47
🟡  services/organizations 52 100 38.46 52
🟢   organizations.scenarios.ts 100 100 100 100
🟡   organizations.ts 50 100 38.46 50 36-66,89-113
🟢  services/outputTemplates 92.3 100 83.33 92.3
🟢   outputTemplates.scenarios.ts 100 100 100 100
🟢   outputTemplates.ts 91.66 100 83.33 91.66 43
🟡  services/projects 80 100 62.5 80
🟢   projects.scenarios.ts 100 100 100 100
🟡   projects.ts 78.57 100 62.5 78.57 45-51
🟡  services/reportingPeriods 66.66 100 45.45 66.66
🟢   reportingPeriods.scenarios.ts 100 100 100 100
🟡   reportingPeriods.ts 64.7 100 45.45 64.7 43-66
🟢  services/subrecipients 85.71 100 71.42 85.71
🟢   subrecipients.scenarios.ts 100 100 100 100
🟢   subrecipients.ts 84.61 100 71.42 84.61 47-52
🔴  services/uploadValidations 0 100 0 0
🔴   uploadValidations.scenarios.ts 0 100 100 0 5
🔴   uploadValidations.ts 0 100 0 0 9-66
🟡  services/uploads 66.66 100 41.66 66.66
🟢   uploads.scenarios.ts 100 100 100 100
🟡   uploads.ts 65 100 41.66 65 49-69
🟡  services/users 65.71 16.66 66.66 65.71
🟢   users.scenarios.ts 100 100 100 100
🟡   users.ts 63.63 16.66 63.63 63.63 43-53,80-88,94-100
Coverage report for web suite
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🔴 All files 13.36 13.83 11.23 12.67
🟢  api/src/lib 100 100 100 100
🟢   constants.ts 100 100 100 100
🔴  web/src 23.33 8.33 14.28 23.33
🔴   App.tsx 0 0 0 0 3-36
🟢   Routes.tsx 100 100 100 100
🔴   auth.ts 29.41 50 8.33 29.41 38-52,65-100
🔴   entry.client.tsx 0 0 100 0 10-22
🔴  web/src/auth 9.09 0 8.33 9.09
🔴   localAuth.ts 9.09 0 8.33 9.09 39-68,76-80
🔴  web/src/components/Agency/Agencies 0 100 0 0
🔴   Agencies.tsx 0 100 0 0 9-21
🔴  web/src/components/Agency/AgenciesCell 0 100 0 0
🔴   AgenciesCell.tsx 0 100 0 0 8-39
🔴  web/src/components/Agency/Agency 0 0 0 0
🔴   Agency.tsx 0 0 0 0 10-78
🔴  web/src/components/Agency/AgencyCell 0 100 0 0
🔴   AgencyCell.tsx 0 100 0 0 7-27
🔴  web/src/components/Agency/AgencyForm 0 0 0 0
🔴   AgencyForm.tsx 0 0 0 0 25-42
🔴  web/src/components/Agency/EditAgencyCell 0 100 0 0
🔴   EditAgencyCell.tsx 0 100 0 0 10-59
🔴  web/src/components/Agency/NewAgency 0 100 0 0
🔴   NewAgency.tsx 0 100 0 0 9-35
🟢  web/src/components/Navigation 100 66.66 100 100
🟢   Navigation.tsx 100 66.66 100 100 46-66
🔴  web/src/components/Organization/EditOrganizationCell 0 100 0 0
🔴   EditOrganizationCell.tsx 0 100 0 0 13-62
🔴  web/src/components/Organization/EditOrganizationForm 0 0 0 0
🔴   EditOrganizationForm.tsx 0 0 0 0 27-41
🔴  web/src/components/Organization/NewOrganization 0 100 0 0
🔴   NewOrganization.tsx 0 100 0 0 9-37
🔴  web/src/components/Organization/NewOrganizationForm 0 0 0 0
🔴   NewOrganizationForm.tsx 0 0 0 0 25-54
🔴  web/src/components/Organization/Organization 0 0 0 0
🔴   Organization.tsx 0 0 0 0 10-70
🔴  web/src/components/Organization/OrganizationCell 0 100 0 0
🔴   OrganizationCell.tsx 0 100 0 0 7-27
🔴  web/src/components/Organization/OrganizationPickListsCell 40.9 0 27.27 36.84
🟡   OrganizationPickListsCell.mock.ts 50 100 0 100
🔴   OrganizationPickListsCell.stories.tsx 0 0 0 0 6-32
🟡   OrganizationPickListsCell.tsx 72.72 100 50 66.66 38-63
🔴  web/src/components/Organization/Organizations 0 100 0 0
🔴   Organizations.tsx 0 100 0 0 9-21
🔴  web/src/components/Organization/OrganizationsCell 0 100 0 0
🔴   OrganizationsCell.tsx 0 100 0 0 8-37
🔴  web/src/components/ReportingPeriod/EditReportingPeriodCell 0 100 0 0
🔴   EditReportingPeriodCell.tsx 0 100 0 0 13-82
🔴  web/src/components/ReportingPeriod/NewReportingPeriod 0 100 0 0
🔴   NewReportingPeriod.tsx 0 100 0 0 9-35
🔴  web/src/components/ReportingPeriod/ReportingPeriod 0 0 0 0
🔴   ReportingPeriod.tsx 0 0 0 0 12-117
🔴  web/src/components/ReportingPeriod/ReportingPeriodCell 0 100 0 0
🔴   ReportingPeriodCell.tsx 0 100 0 0 7-37
🔴  web/src/components/ReportingPeriod/ReportingPeriodForm 0 0 0 0
🔴   ReportingPeriodForm.tsx 0 0 0 0 19-44
🔴  web/src/components/ReportingPeriod/ReportingPeriods 0 0 0 0
🔴   ReportingPeriods.tsx 0 0 0 0 13-104
🔴  web/src/components/ReportingPeriod/ReportingPeriodsCell 0 100 0 0
🔴   ReportingPeriodsCell.tsx 0 100 0 0 8-47
🟡  web/src/components/ReportingPeriodsCell 57.14 28.57 60 50
🟢   ReportingPeriodsCell.mock.ts 100 100 100 100
🔴   ReportingPeriodsCell.stories.tsx 0 0 0 0 6-32
🟢   ReportingPeriodsCell.tsx 100 66.66 100 100 66-69
🔴  web/src/components/TableBuilder 0 0 0 0
🔴   DebouncedInput.tsx 0 0 0 0 13-32
🔴   Filter.tsx 0 0 0 0 6-15
🔴   TableBuilder.tsx 0 0 0 0 22-70
🔴   TableHeader.tsx 0 0 0 0 5-42
🔴   TableRow.tsx 0 100 0 0 3-7
🟡  web/src/components/TemplateUploadReportingPeriodCell 55 0 55.55 47.05
🟢   TemplateUploadReportingPeriodCell.mock.ts 100 100 100 100
🔴   TemplateUploadReportingPeriodCell.stories.tsx 0 0 0 0 11-37
🟢   TemplateUploadReportingPeriodCell.tsx 100 100 100 100
🔴  web/src/components/Upload/EditUploadCell 0 100 0 0
🔴   EditUploadCell.tsx 0 100 0 0 10-68
🔴  web/src/components/Upload/NewUpload 0 100 0 0
🔴   NewUpload.tsx 0 100 0 0 8-32
🔴  web/src/components/Upload/Upload 0 0 0 0
🔴   Upload.tsx 0 0 0 0 12-100
🔴  web/src/components/Upload/UploadCell 0 100 0 0
🔴   UploadCell.tsx 0 100 0 0 7-32
🔴  web/src/components/Upload/UploadForm 0 0 0 0
🔴   UploadForm.tsx 0 0 0 0 21-97
🔴  web/src/components/Upload/Uploads 0 0 0 0
🔴   Uploads.tsx 0 0 0 0 9-66
🔴   columns.tsx 0 0 0 0 7-62
🔴  web/src/components/Upload/UploadsCell 0 100 0 0
🔴   UploadsCell.tsx 0 100 0 0 8-53
🔴  web/src/components/User/EditUserCell 0 100 0 0
🔴   EditUserCell.tsx 0 100 0 0 10-58
🔴  web/src/components/User/NewUser 0 100 0 0
🔴   NewUser.tsx 0 100 0 0 9-32
🔴  web/src/components/User/User 0 0 0 0
🔴   User.tsx 0 0 0 0 10-94
🔴  web/src/components/User/UserCell 0 100 0 0
🔴   UserCell.tsx 0 100 0 0 7-30
🔴  web/src/components/User/UserForm 0 0 0 0
🔴   UserForm.tsx 0 0 0 0 28-202
🔴  web/src/components/User/Users 0 100 0 0
🔴   Users.tsx 0 100 0 0 9-24
🔴  web/src/components/User/UsersCell 0 100 0 0
🔴   UsersCell.tsx 0 100 0 0 8-44
🟡  web/src/layouts/AuthenticatedLayout 60 50 100 60
🔴   AuthenticatedLayout.stories.tsx 0 100 100 0 5-13
🟢   AuthenticatedLayout.tsx 100 50 100 100 24
🟢  web/src/lib 100 100 100 100
🟢   formatters.tsx 100 100 100 100
🟢   seeds.ts 100 100 100 100
🔴  web/src/pages/Agency/AgenciesPage 0 100 0 0
🔴   AgenciesPage.tsx 0 100 0 0 8-12
🔴  web/src/pages/Agency/AgencyPage 0 100 0 0
🔴   AgencyPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/Agency/EditAgencyPage 0 100 0 0
🔴   EditAgencyPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/Agency/NewAgencyPage 0 100 0 0
🔴   NewAgencyPage.tsx 0 100 0 0 3-4
🔴  web/src/pages/FatalErrorPage 0 0 0 0
🔴   FatalErrorPage.tsx 0 0 0 0 15
🟡  web/src/pages/ForbiddenPage 50 100 100 50
🔴   ForbiddenPage.stories.tsx 0 100 100 0 5-13
🟢   ForbiddenPage.tsx 100 100 100 100
🟡  web/src/pages/LoginPage 54.54 50 66.66 54.54
🔴   LoginPage.stories.tsx 0 100 100 0 5-13
🟡   LoginPage.tsx 66.66 50 66.66 66.66 19-22
🔴  web/src/pages/NotFoundPage 0 100 0 0
🔴   NotFoundPage.tsx 0 100 0 0 2
🔴  web/src/pages/Organization/EditOrganizationPage 0 100 0 0
🔴   EditOrganizationPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/Organization/NewOrganizationPage 0 100 0 0
🔴   NewOrganizationPage.tsx 0 100 0 0 3-4
🔴  web/src/pages/Organization/OrganizationPage 0 100 0 0
🔴   OrganizationPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/Organization/OrganizationsPage 0 100 0 0
🔴   OrganizationsPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/ReportingPeriod/EditReportingPeriodPage 0 100 0 0
🔴   EditReportingPeriodPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/ReportingPeriod/NewReportingPeriodPage 0 100 0 0
🔴   NewReportingPeriodPage.tsx 0 100 0 0 3-4
🔴  web/src/pages/ReportingPeriod/ReportingPeriodPage 0 100 0 0
🔴   ReportingPeriodPage.tsx 0 100 0 0 7-8
🟡  web/src/pages/ReportingPeriod/ReportingPeriodsPage 50 100 100 50
🔴   ReportingPeriodsPage.stories.tsx 0 100 100 0 5-13
🟢   ReportingPeriodsPage.tsx 100 100 100 100
🔴  web/src/pages/Upload/EditUploadPage 0 100 0 0
🔴   EditUploadPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/Upload/NewUploadPage 0 100 0 0
🔴   NewUploadPage.tsx 0 100 0 0 3-4
🔴  web/src/pages/Upload/UploadPage 0 100 0 0
🔴   UploadPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/Upload/UploadsPage 0 100 0 0
🔴   UploadsPage.tsx 0 100 0 0 7-8
🟡  web/src/pages/UploadTemplatePage 50 100 50 50
🔴   UploadTemplatePage.stories.tsx 0 100 100 0 5-13
🟡   UploadTemplatePage.tsx 75 100 50 75 9
🔴  web/src/pages/User/EditUserPage 0 100 0 0
🔴   EditUserPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/User/NewUserPage 0 100 0 0
🔴   NewUserPage.tsx 0 100 0 0 3-4
🔴  web/src/pages/User/UserPage 0 100 0 0
🔴   UserPage.tsx 0 100 0 0 7-8
🔴  web/src/pages/User/UsersPage 0 100 0 0
🔴   UsersPage.tsx 0 100 0 0 8-12
🔴  web/src/utils 0 0 0 0
🔴   index.ts 0 0 0 0 3-37

Pusher: @as1729, Action: pull_request_target, Workflow: Continuous Integration

Copy link

github-actions bot commented Feb 19, 2024

Terraform Summary

Step Result
🖌 Terraform Format & Style
⚙️ Terraform Initialization
🤖 Terraform Validation
📖 Terraform Plan

Hint: If "Terraform Format & Style" failed, run terraform fmt -recursive from the terraform/ directory and commit the results.

Output

Validation Output
Success! The configuration is valid.


Plan Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+   create
  ~ update in-place
-   destroy
-/+ destroy and then create replacement
+/- create replacement and then destroy

Terraform will perform the following actions:

  # aws_ecs_service.console will be updated in-place
  ~ resource "aws_ecs_service" "console" {
        id                                 = "arn:aws:ecs:us-west-2:357150818708:service/cpfreporter/cpfreporter-console"
        name                               = "cpfreporter-console"
        tags                               = {}
      ~ task_definition                    = "arn:aws:ecs:us-west-2:357150818708:task-definition/cpfreporter-console:52" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.console must be replaced
+/- resource "aws_ecs_task_definition" "console" {
      ~ arn                      = "arn:aws:ecs:us-west-2:357150818708:task-definition/cpfreporter-console:52" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:us-west-2:357150818708:task-definition/cpfreporter-console" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ image                  = "ghcr.io/usdigitalresponse/cpf-reporter-console@sha256:7c6aa143e8df88836223dc0648391809868796dddff95128a495e2fea91ace06" -> "ghcr.io/usdigitalresponse/cpf-reporter-console@sha256:49dd34bf67941b2e3bf671323b296db80408ddb7a84e7cc1fe17f700928a5084"
-                   mountPoints            = []
                    name                   = "console"
-                   portMappings           = []
-                   systemControls         = []
-                   volumesFrom            = []
                    # (7 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ id                       = "cpfreporter-console" -> (known after apply)
      ~ revision                 = 52 -> (known after apply)
-       tags                     = {} -> null
        # (9 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # aws_s3_object.lambda_artifact-cpfValidation will be updated in-place
  ~ resource "aws_s3_object" "lambda_artifact-cpfValidation" {
      ~ etag                   = "c3faa07aa23dbaf9d25281622152bc55-5" -> "1e4683cb85e97d3200d97928196ea632"
        id                     = "cpfValidation.1e4683cb85e97d3200d97928196ea632.zip"
        tags                   = {}
      ~ version_id             = "iDG6RlVVPa7hH9bq1X..vy.XFPRAMtKm" -> (known after apply)
        # (11 unchanged attributes hidden)
    }

  # aws_s3_object.lambda_artifact-excelToJson will be updated in-place
  ~ resource "aws_s3_object" "lambda_artifact-excelToJson" {
      ~ etag                   = "46bd4905044bdd17d1d04ca5c42f955f-6" -> "db2decf258f703af202a664d565cbcd6"
        id                     = "excelToJson.db2decf258f703af202a664d565cbcd6.zip"
        tags                   = {}
      ~ version_id             = "w0PTPEorM66dBGuHx..8CAepMTJvi_wd" -> (known after apply)
        # (11 unchanged attributes hidden)
    }

  # aws_s3_object.lambda_artifact-graphql must be replaced
+/- resource "aws_s3_object" "lambda_artifact-graphql" {
+       acl                    = (known after apply)
      ~ bucket_key_enabled     = false -> (known after apply)
+       checksum_crc32         = (known after apply)
+       checksum_crc32c        = (known after apply)
+       checksum_sha1          = (known after apply)
+       checksum_sha256        = (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "66fd4b7d70d2606a7414773bf4beb51c-6" -> "64d3c6da07a1965c4ca30d4d581e61ed"
      ~ id                     = "graphql.e8bd53ecddb7e531c9a2ab7ddb98709f.zip" -> (known after apply)
      ~ key                    = "graphql.e8bd53ecddb7e531c9a2ab7ddb98709f.zip" -> "graphql.64d3c6da07a1965c4ca30d4d581e61ed.zip" # forces replacement
+       kms_key_id             = (known after apply)
-       metadata               = {} -> null
      ~ source_hash            = "e8bd53ecddb7e531c9a2ab7ddb98709f" -> "64d3c6da07a1965c4ca30d4d581e61ed"
      ~ storage_class          = "STANDARD" -> (known after apply)
-       tags                   = {} -> null
      ~ version_id             = "96_QYxnimzTzeSze2rI5tecH9e9GzrqI" -> (known after apply)
        # (5 unchanged attributes hidden)
    }

  # aws_s3_object.origin_dist_artifact["200.html"] will be updated in-place
  ~ resource "aws_s3_object" "origin_dist_artifact" {
      ~ etag                   = "7ef79f3ceb552016d589be272b9e58ce" -> "8e2d941391344bcab7e6b2d9f25c9adc"
        id                     = "dist/200.html"
      ~ source_hash            = "7ef79f3ceb552016d589be272b9e58ce" -> "8e2d941391344bcab7e6b2d9f25c9adc"
        tags                   = {}
      ~ version_id             = "EwdUgcp07eKDFjN5eXvQNkpQ4B1e_gQb" -> (known after apply)
        # (10 unchanged attributes hidden)
    }

  # aws_s3_object.origin_dist_artifact["build-manifest.json"] will be updated in-place
  ~ resource "aws_s3_object" "origin_dist_artifact" {
      ~ etag                   = "4dd01e693b1bf0c33b636cc3d7edc1f3" -> "9bf377b8b535c7e68273b3437f4c6e11"
        id                     = "dist/build-manifest.json"
      ~ source_hash            = "4dd01e693b1bf0c33b636cc3d7edc1f3" -> "9bf377b8b535c7e68273b3437f4c6e11"
        tags                   = {}
      ~ version_id             = "cnxHRjGuL9uDZ00CQS.tNZaLR7kWNw.b" -> (known after apply)
        # (10 unchanged attributes hidden)
    }

  # aws_s3_object.origin_dist_artifact["chunk-references.json"] will be updated in-place
  ~ resource "aws_s3_object" "origin_dist_artifact" {
      ~ etag                   = "be8cc5c375fbe5638349c726e5ae9d86" -> "94f081a63365905b2cd602ea71b8105f"
        id                     = "dist/chunk-references.json"
      ~ source_hash            = "be8cc5c375fbe5638349c726e5ae9d86" -> "94f081a63365905b2cd602ea71b8105f"
        tags                   = {}
      ~ version_id             = "a2k37mVWFrQnaBrWpqP7pc1wtdFfOLf9" -> (known after apply)
        # (10 unchanged attributes hidden)
    }

  # aws_s3_object.origin_dist_artifact["index.html"] will be updated in-place
  ~ resource "aws_s3_object" "origin_dist_artifact" {
      ~ etag                   = "7ef79f3ceb552016d589be272b9e58ce" -> "8e2d941391344bcab7e6b2d9f25c9adc"
        id                     = "dist/index.html"
      ~ source_hash            = "7ef79f3ceb552016d589be272b9e58ce" -> "8e2d941391344bcab7e6b2d9f25c9adc"
        tags                   = {}
      ~ version_id             = "i19tG0Nyob.40Km9o492huoA0WYvimTD" -> (known after apply)
        # (10 unchanged attributes hidden)
    }

  # aws_s3_object.origin_dist_artifact["static/js/app.38202ff3.js"] will be created
+   resource "aws_s3_object" "origin_dist_artifact" {
+       acl                    = (known after apply)
+       bucket                 = "cpfreporter-origin-357150818708-us-west-2"
+       bucket_key_enabled     = (known after apply)
+       checksum_crc32         = (known after apply)
+       checksum_crc32c        = (known after apply)
+       checksum_sha1          = (known after apply)
+       checksum_sha256        = (known after apply)
+       content_type           = "text/javascript"
+       etag                   = "49b58ecfec104f953c242172d53293bf"
+       force_destroy          = false
+       id                     = (known after apply)
+       key                    = "dist/static/js/app.38202ff3.js"
+       kms_key_id             = (known after apply)
+       server_side_encryption = "AES256"
+       source                 = "/home/runner/work/cpf-reporter/cpf-reporter/web/dist/static/js/app.38202ff3.js"
+       source_hash            = "49b58ecfec104f953c242172d53293bf"
+       storage_class          = (known after apply)
+       tags_all               = {
+           "env"        = "staging"
+           "management" = "terraform"
+           "owner"      = "grants"
+           "repo"       = "cpf-reporter"
+           "service"    = "cpf-reporter"
+           "usage"      = "workload"
        }
+       version_id             = (known after apply)
    }

  # aws_s3_object.origin_dist_artifact["static/js/app.38202ff3.js.LICENSE.txt"] will be created
+   resource "aws_s3_object" "origin_dist_artifact" {
+       acl                    = (known after apply)
+       bucket                 = "cpfreporter-origin-357150818708-us-west-2"
+       bucket_key_enabled     = (known after apply)
+       checksum_crc32         = (known after apply)
+       checksum_crc32c        = (known after apply)
+       checksum_sha1          = (known after apply)
+       checksum_sha256        = (known after apply)
+       content_type           = "text/plain"
+       etag                   = "b703266ba347d460c07ac79899e011fa"
+       force_destroy          = false
+       id                     = (known after apply)
+       key                    = "dist/static/js/app.38202ff3.js.LICENSE.txt"
+       kms_key_id             = (known after apply)
+       server_side_encryption = "AES256"
+       source                 = "/home/runner/work/cpf-reporter/cpf-reporter/web/dist/static/js/app.38202ff3.js.LICENSE.txt"
+       source_hash            = "b703266ba347d460c07ac79899e011fa"
+       storage_class          = (known after apply)
+       tags_all               = {
+           "env"        = "staging"
+           "management" = "terraform"
+           "owner"      = "grants"
+           "repo"       = "cpf-reporter"
+           "service"    = "cpf-reporter"
+           "usage"      = "workload"
        }
+       version_id             = (known after apply)
    }

  # aws_s3_object.origin_dist_artifact["static/js/app.cea7803f.js"] will be destroyed
  # (because key ["static/js/app.cea7803f.js"] is not in for_each map)
-   resource "aws_s3_object" "origin_dist_artifact" {
-       bucket                 = "cpfreporter-origin-357150818708-us-west-2" -> null
-       bucket_key_enabled     = false -> null
-       content_type           = "text/javascript" -> null
-       etag                   = "1d28f99c5c39120e7afd9db0a7822625" -> null
-       force_destroy          = false -> null
-       id                     = "dist/static/js/app.cea7803f.js" -> null
-       key                    = "dist/static/js/app.cea7803f.js" -> null
-       metadata               = {} -> null
-       server_side_encryption = "AES256" -> null
-       source                 = "/home/runner/work/cpf-reporter/cpf-reporter/web/dist/static/js/app.cea7803f.js" -> null
-       source_hash            = "1d28f99c5c39120e7afd9db0a7822625" -> null
-       storage_class          = "STANDARD" -> null
-       tags                   = {} -> null
-       tags_all               = {
-           "env"        = "staging"
-           "management" = "terraform"
-           "owner"      = "grants"
-           "repo"       = "cpf-reporter"
-           "service"    = "cpf-reporter"
-           "usage"      = "workload"
        } -> null
-       version_id             = "N7_00ffRSNyMbjBvcAxZfNkXAX9M9QZb" -> null
    }

  # aws_s3_object.origin_dist_artifact["static/js/app.cea7803f.js.LICENSE.txt"] will be destroyed
  # (because key ["static/js/app.cea7803f.js.LICENSE.txt"] is not in for_each map)
-   resource "aws_s3_object" "origin_dist_artifact" {
-       bucket                 = "cpfreporter-origin-357150818708-us-west-2" -> null
-       bucket_key_enabled     = false -> null
-       content_type           = "text/plain" -> null
-       etag                   = "b703266ba347d460c07ac79899e011fa" -> null
-       force_destroy          = false -> null
-       id                     = "dist/static/js/app.cea7803f.js.LICENSE.txt" -> null
-       key                    = "dist/static/js/app.cea7803f.js.LICENSE.txt" -> null
-       metadata               = {} -> null
-       server_side_encryption = "AES256" -> null
-       source                 = "/home/runner/work/cpf-reporter/cpf-reporter/web/dist/static/js/app.cea7803f.js.LICENSE.txt" -> null
-       source_hash            = "b703266ba347d460c07ac79899e011fa" -> null
-       storage_class          = "STANDARD" -> null
-       tags                   = {} -> null
-       tags_all               = {
-           "env"        = "staging"
-           "management" = "terraform"
-           "owner"      = "grants"
-           "repo"       = "cpf-reporter"
-           "service"    = "cpf-reporter"
-           "usage"      = "workload"
        } -> null
-       version_id             = "RrKAtwB62a260e0T1DwwiFx8p1IRgNVf" -> null
    }

  # module.lambda_function-cpfValidation.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "cpfreporter-cpfValidation"
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:cpfreporter-cpfValidation:21" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:cpfreporter-cpfValidation:21/invocations" -> (known after apply)
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (21 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_COMMIT_SHA"                = "446939c62b32aa54bcafc917a208abc91a504109" -> "017b4982ebe112eaeabc04a73b04b1efb6163eff"
              ~ "DD_TAGS"                      = "git.commit.sha:446939c62b32aa54bcafc917a208abc91a504109,git.repository_url:github.com/usdigitalresponse/cpf-reporter" -> "git.commit.sha:017b4982ebe112eaeabc04a73b04b1efb6163eff,git.repository_url:github.com/usdigitalresponse/cpf-reporter"
              ~ "DD_VERSION"                   = "446939c62b32aa54bcafc917a208abc91a504109" -> "017b4982ebe112eaeabc04a73b04b1efb6163eff"
                # (13 unchanged elements hidden)
            }
        }

        # (3 unchanged blocks hidden)
    }

  # module.lambda_function-cpfValidation.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
      ~ id                  = "S3BucketNotification" -> (known after apply)
      ~ qualifier           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.lambda_function-excelToJson.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "cpfreporter-excelToJson"
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:cpfreporter-excelToJson:21" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:cpfreporter-excelToJson:21/invocations" -> (known after apply)
        tags                           = {}
      ~ version                        = "21" -> (known after apply)
        # (21 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_COMMIT_SHA"                = "446939c62b32aa54bcafc917a208abc91a504109" -> "017b4982ebe112eaeabc04a73b04b1efb6163eff"
              ~ "DD_TAGS"                      = "git.commit.sha:446939c62b32aa54bcafc917a208abc91a504109,git.repository_url:github.com/usdigitalresponse/cpf-reporter" -> "git.commit.sha:017b4982ebe112eaeabc04a73b04b1efb6163eff,git.repository_url:github.com/usdigitalresponse/cpf-reporter"
              ~ "DD_VERSION"                   = "446939c62b32aa54bcafc917a208abc91a504109" -> "017b4982ebe112eaeabc04a73b04b1efb6163eff"
                # (13 unchanged elements hidden)
            }
        }

        # (3 unchanged blocks hidden)
    }

  # module.lambda_function-excelToJson.aws_lambda_permission.current_version_triggers["S3BucketNotification"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
      ~ id                  = "S3BucketNotification" -> (known after apply)
      ~ qualifier           = "21" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.lambda_function-graphql.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "cpfreporter-graphql"
      ~ last_modified                  = "2024-03-01T22:28:20.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-west-2:357150818708:function:cpfreporter-graphql:68" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:357150818708:function:cpfreporter-graphql:68/invocations" -> (known after apply)
      ~ s3_key                         = "graphql.e8bd53ecddb7e531c9a2ab7ddb98709f.zip" -> "graphql.64d3c6da07a1965c4ca30d4d581e61ed.zip"
        tags                           = {}
      ~ version                        = "68" -> (known after apply)
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "DD_COMMIT_SHA"                      = "446939c62b32aa54bcafc917a208abc91a504109" -> "017b4982ebe112eaeabc04a73b04b1efb6163eff"
              ~ "DD_TAGS"                            = "git.commit.sha:446939c62b32aa54bcafc917a208abc91a504109,git.repository_url:github.com/usdigitalresponse/cpf-reporter" -> "git.commit.sha:017b4982ebe112eaeabc04a73b04b1efb6163eff,git.repository_url:github.com/usdigitalresponse/cpf-reporter"
              ~ "DD_VERSION"                         = "446939c62b32aa54bcafc917a208abc91a504109" -> "017b4982ebe112eaeabc04a73b04b1efb6163eff"
                # (17 unchanged elements hidden)
            }
        }

        # (4 unchanged blocks hidden)
    }

  # module.lambda_function-graphql.aws_lambda_permission.current_version_triggers["APIGateway"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
      ~ id                  = "APIGateway" -> (known after apply)
      ~ qualifier           = "68" # forces replacement -> (known after apply) # forces replacement
+       statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

Plan: 7 to add, 10 to change, 7 to destroy.

Pusher: @as1729, Action: pull_request_target, Workflow: Continuous Integration

@Vikariusu Vikariusu changed the title CPF-101 Update createUser() mutation CPF-101 Update createUser() mutation resolver Feb 19, 2024
Base automatically changed from feature/CPF-103-update-user-model to main February 29, 2024 16:17
@Vikariusu Vikariusu marked this pull request as ready for review March 1, 2024 00:15
@as1729 as1729 enabled auto-merge (squash) March 4, 2024 17:01
@as1729 as1729 merged commit f26efe7 into main Mar 4, 2024
19 checks passed
@as1729 as1729 deleted the feature/CPF-101-update-create-user-mutation branch March 4, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants