Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deprecations and Errors #18

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
.github/* @clouddrove/approvers

* @clouddrove/clouddrovians @clouddrove/approvers

.github/mergify.yml @clouddrove/admins
.github/CODEOWNERS @clouddrove/admins
# These owners will be the default owners for everything in the repo.
* @anmolnagpal @clouddrove-ci @clouddrove/terraform-azure-admins
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@master
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@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
tfcheck: 'basic-example / Check code format'
...
59 changes: 10 additions & 49 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -1,54 +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@v2
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: 'pre-commit check errors'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'pre-commit fix erros'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/[email protected]'
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 }}
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.

11 changes: 11 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
complete-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './examples/Simple_SQL_Single_Database_with_Private_Endpoint/'
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@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
46 changes: 36 additions & 10 deletions examples/Simple_SQL_Single_Database_with_Private_Endpoint/main.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
provider "azurerm" {
features {}
subscription_id = "000000-11111-1223-XXX-XXXXXXXXXXXX"
}

##-----------------------------------------------------------------------------
## Resource Group
##-----------------------------------------------------------------------------
module "resource_group" {
source = "clouddrove/resource-group/azure"
version = "1.0.2"

source = "clouddrove/resource-group/azure"
version = "1.0.2"
name = "app"
environment = "test"
label_order = ["name", "environment"]
location = "Canada Central"
}

##-----------------------------------------------------------------------------
## Vnet
##-----------------------------------------------------------------------------
module "vnet" {
source = "clouddrove/vnet/azure"
version = "1.0.4"
Expand All @@ -22,9 +27,12 @@ module "vnet" {
address_spaces = ["10.0.0.0/16"]
}

##-----------------------------------------------------------------------------
## Subnet
##-----------------------------------------------------------------------------
module "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
Expand All @@ -46,11 +54,28 @@ module "subnet" {
]
}

##-----------------------------------------------------------------------------
## Log Analytics
##-----------------------------------------------------------------------------
module "log-analytics" {
source = "clouddrove/log-analytics/azure"
version = "1.1.0"
name = "app"
environment = "test"
label_order = ["name", "environment"]
create_log_analytics_workspace = true
log_analytics_workspace_sku = "PerGB2018"
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
}

##-----------------------------------------------------------------------------
## Mssql Server database
##-----------------------------------------------------------------------------
module "mssql-server" {
depends_on = [module.resource_group, module.vnet]
source = "clouddrove/mssql-db/azure"

depends_on = [module.resource_group, module.vnet]
source = "../.."
name = "app"
environment = "test"
create_resource_group = false
Expand All @@ -59,11 +84,12 @@ module "mssql-server" {

sqlserver_name = "mssqldbserver"
database_name = "demomssqldb"
sql_database_edition = "Standard"
sqldb_service_objective_name = "S1"
db_sku_name = "Basic"
sql_server_version = "12.0"
enable_threat_detection_policy = true
enable_private_endpoint = true
virtual_network_name = module.vnet.vnet_name
existing_subnet_id = module.subnet.default_subnet_id[0]
enable_diagnostic = false
# log_analytics_workspace_id = module.log-analytics.workspace_id (Use it when enable_diagnostic = true)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
terraform {
required_version = ">=1.6.6"
}

terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.112.0"
}
}
}
Loading