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

fix: ProvisionedThroughputExceededException dynamodb links table #189

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

billmetangmo
Copy link
Member

No description provided.

Copy link

infracost bot commented Sep 1, 2024

💰 Infracost report

Monthly estimate decreased by $0.69 📉

Changed project Baseline cost Usage cost* Total change New monthly cost
infra -$0.69 - -$0.69 (-33%) $1

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

Estimate details
Key: * usage cost, ~ changed, + added, - removed

──────────────────────────────────
Project: infra
Module path: infra

~ aws_dynamodb_table.Link_table
  -$0.69

    - Write capacity unit (WCU)
      -$0.58

    - Read capacity unit (RCU)
      -$0.12

    + Write request unit (WRU)
      Monthly cost depends on usage
        +$0.000001525 per WRUs

    + Read request unit (RRU)
      Monthly cost depends on usage
        +$0.000000305 per RRUs

Monthly cost change for infra (Module path: infra)
Amount:  -$0.69 ($2 → $1)
Percent: -33%

──────────────────────────────────
Key: * usage cost, ~ changed, + added, - removed

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

25 cloud resources were detected:
∙ 8 were estimated
∙ 17 were free

Infracost estimate: Monthly estimate decreased by $0.69 ↓
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Changed project                                    ┃ Baseline cost ┃ Usage cost* ┃ Total change  ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━┫
┃ infra                                              ┃        -$0.69 ┃           - ┃ -$0.69 (-33%) ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┛
This comment will be updated when code changes.

Copy link
Contributor

github-actions bot commented Sep 1, 2024

💰 Infracost report

Monthly estimate decreased by $0.69 📉

Changed project Baseline cost Usage cost* Total change New monthly cost
mongulu-cm/mtchoun-mouh/infra -$0.69 - -$0.69 (-33%) $1

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

Estimate details
Key: * usage cost, ~ changed, + added, - removed

──────────────────────────────────
Project: main

~ aws_dynamodb_table.Link_table
  -$0.69

    - Write capacity unit (WCU)
      -$0.58

    - Read capacity unit (RCU)
      -$0.12

    + Write request unit (WRU)
      Monthly cost depends on usage
        +$0.000001525 per WRUs

    + Read request unit (RRU)
      Monthly cost depends on usage
        +$0.000000305 per RRUs

Monthly cost change for mongulu-cm/mtchoun-mouh/infra
Amount:  -$0.69 ($2 → $1)
Percent: -33%

──────────────────────────────────
Key: * usage cost, ~ changed, + added, - removed

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

25 cloud resources were detected:
∙ 8 were estimated
∙ 17 were free

Infracost estimate: Monthly estimate decreased by $0.69 ↓
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Changed project                                    ┃ Baseline cost ┃ Usage cost* ┃ Total change  ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━┫
┃ mongulu-cm/mtchoun-mouh/infra                      ┃        -$0.69 ┃           - ┃ -$0.69 (-33%) ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┛
This comment will be updated when code changes.

@billmetangmo billmetangmo merged commit de027ea into master Sep 1, 2024
6 of 9 checks passed
@billmetangmo
Copy link
Member Author

Plan Result

CI link

Plan: 1 to add, 3 to change, 0 to destroy.
  • Create
    • local_file.index_page
  • Update
    • aws_dynamodb_table.Link_table
    • aws_s3_bucket.images
    • aws_s3_bucket.website
Change Result (Click me)
  # aws_dynamodb_table.Link_table will be updated in-place
  ~ resource "aws_dynamodb_table" "Link_table" {
      ~ billing_mode   = "PROVISIONED" -> "PAY_PER_REQUEST"
        id             = "Link_table"
        name           = "Link_table"
      ~ read_capacity  = 1 -> 3
        tags           = {
            "environment" = "mtchoun-mouh-master"
            "project"     = "mtchoun-mouh"
        }
        # (5 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_s3_bucket.images will be updated in-place
  ~ resource "aws_s3_bucket" "images" {
        id                          = "djansang"
        tags                        = {
            "Name"        = "images"
            "environment" = "mtchoun-mouh-master"
            "project"     = "mtchoun-mouh"
        }
        # (10 unchanged attributes hidden)

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - sse_algorithm = "AES256" -> null
                }
            }
        }

        # (1 unchanged block hidden)
    }

  # aws_s3_bucket.website will be updated in-place
  ~ resource "aws_s3_bucket" "website" {
        id                          = "mtchoun-mouh.mongulu.cm"
        tags                        = {
            "Name"        = "Website"
            "environment" = "mtchoun-mouh-master"
            "project"     = "mtchoun-mouh"
        }
        # (12 unchanged attributes hidden)

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - sse_algorithm = "AES256" -> null
                }
            }
        }

        # (3 unchanged blocks hidden)
    }

  # local_file.index_page will be created
  + resource "local_file" "index_page" {
      + content              = (sensitive value)
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0777"
      + filename             = "../html/index.html"
      + id                   = (known after apply)
    }

Plan: 1 to add, 3 to change, 0 to destroy.

@billmetangmo
Copy link
Member Author

✅ Apply Succeeded

CI link

Apply complete! Resources: 1 added, 3 changed, 0 destroyed.
Details (Click me)
Running apply in the remote backend. Output will stream here. Pressing Ctrl-C
will cancel the remote apply if it's still pending. If the apply started it
will stop streaming the logs, but will not stop the apply running remotely.

Preparing the remote apply...

To view this run in a browser, visit:
https://app.terraform.io/app/tfc-mongulu-cm/mtchoun-mouh-master/runs/run-Jv1EFDepvxp13e4c

Waiting for the plan to start...

Terraform v1.5.2
on linux_amd64
Initializing plugins and modules...
data.archive_file.lambda_zip: Reading...
data.archive_file.lambda_zip: Read complete after 0s [id=a302387976ce74579a87a903dcc6149f70895053]
data.aws_caller_identity.current: Reading...
aws_cloudwatch_event_rule.scheduler: Refreshing state... [id=trigger_user_scan]
aws_dynamodb_table.Users: Refreshing state... [id=Users]
data.aws_iam_role.role: Reading...
aws_lambda_layer_version.test_lambda_layer: Refreshing state... [id=arn:aws:lambda:eu-central-1:053932140667:layer:test_lambda_layer:6]
aws_api_gateway_rest_api.api: Refreshing state... [id=gozv19c3jf]
aws_dynamodb_table.Link_table: Refreshing state... [id=Link_table]
aws_dynamodb_table.Register: Refreshing state... [id=Register]
aws_s3_bucket.images: Refreshing state... [id=djansang]
aws_s3_bucket.website: Refreshing state... [id=mtchoun-mouh.mongulu.cm]
data.aws_caller_identity.current: Read complete after 0s [id=053932140667]
data.aws_iam_role.role: Read complete after 0s [id=website-deployer]
aws_lambda_function.scan: Refreshing state... [id=scan_user_consulcam]
aws_lambda_function.lambda: Refreshing state... [id=user_registration_consulcam]
aws_api_gateway_resource.resource: Refreshing state... [id=gtenoa]
aws_api_gateway_method.method: Refreshing state... [id=agm-gozv19c3jf-gtenoa-POST]
module.cors.aws_api_gateway_method._: Refreshing state... [id=agm-gozv19c3jf-gtenoa-OPTIONS]
aws_lambda_permission.allow_cloudwatch_to_call_check_foo: Refreshing state... [id=AllowExecutionFromCloudWatch]
aws_cloudwatch_event_target.target: Refreshing state... [id=trigger_user_scan-lambda]
module.cors.aws_api_gateway_method_response._: Refreshing state... [id=agmr-gozv19c3jf-gtenoa-OPTIONS-200]
module.cors.aws_api_gateway_integration._: Refreshing state... [id=agi-gozv19c3jf-gtenoa-OPTIONS]
aws_api_gateway_method_response.method_response_200: Refreshing state... [id=agmr-gozv19c3jf-gtenoa-POST-200]
aws_lambda_permission.apigw_lambda: Refreshing state... [id=AllowExecutionFromAPIGateway]
aws_api_gateway_integration.integration: Refreshing state... [id=agi-gozv19c3jf-gtenoa-POST]
module.cors.aws_api_gateway_integration_response._: Refreshing state... [id=agir-gozv19c3jf-gtenoa-OPTIONS-200]
aws_api_gateway_deployment.test: Refreshing state... [id=7suq19]
local_file.index_page: Refreshing state... [id=c845316bee69b44546aed5f465d68859a00ebc56]
aws_s3_bucket_public_access_block.website: Refreshing state... [id=mtchoun-mouh.mongulu.cm]
aws_s3_bucket_object.example_file: Refreshing state... [id=index.html]
aws_s3_bucket_policy.website: Refreshing state... [id=mtchoun-mouh.mongulu.cm]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # aws_dynamodb_table.Link_table will be updated in-place
  ~ resource "aws_dynamodb_table" "Link_table" {
      ~ billing_mode   = "PROVISIONED" -> "PAY_PER_REQUEST"
        id             = "Link_table"
        name           = "Link_table"
      ~ read_capacity  = 1 -> 3
        tags           = {
            "environment" = "mtchoun-mouh-master"
            "project"     = "mtchoun-mouh"
        }
        # (5 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_s3_bucket.images will be updated in-place
  ~ resource "aws_s3_bucket" "images" {
        id                          = "djansang"
        tags                        = {
            "Name"        = "images"
            "environment" = "mtchoun-mouh-master"
            "project"     = "mtchoun-mouh"
        }
        # (10 unchanged attributes hidden)

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - sse_algorithm = "AES256" -> null
                }
            }
        }

        # (1 unchanged block hidden)
    }

  # aws_s3_bucket.website will be updated in-place
  ~ resource "aws_s3_bucket" "website" {
        id                          = "mtchoun-mouh.mongulu.cm"
        tags                        = {
            "Name"        = "Website"
            "environment" = "mtchoun-mouh-master"
            "project"     = "mtchoun-mouh"
        }
        # (12 unchanged attributes hidden)

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - sse_algorithm = "AES256" -> null
                }
            }
        }

        # (3 unchanged blocks hidden)
    }

  # local_file.index_page will be created
  + resource "local_file" "index_page" {
      + content              = (sensitive value)
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0777"
      + filename             = "../html/index.html"
      + id                   = (known after apply)
    }

Plan: 1 to add, 3 to change, 0 to destroy.


------------------------------------------------------------------------

Cost estimation:

Resources: 3 of 5 estimated
           $1.872/mo +$0.1872

------------------------------------------------------------------------

aws_dynamodb_table.Link_table: Modifying... [id=Link_table]
aws_s3_bucket.images: Modifying... [id=djansang]
aws_s3_bucket.website: Modifying... [id=mtchoun-mouh.mongulu.cm]
local_file.index_page: Creating...
local_file.index_page: Creation complete after 0s [id=c845316bee69b44546aed5f465d68859a00ebc56]
aws_s3_bucket.website: Modifications complete after 5s [id=mtchoun-mouh.mongulu.cm]
aws_s3_bucket.images: Modifications complete after 5s [id=djansang]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 1m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 1m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 1m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 1m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 1m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 1m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 2m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 2m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 2m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 2m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 2m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 2m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 3m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 3m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 3m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 3m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 3m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 3m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 4m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 4m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 4m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 4m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 4m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 4m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 5m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 5m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 5m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 5m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 5m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 5m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 6m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 6m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 6m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 6m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 6m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 6m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 7m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 7m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 7m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 7m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 7m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 7m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 8m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 8m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 8m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 8m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 8m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 8m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 9m0s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 9m10s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 9m20s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 9m30s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 9m40s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 9m50s elapsed]
aws_dynamodb_table.Link_table: Still modifying... [id=Link_table, 10m0s elapsed]
aws_dynamodb_table.Link_table: Modifications complete after 10m3s [id=Link_table]

Apply complete! Resources: 1 added, 3 changed, 0 destroyed.

Outputs:

register_table = "Register"
stage_url = "https://gozv19c3jf.execute-api.eu-central-1.amazonaws.com/dev"
website_url = "http://mtchoun-mouh.mongulu.cm.s3-website.eu-central-1.amazonaws.com"

billmetangmo added a commit that referenced this pull request Sep 19, 2024
* Update README.md

* Update README.md

* remove stopWords

* add demo task

* parametrise les urls du consulat

* better subject notification

* added demo feature

* updated doc

* removed pycache file

* undo config

* Updated mail format

* Send user registration mail without CLI

* Update notify.py

* Update README.md

* Update notify.py

* Update README.md

* Added deployment scripts and updated code accordignly

* Update README.md

* Update README.md

* Updated github project link

* Update README.md

* Update README.md

* Update README.md

* Create LICENSE

* Added audience measure

* Added design picture to readme

* Updated API URL from manual to automatic

Before the change, it was needed to copy/paste API URL inside demo/index html files. Now it's done automatically through terraform.

* Updated doc with SSL guidelines

* architecture done

* architecture done

* Updated url to add /register and avoid 40X error

* Updated doc related to cloudfront with cache invalidation

Currently, the cache duration is the default one so 1 day . This means that an index.html modification will only be viewable after this amount of time. With the modification,it's served from origin directly

* Updated doc with free domain name for easy test

* Added a simple end-to-end test with uirecord (alibaba)

* Update README.md

* Update README.md

* updated index page due to repository change

* Update README.md

* removed bucket redirection

the redirect bucket tfstate is moved on official website tfstate project.

* migrated from local to remote state

* decrease dynamoDB r/w units from 5 to 1 per table

* Updated contact from gitreports to mtchoun-mouh mailing list

* updated terraform and hashicorp/aws plugin

* Removed html files upload from terraform

To avoid issue like hashicorp/terraform-provider-aws#9579

* Removed all mentions of contact_url as maintainer_mail used instead

* Added requirements.txt for lambda functions

Useful for security scan by dependabots. Fixes #36

* Updated SES Region to eu-central-1 where verified mailing list resided

Fixes #32

* Updated SES Region to eu-central-1 where verified mailing list resided

Fixes #32

* Moved from Google Analytics to Matomo

Fixes #31

* Bump urllib3 from 1.25.10 to 1.26.5 in /api

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.10 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.25.10...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Added date label to issues

* updated index page template with matomo

* updated urllib lambda package for security

* Bump jinja2 from 2.11.2 to 2.11.3

Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](pallets/jinja@2.11.2...2.11.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Added automation percentage with drift.

Fixes #24

* Updated requests due to urllib3 security updates.

* Added CHANGELOG

* Added terraform pre-commit validation

Fixes  #7

* Added organic referencing notes

Fixes  #15

* Updated doc with matomo

Fixes #38

* Updated pre-commit exclude files

* Updated README.md

* Added secret-detection on CI

Fixes #43

* Added precommit option for black python formatting

* test

* Update workflows.yml

* Create requirements.txt

* Update requirements.txt

* Update workflows.yml

* Removed DynamoDB Locks

The lock is not suppported per workspace but for all workspaces together. So using it make fail the workspace beacuse it wants to create a new lock table.

* Removed terraform-state bucket

When using another workspace , terraform failed trying to create the same bucket.

* Added a way to deploy environment on need for PR (#59)

* Update code with terraform workspace indexation

* Update lambda.zip

* Update workspace.yml

* Revert tfstate remote instead of local

* Added act to run github action locally

* Add Copy Site files to workflow

* Added output url

* Added tf destroy on close MR

* Update gitignore with index.html + lambda.zip

If not these files when merge will erase files from prod.

* Updated merge_pr.yml

* Updated test

* Added force_destroy to delete non empty bucket

Co-authored-by: Patrick Djiela <[email protected]>

* Updated html files due to destroy issue

* Updated workflow for main deployment

* Updated python package

* Clean the source code

* added terraform constraint validation on variables

Fixes #56

* fix CI issues about domain name

* Unit test -> extract and notify

updated CI test with unitests

Co-authored-by: fabiolatagne97 <[email protected]>

* test workflow only on pull request

* test workflow only on pull request

* added gitpod

* updated gitignore

* updated terraform var to capital

* added gitpod url to README

* updated terraform var to capital

* deploy project only if modifications on specific paths

* Updated python unit tests version from 3.8 to 3.10

* Enable DynamoTable PITR

* Updated README with unit tests commands

* add coverage

* Updated coverage.svg

* docs: update README.md [skip ci]

* docs: create .all-contributorsrc [skip ci]

* added coverage icon

* fix coverage image location

* Updated pre-commit with detect-secrets

* Added function doc using mintlify writer

* Updated coverage.svg

* updated layout by regrouping all infra files in a folder

* Fixed template folder not found

* Fixed api directory not found

* Automated event issues to project board ( /mongulu-cm/lobembe#36 )

* Switched documentation from French to English

* feat(commit): add commitlint as commit message standard ( /mongulu-cm/lobembe#21 )

* ci(commit): add commitlint as commit message standard ( /mongulu-cm/lobembe#21

* docs(commit): add commitzen badge in README ( /mongulu-cm/lobembe#21 )

* chore(code-review): add aws codeguru as code reviewer

* fix(gitpod): persist packages between workplace restart (/mongulu-cm/lobembe#40)

By re-installing them if they don't exis

* style(commit): disable body-max-length (/mongulu-cm/lobembe#39)

* fix(gitpod): add .envrc to allow source AWS config for each shell

* docs: update README.md

* chore: update gitignore with terraform lock file

* ci: update test trigger from pull_request to push

We previously set it to pull_request with the assumption that people working locally and then when pull_request. This will create a new env and the reviewer can use it. However most newbies aren't devops afficionados so be able when they create a new branch, deploying the infra would just be pushing the branch and then they can work. In addition, this also allow to check the deployed vesion befor merging.

* refactor: avoid duplication for deploy to prod and others env

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* fix(pre-commit): rev not present for detect-secrets

* test: add useful tests files during development

* comment

* no precommit

* add the TODOs

* refactor: dynamodb pitr only in prod (( /mongulu-cm/lobembe#47)

Closes /mongulu-cm/lobembe#47

* ci: use ratchet to pin docker images (/mongulu-cm/lobembe#41)

* add name and email in confirmation modal

* ci(deploy): fix paths to support infra

* errors_tab

* test: lambda user images

* feat: add zulip

* ci(deploy): use oidc to connect to AWS instead of hard credentials (/mongulu-cm/lobembe#44)

* feat: send message on zulip

* feat:update final error messages notification

* feat(monitoring): add sentry for error reporting (#64)

* ci(deploy): fix close_job action which hangs waiting for SENTRY_DNS

* feat:solving unitest errors

* feat: add api key secret

* feat: update main.tf with api key

* Update main.tf

* feat:delete urllib3

* feat: new update on main.tf

* feat: update vars.tf with api key var

* ci(deploy): fix close_job action which fails due to AWS creds missing

* test(coverage-badge): fix svg gen due to missing API_KEY (#34)

Closes #34

* refactor(tests): move all tests file into a folder

* chore(deps): bump certifi from 2020.6.20 to 2022.12.7 in /api (#91)

Bumps [certifi](https://github.com/certifi/python-certifi) from 2020.6.20 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](certifi/python-certifi@2020.06.20...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(tests): add tag for finops (#44)

* ci(tests): add infracost for cost estimation on PR (#44)

Closes #44

* ci(tests): add tf-cmt to post terraform result to PR comments (#44)

Closes #44

* ci(deploy): fix close_job action which fails due to API_KEY missing

* Revert "refactor(tests): move all tests file into a folder"

This reverts commit c137390.

* refactor: use secretsfoundry to manage .env securely

* Update vars.tf

feat: send email

* Update vars.tf

* Update notify.py

* feat: send mail

* Update notify.py

* feat(registration_mail):read mail directly from .html file inside the project

* Create mtchoun-mouhregistration.html

* feat(registration_mail):"just de start deploy pipeline"

* Update notify.py

* Update main.tf

* refactor: updated mail template (#61)

Closes #61

* ci(deploy): fix pipeline not started if python file modified (#97)

closes #97

* refactor: remove name form pre-header (#97)

closes #97

* Updated coverage.svg

* fix: replace matomo.simplehosting.me by our self-hosted instance

* fix: remove export to allow secretsfoundry to support all .env vars

* feat: add tag manager to monitor form submission

* fix: use an explicit environment for sentry (#98)

* test: add readiness healthy checkup (#67)

closes #67 
---------

Co-authored-by: Bill Metangmo <[email protected]>

* fix: website_url was empty if branch is master

* fix: demo page is not maintained (#107)

closes #107

* refactor: remove all demo page mentions

* Create dependabot.yml

all the package

* Update dependabot.yml

add daily

* fix: accurately measure time spent on each page

https://developer.matomo.org/guides/tracking-javascript-guide#accurately-measure-the-time-spent-on-each-page

* ci: check liveness after site deployment (#90)

Closes #90

* fix: updated REGISTRATION_TABLE to REGISTERS_TABLE

* fix: add commitizen + aws

* Switch to terraform cloud (#55)

* fix: Update to use tfc workspace with cli

* fix: update to use tfc workspace with cli

* fix: update action config

* fix:  terraform entreprise token missing

* fix:  terraform entreprise token missing

* fix: allow tf variables reading

* fix: allow s3 bucket public access

* fix: allow s3 bucket public access

* fix:  Error putting S3 policy: AccessDenied: Access Denied

* fix: remote s3 bucket copy error

* fix: missing index.html on bucket

* fix: remote s3 bucket copy error

* fix: python unittests and e2e

* ci: remove unecessary files

---------

Co-authored-by: pdjiela <[email protected]>
Co-authored-by: billmetangmo<[email protected]>

* ci: fix add coverage-badge

* fix: selected workspace don't exist

* fix: all tf variables are in TFC now

* fix: website copy for non master

* ci: update close_pr due to passage to TFC

* fix: handle http errors properly (#116)

* fix: gitpod apt update hangs

* fix: 403 http error consulcam website (#116)

* chore(deps): bump sentry-sdk from 1.11.1 to 1.14.0 in /infra/api

Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 1.11.1 to 1.14.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-python@1.11.1...1.14.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): bump requests from 2.25.1 to 2.31.0 in /infra/api

Bumps [requests](https://github.com/psf/requests) from 2.25.1 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.25.1...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: 403 http error consulcam website (#126)

issue caused by activation of cpanel badbots rule

* feat: allow to deploy lambda func locally (#96)

* fix: allow automatic installation

* fix : add docstring

* docs : add cody on gitpod (/mongulu-cm/lobembe#59)

* docs: add aws toolkit plugin

* feat(#71): Use lambda layers to delete api/package directory

Closes #71

* chore: clean unused files

* ci: fix deployment on master when tf file modified

* chore: clean terraform files

* fix: requirements.txt to reduce vulnerabilities (#162)

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-3164749
- https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-5805047
- https://snyk.io/vuln/SNYK-PYTHON-REQUESTS-5595532

Co-authored-by: snyk-bot <[email protected]>

* fix: requirements.txt to reduce vulnerabilities (#150)

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-JINJA2-6150717

Co-authored-by: snyk-bot <[email protected]>

* fix: requirements.txt to reduce vulnerabilities (#177)

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-DETECTSECRETS-7361839

Co-authored-by: snyk-bot <[email protected]>

* fix: requirements.txt to reduce vulnerabilities (#170)

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-REQUESTS-6928867

Co-authored-by: snyk-bot <[email protected]>

* fix: requirements.txt to reduce vulnerabilities (#179)

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-JINJA2-6809379
- https://snyk.io/vuln/SNYK-PYTHON-REQUESTS-6928867
- https://snyk.io/vuln/SNYK-PYTHON-SELENIUM-6062316
- https://snyk.io/vuln/SNYK-PYTHON-URLLIB3-7267250
- https://snyk.io/vuln/SNYK-PYTHON-WERKZEUG-6035177
- https://snyk.io/vuln/SNYK-PYTHON-WERKZEUG-6808933

Co-authored-by: snyk-bot <[email protected]>

* ci: update python tests

* ci: fix python test triggers

only on python modifications

* fix: 11:30:03.000
ProvisionedThroughputExceededException

Due to branch environments scanned at same time than prod

* fix: code don't raise locally on error

We needed to check on sentry which can be cumbersome

* refactor(#106): use textractor to simplify code

* Updated coverage.svg

* ci: fix invalid workflow

* fix: scan lambda issue due to count

* fix: make lambda layer

* fix: provisionedthroughputexceededException dynamodb links table (#189)

* feat: add demo again

* fix: UnidentifiedImageError

* Updated coverage.svg

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: fabiolatagne97 <[email protected]>
Co-authored-by: fabiolatagne97 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Flomin TCHAWE <[email protected]>
Co-authored-by: Flomin TCHAWE <[email protected]>
Co-authored-by: pdjiela <[email protected]>
Co-authored-by: Patrick Djiela <[email protected]>
Co-authored-by: pdjiela <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Joyce-Tchamdjou <[email protected]>
Co-authored-by: Tchepga <[email protected]>
Co-authored-by: tsafacjo <[email protected]>
Co-authored-by: Joyce-Tchamdjou <[email protected]>
Co-authored-by: ngnnpgn <[email protected]>
Co-authored-by: Joalia <[email protected]>
Co-authored-by: snyk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant