generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix : added deprecated attributes, labels and output.tf
- Loading branch information
1 parent
8f124ea
commit 0162c05
Showing
11 changed files
with
253 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,10 @@ jobs: | |
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected] | ||
with: | ||
working_directory: './_example/complete/' | ||
|
||
basic-example: | ||
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected] | ||
with: | ||
working_directory: './_example/basic/' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
output "bastion_dns_name" { | ||
value = join("", module.bastion.*.dns_name) | ||
description = "Specifies the name of the bastion host" | ||
} | ||
|
||
output "bastion_id" { | ||
value = join("", module.bastion.*.id) | ||
description = "Specifies the name of the bastion host" | ||
} | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Terraform version | ||
terraform { | ||
required_version = ">= 1.6.6" | ||
} | ||
|
||
terraform { | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">=3.85.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
locals { | ||
name = "app" | ||
environment = "test" | ||
label_order = ["name", "environment"] | ||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Resource Group module call | ||
## Resource group in which all resources will be deployed. | ||
##----------------------------------------------------------------------------- | ||
module "resource_group" { | ||
source = "clouddrove/resource-group/azure" | ||
version = "1.0.2" | ||
name = "app" | ||
environment = "test" | ||
label_order = ["name", "environment"] | ||
location = "Canada Central" | ||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Virtual Network module call. | ||
##----------------------------------------------------------------------------- | ||
module "vnet" { | ||
source = "clouddrove/vnet/azure" | ||
version = "1.0.4" | ||
name = "app" | ||
environment = "test" | ||
resource_group_name = module.resource_group.resource_group_name | ||
location = module.resource_group.resource_group_location | ||
address_spaces = ["10.0.0.0/16"] | ||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Subnet module call. | ||
##----------------------------------------------------------------------------- | ||
module "name_specific_subnet" { | ||
source = "clouddrove/subnet/azure" | ||
version = "1.0.2" | ||
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 | ||
|
||
#subnet | ||
specific_name_subnet = true | ||
specific_subnet_names = "AzureBastionSubnet" | ||
subnet_prefixes = ["10.0.1.0/24"] | ||
enable_route_table = false | ||
|
||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Log Analytics module call. | ||
## Log analytics workspace in which storage diagnostic logs will be sent. | ||
##----------------------------------------------------------------------------- | ||
module "log-analytics" { | ||
source = "clouddrove/log-analytics/azure" | ||
version = "1.0.1" | ||
name = local.name | ||
environment = local.environment | ||
label_order = local.label_order | ||
create_log_analytics_workspace = true | ||
log_analytics_workspace_sku = "PerGB2018" | ||
daily_quota_gb = "-1" | ||
internet_ingestion_enabled = true | ||
internet_query_enabled = true | ||
resource_group_name = module.resource_group.resource_group_name | ||
log_analytics_workspace_location = module.resource_group.resource_group_location | ||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Bastion module call. | ||
##----------------------------------------------------------------------------- | ||
module "bastion" { | ||
depends_on = [module.resource_group] | ||
source = "./../../" | ||
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 | ||
subnet_id = module.name_specific_subnet.specific_subnet_id[0] | ||
|
||
##----------------------------------------------------------------------------- | ||
## enable diagnostic setting | ||
##----------------------------------------------------------------------------- | ||
diagnostic_setting_enable = true | ||
log_analytics_workspace_id = module.log-analytics.workspace_id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#output "bastion_dns_name" { | ||
# value = join("", module.bastion.*.dns_name) | ||
# description = "Specifies the name of the bastion host" | ||
#} | ||
# | ||
#output "bastion_id" { | ||
# value = join("", module.bastion.*.id) | ||
# description = "Specifies the name of the bastion host" | ||
#} | ||
# | ||
# | ||
# | ||
# | ||
# | ||
output "bastion_dns_name" { | ||
value = join("", module.bastion.*.dns_name) | ||
description = "Specifies the name of the bastion host" | ||
} | ||
|
||
output "bastion_id" { | ||
value = join("", module.bastion.*.id) | ||
description = "Specifies the name of the bastion host" | ||
} | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.