Download and store Debezium plugin for kafka in s3 #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Download and store Debezium plugin for kafka in s3 | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| terraform: | |
| name: Apply Terraform | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v2 | |
| with: | |
| terraform_version: 1.11 | |
| - name: Configure AWS credentials using IAM Role | |
| uses: aws-actions/configure-aws-credentials@v4.1.0 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| aws-region: us-east-1 | |
| - name: Initialize Terraform | |
| run: terraform init | |
| working-directory: terraform | |
| - name: Validate Terraform Configuration | |
| run: terraform validate | |
| working-directory: terraform | |
| - name: Plan Terraform | |
| run: terraform plan -out=tfplan | |
| working-directory: terraform | |
| - name: Create S3 Bucket | |
| run: | | |
| echo "Creating S3 Bucket..." | |
| terraform apply -target=aws_s3_bucket.msk_resources -auto-approve | |
| echo "S3 Bucket created successfully" | |
| working-directory: terraform | |
| - name: Download and Process Plugins | |
| run: | | |
| echo "Downloading and processing Debezium plugins..." | |
| terraform apply -target=null_resource.download_and_process -auto-approve | |
| echo "Plugins downloaded and processed successfully" | |
| working-directory: terraform | |
| - name: Upload Files to S3 | |
| run: | | |
| echo "Uploading plugin files to S3..." | |
| terraform apply -target=aws_s3_object.upload_zipped_files -auto-approve | |
| echo "Files uploaded to S3 successfully" | |
| working-directory: terraform | |
| - name: Apply Remaining Resources | |
| run: | | |
| echo "Applying any remaining Terraform resources..." | |
| terraform apply -auto-approve | |
| echo "All resources deployed successfully" | |
| working-directory: terraform |