Skip to content

Commit

Permalink
Merge pull request #13 from clouddrove/azure_1
Browse files Browse the repository at this point in the history
Azure 1
  • Loading branch information
d4kverma authored Jan 26, 2024
2 parents bf9588e + 26eed41 commit d54ea1e
Show file tree
Hide file tree
Showing 26 changed files with 420 additions and 338 deletions.
45 changes: 44 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,54 @@

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" # Location of package manifests
directory: "/_example/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

- package-ecosystem: "terraform" # See documentation for possible values
directory: "/_example/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


14 changes: 14 additions & 0 deletions .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto Assign PRs

on:
pull_request:
types: [opened, reopened]

workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.2.1
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
12 changes: 12 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Auto merge
on:
pull_request:
jobs:
auto-merge:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_merge.yml@1.2.1
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
tfcheck: 'complete / Get min/max versions'
...
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.2.1
secrets: inherit
with:
branch: 'master'
11 changes: 5 additions & 6 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,28 @@ jobs:
uses: actions/checkout@master

- name: 'Set up Python 3.7'
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v9.0.2'
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@v2.0.0
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: 'pre-commit fix erros'
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
continue-on-error: true
with:
actions_subcommand: 'push'
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/semantic-releaser.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/static-checks.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
complete-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.1
with:
working_directory: './_example/complete/'

basic-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.1
with:
working_directory: './_example/basic/'


11 changes: 11 additions & 0 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tf-lint
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@1.2.1
secrets:
GITHUB: ${{ secrets.GITHUB }}
4 changes: 2 additions & 2 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.2.1
secrets: inherit
with:
working_directory: '.'
working_directory: '.'
21 changes: 14 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.130.0

- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.12 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
hooks:
- id: terraform_fmt
- id: terraform_tflint
- id: terraform-fmt
- id: shellcheck
- id: tflint

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1 # Use the ref you want to point at
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: check-added-large-files
30 changes: 18 additions & 12 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ github_repo: clouddrove/terraform-azure-bastion

# Badges to display
badges:
- name: "Terraform"
image: "https://img.shields.io/badge/Terraform-v1.1.7-green"
url: "https://www.terraform.io"
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-azure-bastion.svg"
url: "https://github.com/clouddrove/terraform-azure-bastion/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-azure-bastion/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-azure-bastion/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
Expand All @@ -34,16 +37,19 @@ usage: |-
Here are some examples of how you can use this module in your inventory structure:
```hcl
module "bastion" {
source = "clouddrove/bastion/azure"
version = "1.0.0"
name = "app"
environment = "test"
resource_group_name = module.resource_group.resource_group_name
azure_bastion_subnet_address_prefix = ["10.0.5.0/24"]
virtual_network_name = module.virtual_network.vnet_name[0]
source = "clouddrove/bastion/azure"
version = "1.0.0"
name = "app"
environment = "test"
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
virtual_network_name = module.vnet.vnet_name[0]
subnet_id = module.name_specific_subnet.specific_subnet_id[0]
#### enable diagnostic setting
diagnostic_setting_enable = false
diagnostic_setting_enable = true
log_analytics_workspace_id = ""
}
}
```
21 changes: 21 additions & 0 deletions _example/basic/example.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
provider "azurerm" {
features {}
}

##-----------------------------------------------------------------------------
## Bastion module call.
##-----------------------------------------------------------------------------
module "bastion" {
source = "./../../"
name = "app"
environment = "test"
resource_group_name = "resource_group_name"
location = "Central India"
subnet_id = "<subnet_id>"

##-----------------------------------------------------------------------------
## enable diagnostic setting
##-----------------------------------------------------------------------------
diagnostic_setting_enable = false

}
14 changes: 14 additions & 0 deletions _example/basic/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
output "bastion_dns_name" {
value = module.bastion.dns_name
description = "Specifies the name of the bastion host"
}

output "bastion_id" {
value = module.bastion.id
description = "Specifies the name of the bastion host"
}





Loading

0 comments on commit d54ea1e

Please sign in to comment.