diff --git a/.secrets.baseline b/.secrets.baseline index 73f4e408da..53a819efb8 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "^.secrets.baseline$", "lines": null }, - "generated_at": "2024-11-27T10:44:24Z", + "generated_at": "2024-11-29T10:38:22Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -182,7 +182,7 @@ "hashed_secret": "1459943ba5fd876f7ef6e48f566a40b448a2bf08", "is_secret": false, "is_verified": false, - "line_number": 449, + "line_number": 457, "type": "Secret Keyword", "verified_result": null } diff --git a/image/cli/mascli/functions/gitops_cos b/image/cli/mascli/functions/gitops_cos index bb2d8ce837..7bc2c4390b 100644 --- a/image/cli/mascli/functions/gitops_cos +++ b/image/cli/mascli/functions/gitops_cos @@ -229,6 +229,11 @@ function gitops_cos() { sensitive = false } + output "s3db2" { + value = module.s3db2 + sensitive = false + } + module "s3c" { name_prefix = local.name_prefix source = "git::https://git:$GITHUB_PAT@github.ibm.com/maximoappsuite/mas-iac-aws-s3.git//module?ref=1.0.1" @@ -256,6 +261,15 @@ function gitops_cos() { force_bucket_destroy = true } + module "s3db2" { + name_prefix = local.name_prefix + source = "git::https://git:$GITHUB_PAT@github.ibm.com/maximoappsuite/mas-iac-aws-s3.git//module?ref=1.0.1" + s3_bucket = "${CLUSTER_ID}-${MAS_INSTANCE_ID}-s3db2" + s3_encryption = true + s3_encryption_algorithm = "AES256" + force_bucket_destroy = true + } + output "s3c_access_point" { value = module.s3c_access_point sensitive = false @@ -271,6 +285,11 @@ function gitops_cos() { sensitive = false } + output "s3db2_access_point" { + value = module.s3db2_access_point + sensitive = false + } + module "s3c_access_point" { source = "git::https://git:$GITHUB_PAT@github.ibm.com/maximoappsuite/mas-iac-aws-s3-access-point.git//module?ref=1.0.10" name_prefix = local.name_prefix @@ -318,6 +337,22 @@ function gitops_cos() { secret_suffix = "manage_logging/s3secretkey" manage_secret_format = true } + + module "s3db2_access_point" { + source = "git::https://git:$GITHUB_PAT@github.ibm.com/maximoappsuite/mas-iac-aws-s3-access-point.git//module?ref=1.0.10" + name_prefix = local.name_prefix + s3_access_point_bucket_id = module.s3db2.s3_bucket_id + s3_bucket_arn = module.s3db2.s3_bucket_arn + s3_bucket_region = module.s3db2.s3_bucket_region + s3_access_point_name = "${CLUSTER_ID}-${MAS_INSTANCE_ID}-s3db2-access" + s3_access_point_policy_actions = [ "s3:DeleteObject", "s3:GetObject", "s3:GetObjectAcl", "s3:PutObject", "s3:PutObjectAcl", "s3:ListBucket" ] + s3_access_point_user = "${CLUSTER_ID}-${MAS_INSTANCE_ID}-s3db2-user" + mas_cluster_id = "$CLUSTER_ID" + mas_instance_id = "$MAS_INSTANCE_ID" + secret_recovery_days = 0 + secret_suffix = "db2_backup" + manage_secret_format = true + } EOF cat > $TEMP_DIR/provider.tf < $TEMP_DIR/provider.tf < +db2_backup_bucket_endpoint: +db2_backup_bucket_access_key: +db2_backup_bucket_secret_key: +db2_backup_notify_slack_url: {{DB2_BACKUP_NOTIFY_SLACK_URL}} +db2_backup_icd_auth_key: {% endif %} \ No newline at end of file diff --git a/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 index 29416d4bab..c6a32259f9 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 @@ -209,6 +209,9 @@ spec: - name: db2_timezone type: string default: "" + - name: db2_backup_notify_slack_url + type: string + default: "" - name: custom_labels type: string @@ -651,6 +654,8 @@ spec: value: $(params.jdbc_route_iot) - name: db2_timezone value: $(params.db2_timezone) + - name: db2_backup_notify_slack_url + value: $(params.db2_backup_notify_slack_url) workspaces: - name: configs @@ -809,6 +814,8 @@ spec: value: $(params.jdbc_route_manage) - name: db2_timezone value: $(params.db2_timezone) + - name: db2_backup_notify_slack_url + value: $(params.db2_backup_notify_slack_url) workspaces: - name: configs diff --git a/tekton/src/tasks/gitops/gitops-db2u-database.yml.j2 b/tekton/src/tasks/gitops/gitops-db2u-database.yml.j2 index 0847df5f7c..ecef563478 100644 --- a/tekton/src/tasks/gitops/gitops-db2u-database.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-db2u-database.yml.j2 @@ -111,6 +111,9 @@ spec: - name: jdbc_route type: string default: "" + - name: db2_backup_notify_slack_url + type: string + default: "" stepTemplate: name: gitops-db2u-database env: @@ -218,6 +221,8 @@ spec: value: $(params.mas_app_id) - name: JDBC_ROUTE value: $(params.jdbc_route) + - name: DB2_BACKUP_NOTIFY_SLACK_URL + value: $(params.db2_backup_notify_slack_url) envFrom: - configMapRef: name: environment-properties