From 5f34d7884f1637bdc266abc48056ac002f81a993 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Mon, 14 Oct 2024 17:16:18 -0400 Subject: [PATCH] fix file move --- .../data/airbyte/terraform/aws/postgres.tf | 6 +- catalogs/data/airbyte/terraform/aws/s3.tf | 10 +++ catalogs/setup/data/airbyte.yaml | 61 +++++++++++++++++++ 3 files changed, 72 insertions(+), 5 deletions(-) diff --git a/catalogs/data/airbyte/terraform/aws/postgres.tf b/catalogs/data/airbyte/terraform/aws/postgres.tf index 24617bb2..6099d659 100644 --- a/catalogs/data/airbyte/terraform/aws/postgres.tf +++ b/catalogs/data/airbyte/terraform/aws/postgres.tf @@ -14,10 +14,6 @@ data "aws_vpc" "mgmt" { id = one(data.aws_eks_cluster.mgmt.vpc_config).vpc_id } -locals { - monitoring_role_name = "${var.db_name}-PluralRDSMonitoringRole" -} - module "db" { source = "terraform-aws-modules/rds/aws" version = "~> 6.3" @@ -41,7 +37,7 @@ module "db" { backup_retention_period = var.backup_retention_period monitoring_interval = "30" - monitoring_role_name = local.monitoring_role_name + monitoring_role_name = "${var.db_name}-PluralRDSMonitoringRole" create_monitoring_role = true apply_immediately = true diff --git a/catalogs/data/airbyte/terraform/aws/s3.tf b/catalogs/data/airbyte/terraform/aws/s3.tf index b79e4db0..5f6d8fc8 100644 --- a/catalogs/data/airbyte/terraform/aws/s3.tf +++ b/catalogs/data/airbyte/terraform/aws/s3.tf @@ -3,6 +3,16 @@ resource "aws_s3_bucket" "airbyte" { force_destroy = var.force_destroy_bucket } +resource "aws_s3_bucket_server_side_encryption_configuration" "airbyte" { + bucket = aws_s3_bucket.airbyte.id + + rule { + apply_server_side_encryption_by_default { + sse_algorithm = "AES256" + } + } +} + data "aws_iam_role" "postgres" { name = "${var.cluster_name}-postgres" } diff --git a/catalogs/setup/data/airbyte.yaml b/catalogs/setup/data/airbyte.yaml index e69de29b..923513a9 100644 --- a/catalogs/setup/data/airbyte.yaml +++ b/catalogs/setup/data/airbyte.yaml @@ -0,0 +1,61 @@ +apiVersion: deployments.plural.sh/v1alpha1 +kind: PrAutomation +metadata: + name: airbyte +spec: + name: airbyte + icon: https://plural-assets.s3.us-east-2.amazonaws.com/uploads/repos/d79a69b7-dfcd-480a-a51d-518865fd6e7c/airbyte.png + documentation: | + Sets up an airbyte instance for a given cloud + creates: + git: + ref: main + folder: catalogs/data/airbyte + templates: + - source: stack.yaml.liquid + destination: "bootstrap/apps/airbyte/{{ context.cluster }}/stack.yaml" + external: true + - source: servicedeployment.yaml.liquid + destination: "bootstrap/apps/airbyte/{{ context.cluster }}/servicedeployment.yaml" + external: true + - source: README.md + destination: documentation/airbyte/README.md + external: true + - source: helm/values.yaml.liquid + destination: helm/airbyte/{{ context.cluster }}.yaml.liquid + external: true + - source: terraform + destination: terraform/apps/airbyte + external: true + repositoryRef: + name: scaffolds + namespace: infra + catalogRef: + name: data-engineering + namespace: infra + scmConnectionRef: + name: github # you'll need to add this ScmConnection manually before this is functional + title: "Setting up airbyte on cluster {{ context.cluster }} for {{ context.cloud }}" + message: | + Set up airbyte on {{ context.cluster }} ({{ context.cloud }}) + + Will set up an airbyte deployment, including object storage and postgres setup + identifier: pluralsh/scaffolds # REPLACEME with your own repo slug + configuration: + - name: cluster + type: STRING + documentation: the cluster you want to deploy to + - name: cloud + type: ENUM + documentation: the cloud you can deploy airbyte to + values: + - aws + - name: bucket + type: STRING + documentation: the name of the S3/GCS/Azure Blob bucket you'll use for airbyte logs. This must be globally unique + - name: hostname + type: STRING + documentation: the DNS name you'll host airbyte under + - name: region + type: STRING + documentation: the cloud region you're going to use for this instance \ No newline at end of file