From 79afada8a436a7e876fab47e8f6c37a25b95d1f2 Mon Sep 17 00:00:00 2001 From: Tanish Date: Wed, 11 Sep 2024 23:24:00 +0530 Subject: [PATCH 1/2] fix: Added subscription_id & updated module versions (#26) * fix: Added subscription_id & updated module versions * fix: formatted the code * fix: updated workflows & changed _examples to examples * fix: updated dependabot workflow --- .github/dependabot.yml | 39 +------------- .github/workflows/auto_assignee.yml | 4 +- .github/workflows/automerge.yml | 22 ++++---- .github/workflows/changelog.yml | 4 +- .github/workflows/readme.yml | 58 ++++----------------- .github/workflows/tf-checks.yml | 12 ++--- .github/workflows/tflint.yml | 4 +- .github/workflows/tfsec.yml | 4 +- {_example => examples}/basic/example.tf | 1 + {_example => examples}/basic/outputs.tf | 0 {_example => examples}/basic/versions.tf | 0 {_example => examples}/complete/example.tf | 6 ++- {_example => examples}/complete/outputs.tf | 0 {_example => examples}/complete/versions.tf | 0 14 files changed, 42 insertions(+), 112 deletions(-) rename {_example => examples}/basic/example.tf (92%) rename {_example => examples}/basic/outputs.tf (100%) rename {_example => examples}/basic/versions.tf (100%) rename {_example => examples}/complete/example.tf (94%) rename {_example => examples}/complete/outputs.tf (100%) rename {_example => examples}/complete/versions.tf (100%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3657620..1f9524c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,53 +6,18 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - open-pull-requests-limit: 3 - assignees: - - "clouddrove-ci" - reviewers: - - "approvers" - - package-ecosystem: "terraform" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "weekly" - # Add assignees - assignees: - - "clouddrove-ci" - # Add reviewer - reviewers: - - "approvers" - # Allow up to 3 open pull requests for pip dependencies - open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/complete" # Location of package manifests + directory: "/examples/basic" # Location of package manifests schedule: interval: "weekly" - # Add assignees - assignees: - - "clouddrove-ci" - # Add reviewer - reviewers: - - "approvers" - # Allow up to 3 open pull requests for pip dependencies - open-pull-requests-limit: 3 - package-ecosystem: "terraform" # See documentation for possible values - directory: "/_example/basic" # Location of package manifests + directory: "/examples/complete" # Location of package manifests schedule: interval: "weekly" - # Add assignees - assignees: - - "clouddrove-ci" - # Add reviewer - reviewers: - - "approvers" - # Allow up to 3 open pull requests for pip dependencies - open-pull-requests-limit: 3 - \ No newline at end of file diff --git a/.github/workflows/auto_assignee.yml b/.github/workflows/auto_assignee.yml index 7c9f442..77d5fdf 100644 --- a/.github/workflows/auto_assignee.yml +++ b/.github/workflows/auto_assignee.yml @@ -7,8 +7,8 @@ on: workflow_dispatch: jobs: assignee: - uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.2.4 + uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master secrets: GITHUB: ${{ secrets.GITHUB }} with: - assignees: 'clouddrove-ci' + assignees: 'clouddrove-ci' \ No newline at end of file diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 38bef0f..47988d0 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,12 +1,12 @@ --- -name: Auto merge -on: - pull_request: -jobs: - auto-merge: - uses: clouddrove/github-shared-workflows/.github/workflows/auto_merge.yml@1.2.4 - secrets: - GITHUB: ${{ secrets.GITHUB }} - with: - tfcheck: 'complete / Get min/max versions' -... + name: Auto merge + on: + pull_request: + jobs: + auto-merge: + uses: clouddrove/github-shared-workflows/.github/workflows/auto_merge.yml@master + secrets: + GITHUB: ${{ secrets.GITHUB }} + with: + tfcheck: 'basic / Check code format' + ... \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 30dd881..4b735f5 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: changelog: - uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.2.4 + uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master secrets: inherit with: - branch: 'master' + branch: 'master' \ No newline at end of file diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index f1a4ed9..444164d 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-create: - 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@master + secrets: + TOKEN : ${{ secrets.GITHUB }} + SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} \ No newline at end of file diff --git a/.github/workflows/tf-checks.yml b/.github/workflows/tf-checks.yml index 7ffab8d..076ec9b 100644 --- a/.github/workflows/tf-checks.yml +++ b/.github/workflows/tf-checks.yml @@ -6,13 +6,13 @@ on: workflow_dispatch: jobs: complete-example: - uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 + uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master + secrets: inherit with: - working_directory: './_example/complete/' + working_directory: './examples/complete/' basic-example: - uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.4 + uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master + secrets: inherit with: - working_directory: './_example/basic/' - - \ No newline at end of file + working_directory: './examples/basic/' diff --git a/.github/workflows/tflint.yml b/.github/workflows/tflint.yml index b342e98..ee98182 100644 --- a/.github/workflows/tflint.yml +++ b/.github/workflows/tflint.yml @@ -6,6 +6,6 @@ on: workflow_dispatch: jobs: tf-lint: - uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@1.2.4 + uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@master secrets: - GITHUB: ${{ secrets.GITHUB }} + GITHUB: ${{ secrets.GITHUB }} \ No newline at end of file diff --git a/.github/workflows/tfsec.yml b/.github/workflows/tfsec.yml index 6938e8e..9aaf588 100644 --- a/.github/workflows/tfsec.yml +++ b/.github/workflows/tfsec.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: tfsec: - uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.2.4 + uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master secrets: inherit with: - working_directory: '.' + working_directory: '.' \ No newline at end of file diff --git a/_example/basic/example.tf b/examples/basic/example.tf similarity index 92% rename from _example/basic/example.tf rename to examples/basic/example.tf index 63bc781..faf29e2 100644 --- a/_example/basic/example.tf +++ b/examples/basic/example.tf @@ -1,5 +1,6 @@ provider "azurerm" { features {} + subscription_id = "000000-11111-1223-XXX-XXXXXXXXXXXX" } ##----------------------------------------------------------------------------- diff --git a/_example/basic/outputs.tf b/examples/basic/outputs.tf similarity index 100% rename from _example/basic/outputs.tf rename to examples/basic/outputs.tf diff --git a/_example/basic/versions.tf b/examples/basic/versions.tf similarity index 100% rename from _example/basic/versions.tf rename to examples/basic/versions.tf diff --git a/_example/complete/example.tf b/examples/complete/example.tf similarity index 94% rename from _example/complete/example.tf rename to examples/complete/example.tf index b3a1921..4f17476 100644 --- a/_example/complete/example.tf +++ b/examples/complete/example.tf @@ -1,5 +1,6 @@ provider "azurerm" { features {} + subscription_id = "000000-11111-1223-XXX-XXXXXXXXXXXX" } locals { @@ -39,7 +40,7 @@ module "vnet" { ##----------------------------------------------------------------------------- module "name_specific_subnet" { source = "clouddrove/subnet/azure" - version = "1.1.0" + version = "1.2.1" name = "app" environment = "test" resource_group_name = module.resource_group.resource_group_name @@ -60,7 +61,7 @@ module "name_specific_subnet" { ##----------------------------------------------------------------------------- module "log-analytics" { source = "clouddrove/log-analytics/azure" - version = "1.0.1" + version = "1.1.0" name = local.name environment = local.environment label_order = local.label_order @@ -71,6 +72,7 @@ module "log-analytics" { internet_query_enabled = true resource_group_name = module.resource_group.resource_group_name log_analytics_workspace_location = module.resource_group.resource_group_location + log_analytics_workspace_id = module.log-analytics.workspace_id } ##----------------------------------------------------------------------------- diff --git a/_example/complete/outputs.tf b/examples/complete/outputs.tf similarity index 100% rename from _example/complete/outputs.tf rename to examples/complete/outputs.tf diff --git a/_example/complete/versions.tf b/examples/complete/versions.tf similarity index 100% rename from _example/complete/versions.tf rename to examples/complete/versions.tf From 27e89f2fd32c10e241c21cf421fb76efa6982512 Mon Sep 17 00:00:00 2001 From: clouddrove-ci Date: Wed, 11 Sep 2024 18:03:45 +0000 Subject: [PATCH 2/2] update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56c8a47..de8d590 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Banner](https://github.com/clouddrove/terraform-gcp-vpc/blob/master/docs/CloudDrove.png)][website] +[![Banner](https://github.com/clouddrove/terraform-module-template/assets/119565952/67a8a1af-2eb7-40b7-ae07-c94cde9ce062)][website]

Terraform AZURE BASTION