Skip to content

Commit

Permalink
conflict fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Halil Bozan authored and Halil Bozan committed May 17, 2024
2 parents d1b2952 + 14b5ccd commit 63bae05
Show file tree
Hide file tree
Showing 1,319 changed files with 2,705 additions and 1,422 deletions.
4 changes: 0 additions & 4 deletions .bumpversion.cfg

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/pr-title-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "PR Title Lint"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: write

jobs:
validate-title:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- name: Create Github App Token for Release Please
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.RELEASE_PLEASE_GH_APP_ID }}
private-key: ${{ secrets.RELEASE_PLEASE_GH_APP_PRIVATE_KEY }}

- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
127 changes: 127 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release: ${{ toJson(steps.release-please.outputs) }}
releases_created: ${{ steps.release-please.outputs.releases_created }}
steps:
- name: Create Github App Token for Release Please
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.RELEASE_PLEASE_GH_APP_ID }}
private-key: ${{ secrets.RELEASE_PLEASE_GH_APP_PRIVATE_KEY }}

- uses: googleapis/release-please-action@v4
id: release-please
with:
token: ${{ steps.app-token.outputs.token }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

upload-artifact:
if: ${{ needs.release-please.outputs.releases_created }}
needs:
- release-please
strategy:
matrix:
released_path: ${{ fromJson(fromJson(needs.release-please.outputs.release).paths_released) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.release-please.outputs.release.tag_name }}
fetch-depth: 1

- name: Extract info from release
id: info
run: |
tag_name='${{ fromJson(needs.release-please.outputs.release)[format('{0}--tag_name', matrix.released_path)] }}'
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
artifact_path='${{ fromJson(needs.release-please.outputs.release)[format('{0}--tag_name', matrix.released_path)] }}.zip'
echo "artifact_path=$artifact_path" >> "$GITHUB_OUTPUT"
- name: Package artifact
working-directory: ${{ matrix.released_path }}
run: |
zip -r ../../${{ steps.info.outputs.artifact_path }} .
- name: Upload artifact
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ steps.info.outputs.tag_name }} ${{ steps.info.outputs.artifact_path }}
create-module-tag:
if: ${{ needs.release-please.outputs.releases_created }}
needs:
- release-please
strategy:
matrix:
released_path: ${{ fromJson(fromJson(needs.release-please.outputs.release).paths_released) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
id: checkout
with:
ref: ${{ needs.release-please.outputs.release.tag_name }}
fetch-depth: 0

- name: Extract info from release
id: info
run: |
tag_name='${{ fromJson(needs.release-please.outputs.release)[format('{0}--tag_name', matrix.released_path)] }}'
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
component_name=$(cat release-please-config.json | jq '.packages."${{ matrix.released_path }}".component' -r)
echo "component_name=$component_name" >> "$GITHUB_OUTPUT"
major='${{ fromJson(needs.release-please.outputs.release)[format('{0}--major', matrix.released_path)] }}'
echo "major=$major" >> "$GITHUB_OUTPUT"
minor='${{ fromJson(needs.release-please.outputs.release)[format('{0}--minor', matrix.released_path)] }}'
echo "minor=$minor" >> "$GITHUB_OUTPUT"
patch='${{ fromJson(needs.release-please.outputs.release)[format('{0}--patch', matrix.released_path)] }}'
echo "patch=$patch" >> "$GITHUB_OUTPUT"
- name: Checkout repo as orphan branch
uses: actions/checkout@v3
with:
ref: ${{ needs.release-please.outputs.release.tag_name }}
fetch-depth: 0
path: "orphan"

- name: Create orphan commit and separate version tags
working-directory: "orphan"
run: |
# kloia-tfmodules-releaser[bot] <169448830+kloia-tfmodules-releaser[bot]@users.noreply.github.com>
git config user.name "kloia-tfmodules-releaser[bot]"
git config user.email "169448830+kloia-tfmodules-releaser[bot]@users.noreply.github.com"
git checkout --orphan orphan/${{ github.sha }}
git rm -rf .
cp -r --copy-contents ../${{ matrix.released_path }}/* .
git add .
git commit \
-m 'chore: release module ${{ steps.info.tag_name }}' \
-m 'Original-Commit-Sha: ${{ github.sha }}'
git tag -f module/${{ steps.info.outputs.component_name }}/v${{ steps.info.outputs.major}}
git tag -f module/${{ steps.info.outputs.component_name }}/v${{ steps.info.outputs.major}}.${{ steps.info.outputs.minor }}
git tag -f module/${{ steps.info.outputs.component_name }}/v${{ steps.info.outputs.major}}.${{ steps.info.outputs.minor }}.${{ steps.info.outputs.patch }}
git push -f origin module/${{ steps.info.outputs.component_name }}/v${{ steps.info.outputs.major}}
git push -f origin module/${{ steps.info.outputs.component_name }}/v${{ steps.info.outputs.major}}.${{ steps.info.outputs.minor }}
git push -f origin module/${{ steps.info.outputs.component_name }}/v${{ steps.info.outputs.major}}.${{ steps.info.outputs.minor }}.${{ steps.info.outputs.patch }}
40 changes: 0 additions & 40 deletions .github/workflows/tagging_workflow.yml

This file was deleted.

69 changes: 53 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
### TERRAFORM
### Terraform

# Local .terraform directories
**/.terraform/*

# Terraform lockfile
.terraform.lock.hcl

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log

# Exclude all .tfvars files, which are likely to contain sentitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
crash.*.log

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
Expand All @@ -29,11 +22,55 @@ override.tf.json
.terraformrc
terraform.rc

### EDITORS
.idea/
.vscode/

### OS
### MacOS

# macOS
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Windows

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk
20 changes: 8 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
repos:
# pre-commit hook to verify commit messages are conventional commit compliant
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.2.1
hooks:
- id: commitizen
stages: [commit-msg]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: detect-aws-credentials
- id: detect-private-key
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.79.1
rev: v1.89.1
hooks:
- id: terrascan
- id: terraform_tfsec
- id: terraform_fmt
- id: terragrunt_fmt
# global tflint config
- id: terraform_tflint
args:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
65 changes: 65 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"metadata": "0.0.0",
"modules/metadata": "0.1.0",
"modules/aws-client-vpn": "0.1.0",
"modules/aws-ecr": "0.1.0",
"modules/aws-eks-addons": "0.1.0",
"modules/aws-ecs-service": "0.1.0",
"modules/aws-amplify": "0.1.0",
"modules/aws-vpc-peering-requester": "0.1.0",
"modules/aws-ecs-load-balancer": "0.1.0",
"modules/aws-rds-global-cluster": "0.1.0",
"modules/aws-dax": "0.1.0",
"modules/aws-mongodbatlas-database-user": "0.1.0",
"modules/aws-waf-ip-set": "0.1.0",
"modules/aws-ecs-task-definition": "0.1.0",
"modules/aws-kms": "0.1.0",
"modules/aws-alb-master": "0.1.0",
"modules/aws-cloudwatch-event-rule-master": "0.1.0",
"modules/aws-eks-rancher-importer": "0.1.0",
"modules/aws-self-signed-cert": "0.1.0",
"modules/aws-route53-health-check-main": "0.1.0",
"modules/aws-mongodbatlas-cluster": "0.2.1",
"modules/aws-route53-records": "0.1.0",
"modules/aws-vpc-peering-accepter": "0.1.0",
"modules/aws-security-hub": "0.1.0",
"modules/aws-route53-zones": "0.1.0",
"modules/aws-mongodbatlas-access": "0.1.0",
"modules/aws-centralized-logging": "0.1.0",
"modules/aws-waf": "0.1.0",
"modules/aws-elasticsearch": "0.1.0",
"modules/aws-msk-apache-kafka-cluster-master": "0.1.0",
"modules/aws-guardduty-master": "0.1.0",
"modules/aws-eks-rancher-joiner": "0.1.0",
"modules/aws-elasticache-redis": "0.1.0",
"modules/aws-rds-aurora": "0.1.0",
"modules/aws-mq": "0.1.0",
"modules/aws-ssm-parameter-store": "0.1.0",
"modules/aws-api-gateway": "0.1.0",
"modules/aws-secrets-manager": "0.1.0",
"modules/aws-cloudtrail-s3-bucket": "0.1.0",
"modules/aws-cloudtrail": "0.1.0",
"modules/aws-vpc": "0.1.0",
"modules/aws-efs": "0.1.0",
"modules/aws-transit-gateway": "0.1.0",
"modules/aws-cloudfront": "0.1.0",
"modules/aws-apigateway-v2-master": "0.1.0",
"modules/aws-shield": "0.1.0",
"modules/aws-key-pair": "0.1.0",
"modules/aws-sns-master": "0.1.0",
"modules/aws-cognito-user-pool": "0.1.0",
"modules/aws-sns": "0.1.0",
"modules/terraform-aws-sqs": "0.1.0",
"modules/aws-s3": "0.1.0",
"modules/aws-lambda": "0.1.0",
"modules/aws-ec2-instance": "0.1.0",
"modules/aws-ecs": "0.1.0",
"modules/aws-dynamodb-table": "0.1.0",
"modules/aws-acm": "0.1.0",
"modules/aws-cloudwatch": "0.1.0",
"modules/aws-eks": "0.1.0",
"modules/aws-iam": "0.1.0",
"modules/aws-rds": "0.1.0",
"modules/aws-security-group": "0.1.0",
"modules/aws-mongodbatlas-auth": "0.1.0"
}
12 changes: 12 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugin "terraform" {
enabled = true
preset = "recommended"
}

rule "terraform_required_providers" {
enabled = false
}

rule "terraform_required_version" {
enabled = false
}
Loading

0 comments on commit 63bae05

Please sign in to comment.