diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b969cda..49c1658 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -28,7 +28,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/complete" # Location of package manifests + directory: "/examples/complete" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -41,7 +41,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/cors_s3" # Location of package manifests + directory: "/examples/cors_s3" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -54,7 +54,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/default-s3" # Location of package manifests + directory: "/examples/default-s3" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -67,7 +67,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/encryption-s3" # Location of package manifests + directory: "/examples/encryption-s3" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -80,7 +80,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/logging-encryption-s3" # Location of package manifests + directory: "/examples/logging-encryption-s3" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -93,7 +93,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/logging-s3" # Location of package manifests + directory: "/examples/logging-s3" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -106,7 +106,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/s3-replication" # Location of package manifests + directory: "/examples/s3-replication" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -119,7 +119,7 @@ updates: open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/website-s3" # Location of package manifests + directory: "/examples/website-s3" # Location of package manifests schedule: interval: "weekly" # Add assignees @@ -129,4 +129,4 @@ updates: reviewers: - "approvers" # Allow up to 3 open pull requests for pip dependencies - open-pull-requests-limit: 3 \ No newline at end of file + open-pull-requests-limit: 3 diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index 95e527b..3d0c2f1 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -1,53 +1,15 @@ -name: 'Create README.md file' +name: Readme Workflow on: push: branches: - master + paths-ignore: + - 'README.md' + - 'docs/**' + workflow_dispatch: jobs: - readme: - name: 'readme-create' - runs-on: ubuntu-latest - steps: - - name: 'Checkout' - uses: actions/checkout@master - - - name: 'Set up Python 3.7' - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: 'create readme' - uses: 'clouddrove/github-actions@9.0.3' - with: - actions_subcommand: 'readme' - github_token: '${{ secrets.GITHUB }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - - name: 'pre-commit check errors' - uses: pre-commit/action@v3.0.1 - continue-on-error: true - - - name: 'pre-commit fix erros' - uses: pre-commit/action@v3.0.1 - continue-on-error: true - - - name: 'push readme' - uses: 'clouddrove/github-actions@9.0.3' - continue-on-error: true - with: - actions_subcommand: 'push' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: 'Slack Notification' - uses: clouddrove/action-slack@v2 - with: - status: ${{ job.status }} - fields: repo,author - author_name: 'CloudDrove' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required - if: always() + README: + uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@1.2.4 + secrets: + TOKEN : ${{ secrets.GITHUB }} + SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} diff --git a/.github/workflows/tf-checks.yml b/.github/workflows/tf-checks.yml index 8be9558..47b2c95 100644 --- a/.github/workflows/tf-checks.yml +++ b/.github/workflows/tf-checks.yml @@ -8,32 +8,32 @@ jobs: tf-checks-complete-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/complete/' + working_directory: './examples/complete/' tf-checks-cors_s3-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/cors_s3/' + working_directory: './examples/cors_s3/' tf-checks-default-s3-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/default-s3/' + working_directory: './examples/default-s3/' tf-checks-encryption-s3-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/encryption-s3/' + working_directory: './examples/encryption-s3/' tf-checks-logging-encryption-s3-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/logging-encryption-s3/' + working_directory: './examples/logging-encryption-s3/' tf-checks-logging-s3-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/logging-s3/' + working_directory: './examples/logging-s3/' tf-checks-s3-replication-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/s3-replication/' + working_directory: './examples/s3-replication/' tf-checks-website-s3-example: uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 with: - working_directory: './_example/website-s3/' \ No newline at end of file + working_directory: './examples/website-s3/' \ No newline at end of file diff --git a/README.yaml b/README.yaml index 1f402dd..4fbb7c1 100644 --- a/README.yaml +++ b/README.yaml @@ -24,19 +24,28 @@ badges: - name: "Licence" image: "https://img.shields.io/badge/License-APACHE-blue.svg" url: "LICENSE.md" + - name: "Changelog" + image: "https://img.shields.io/badge/Changelog-blue" + url: "CHANGELOG.md" prerequesties: - - name: Terraform 1.5.3 + - name: Terraform url: https://learn.hashicorp.com/terraform/getting-started/install.html -# description of this project + version: ">= 1.6.6" + +providers: + - name: aws + url: https://aws.amazon.com/ + version: ">= 5.31.0" + +module_dependencies: + - name: Labels Module + url: https://github.com/clouddrove/terraform-aws-labels + description: Provides resource tagging. + description: |- Terraform module to create default S3 bucket with logging and encryption type specific features. -# extra content -include: - - "terraform.md" - -# How to use this project # How to use this project usage: |- Here are some examples of how you can use this module in your inventory structure: diff --git a/_example/logging-encryption-s3/versions.tf b/_example/logging-encryption-s3/versions.tf deleted file mode 100644 index 5b25067..0000000 --- a/_example/logging-encryption-s3/versions.tf +++ /dev/null @@ -1,11 +0,0 @@ -# Terraform version -terraform { - required_version = ">= 1.5.5" - - required_providers { - aws = { - source = "hashicorp/aws" - version = ">= 5.13.1" - } - } -} \ No newline at end of file diff --git a/_example/logging-s3/versions.tf b/_example/logging-s3/versions.tf deleted file mode 100644 index 5b25067..0000000 --- a/_example/logging-s3/versions.tf +++ /dev/null @@ -1,11 +0,0 @@ -# Terraform version -terraform { - required_version = ">= 1.5.5" - - required_providers { - aws = { - source = "hashicorp/aws" - version = ">= 5.13.1" - } - } -} \ No newline at end of file diff --git a/_example/s3-replication/versions.tf b/_example/s3-replication/versions.tf deleted file mode 100644 index 5b25067..0000000 --- a/_example/s3-replication/versions.tf +++ /dev/null @@ -1,11 +0,0 @@ -# Terraform version -terraform { - required_version = ">= 1.5.5" - - required_providers { - aws = { - source = "hashicorp/aws" - version = ">= 5.13.1" - } - } -} \ No newline at end of file diff --git a/_example/website-s3/versions.tf b/_example/website-s3/versions.tf deleted file mode 100644 index 5b25067..0000000 --- a/_example/website-s3/versions.tf +++ /dev/null @@ -1,11 +0,0 @@ -# Terraform version -terraform { - required_version = ">= 1.5.5" - - required_providers { - aws = { - source = "hashicorp/aws" - version = ">= 5.13.1" - } - } -} \ No newline at end of file diff --git a/_example/complete/example.tf b/examples/complete/example.tf similarity index 100% rename from _example/complete/example.tf rename to examples/complete/example.tf diff --git a/_example/complete/output.tf b/examples/complete/output.tf similarity index 100% rename from _example/complete/output.tf rename to examples/complete/output.tf diff --git a/_example/complete/versions.tf b/examples/complete/versions.tf similarity index 64% rename from _example/complete/versions.tf rename to examples/complete/versions.tf index 5b25067..8a25625 100644 --- a/_example/complete/versions.tf +++ b/examples/complete/versions.tf @@ -1,11 +1,11 @@ # Terraform version terraform { - required_version = ">= 1.5.5" + required_version = ">= 1.6.6" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.13.1" + version = ">= 5.31.0" } } } \ No newline at end of file diff --git a/_example/cors_s3/example.tf b/examples/cors_s3/example.tf similarity index 100% rename from _example/cors_s3/example.tf rename to examples/cors_s3/example.tf diff --git a/_example/cors_s3/outputs.tf b/examples/cors_s3/outputs.tf similarity index 100% rename from _example/cors_s3/outputs.tf rename to examples/cors_s3/outputs.tf diff --git a/_example/cors_s3/versions.tf b/examples/cors_s3/versions.tf similarity index 64% rename from _example/cors_s3/versions.tf rename to examples/cors_s3/versions.tf index 5b25067..8a25625 100644 --- a/_example/cors_s3/versions.tf +++ b/examples/cors_s3/versions.tf @@ -1,11 +1,11 @@ # Terraform version terraform { - required_version = ">= 1.5.5" + required_version = ">= 1.6.6" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.13.1" + version = ">= 5.31.0" } } } \ No newline at end of file diff --git a/_example/default-s3/example.tf b/examples/default-s3/example.tf similarity index 100% rename from _example/default-s3/example.tf rename to examples/default-s3/example.tf diff --git a/_example/default-s3/outputs.tf b/examples/default-s3/outputs.tf similarity index 100% rename from _example/default-s3/outputs.tf rename to examples/default-s3/outputs.tf diff --git a/_example/default-s3/versions.tf b/examples/default-s3/versions.tf similarity index 64% rename from _example/default-s3/versions.tf rename to examples/default-s3/versions.tf index 5b25067..8a25625 100644 --- a/_example/default-s3/versions.tf +++ b/examples/default-s3/versions.tf @@ -1,11 +1,11 @@ # Terraform version terraform { - required_version = ">= 1.5.5" + required_version = ">= 1.6.6" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.13.1" + version = ">= 5.31.0" } } } \ No newline at end of file diff --git a/_example/encryption-s3/example.tf b/examples/encryption-s3/example.tf similarity index 100% rename from _example/encryption-s3/example.tf rename to examples/encryption-s3/example.tf diff --git a/_example/encryption-s3/outputs.tf b/examples/encryption-s3/outputs.tf similarity index 100% rename from _example/encryption-s3/outputs.tf rename to examples/encryption-s3/outputs.tf diff --git a/_example/encryption-s3/versions.tf b/examples/encryption-s3/versions.tf similarity index 64% rename from _example/encryption-s3/versions.tf rename to examples/encryption-s3/versions.tf index 5b25067..8a25625 100644 --- a/_example/encryption-s3/versions.tf +++ b/examples/encryption-s3/versions.tf @@ -1,11 +1,11 @@ # Terraform version terraform { - required_version = ">= 1.5.5" + required_version = ">= 1.6.6" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.13.1" + version = ">= 5.31.0" } } } \ No newline at end of file diff --git a/_example/logging-encryption-s3/example.tf b/examples/logging-encryption-s3/example.tf similarity index 100% rename from _example/logging-encryption-s3/example.tf rename to examples/logging-encryption-s3/example.tf diff --git a/_example/logging-encryption-s3/outputs.tf b/examples/logging-encryption-s3/outputs.tf similarity index 100% rename from _example/logging-encryption-s3/outputs.tf rename to examples/logging-encryption-s3/outputs.tf diff --git a/examples/logging-encryption-s3/versions.tf b/examples/logging-encryption-s3/versions.tf new file mode 100644 index 0000000..8a25625 --- /dev/null +++ b/examples/logging-encryption-s3/versions.tf @@ -0,0 +1,11 @@ +# Terraform version +terraform { + required_version = ">= 1.6.6" + + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 5.31.0" + } + } +} \ No newline at end of file diff --git a/_example/logging-s3/example.tf b/examples/logging-s3/example.tf similarity index 100% rename from _example/logging-s3/example.tf rename to examples/logging-s3/example.tf diff --git a/_example/logging-s3/outputs.tf b/examples/logging-s3/outputs.tf similarity index 100% rename from _example/logging-s3/outputs.tf rename to examples/logging-s3/outputs.tf diff --git a/examples/logging-s3/versions.tf b/examples/logging-s3/versions.tf new file mode 100644 index 0000000..8a25625 --- /dev/null +++ b/examples/logging-s3/versions.tf @@ -0,0 +1,11 @@ +# Terraform version +terraform { + required_version = ">= 1.6.6" + + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 5.31.0" + } + } +} \ No newline at end of file diff --git a/_example/s3-replication/example.tf b/examples/s3-replication/example.tf similarity index 100% rename from _example/s3-replication/example.tf rename to examples/s3-replication/example.tf diff --git a/_example/s3-replication/outputs.tf b/examples/s3-replication/outputs.tf similarity index 100% rename from _example/s3-replication/outputs.tf rename to examples/s3-replication/outputs.tf diff --git a/examples/s3-replication/versions.tf b/examples/s3-replication/versions.tf new file mode 100644 index 0000000..8a25625 --- /dev/null +++ b/examples/s3-replication/versions.tf @@ -0,0 +1,11 @@ +# Terraform version +terraform { + required_version = ">= 1.6.6" + + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 5.31.0" + } + } +} \ No newline at end of file diff --git a/_example/website-s3/example.tf b/examples/website-s3/example.tf similarity index 100% rename from _example/website-s3/example.tf rename to examples/website-s3/example.tf diff --git a/_example/website-s3/outputs.tf b/examples/website-s3/outputs.tf similarity index 100% rename from _example/website-s3/outputs.tf rename to examples/website-s3/outputs.tf diff --git a/examples/website-s3/versions.tf b/examples/website-s3/versions.tf new file mode 100644 index 0000000..8a25625 --- /dev/null +++ b/examples/website-s3/versions.tf @@ -0,0 +1,11 @@ +# Terraform version +terraform { + required_version = ">= 1.6.6" + + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 5.31.0" + } + } +} \ No newline at end of file diff --git a/versions.tf b/versions.tf index 5b25067..8a25625 100644 --- a/versions.tf +++ b/versions.tf @@ -1,11 +1,11 @@ # Terraform version terraform { - required_version = ">= 1.5.5" + required_version = ">= 1.6.6" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.13.1" + version = ">= 5.31.0" } } } \ No newline at end of file