generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added and tested application stacks for linux and windows web app
- Loading branch information
1 parent
d312f54
commit 6df7f67
Showing
20 changed files
with
824 additions
and
578 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
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.7 | ||
secrets: | ||
GITHUB: ${{ secrets.GITHUB }} | ||
with: | ||
assignees: 'clouddrove-ci' |
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,12 @@ | ||
--- | ||
name: Auto merge | ||
on: | ||
pull_request: | ||
jobs: | ||
auto-merge: | ||
uses: clouddrove/github-shared-workflows/.github/workflows/auto_merge.yml@1.2.7 | ||
secrets: | ||
GITHUB: ${{ secrets.GITHUB }} | ||
with: | ||
tfcheck: 'basic-example / Check code format' | ||
... |
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,21 @@ | ||
name: tf-checks | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
basic-example: | ||
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.7 | ||
with: | ||
working_directory: './_example/basic/' | ||
|
||
complete-example: | ||
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.7 | ||
with: | ||
working_directory: './_example/complete/' | ||
|
||
vnet_with_existing_ddos_id-example: | ||
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.2.7 | ||
with: | ||
working_directory: './_example/vnet_with_existing_ddos_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 |
---|---|---|
@@ -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.7 | ||
secrets: | ||
GITHUB: ${{ secrets.GITHUB }} |
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,125 @@ | ||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Resource group | ||
##----------------------------------------------------------------------------- | ||
module "resource_group" { | ||
source = "clouddrove/resource-group/azure" | ||
version = "1.0.2" | ||
|
||
label_order = ["name", "environment"] | ||
name = "rg-example" | ||
environment = "test" | ||
location = "Canada Central" | ||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Log Analytics | ||
##----------------------------------------------------------------------------- | ||
module "log-analytics" { | ||
source = "clouddrove/log-analytics/azure" | ||
version = "1.0.1" | ||
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 | ||
} | ||
|
||
##----------------------------------------------------------------------------- | ||
## Linux web app | ||
##----------------------------------------------------------------------------- | ||
module "linux-web-app" { | ||
source = "../../.." | ||
enable = true | ||
name = "app" | ||
environment = "testing" | ||
label_order = ["name", "environment", ] | ||
resource_group_name = module.resource_group.resource_group_name | ||
location = module.resource_group.resource_group_location | ||
|
||
os_type = var.os_type | ||
sku_name = var.linux_sku_name | ||
|
||
|
||
|
||
##----------------------------------------------------------------------------- | ||
## To Deploy Container | ||
##----------------------------------------------------------------------------- | ||
use_docker = true | ||
docker_image_name = var.docker_image_name | ||
docker_registry_url = "<registryname>.azurecr.io" | ||
docker_registry_username = "<registryname>" | ||
docker_registry_password = "<docker_registry_password>" | ||
acr_id = "<acr_id>" | ||
|
||
##----------------------------------------------------------------------------- | ||
## Node application | ||
##----------------------------------------------------------------------------- | ||
use_node = false | ||
node_version = var.node_version | ||
|
||
##----------------------------------------------------------------------------- | ||
## Dot net application | ||
##----------------------------------------------------------------------------- | ||
use_dotnet = false | ||
dotnet_version = var.dotnet_version | ||
|
||
##----------------------------------------------------------------------------- | ||
## Java application | ||
##----------------------------------------------------------------------------- | ||
use_java = false | ||
java_version = var.java_version | ||
java_server = var.java_server | ||
java_server_version = var.java_server_version | ||
|
||
|
||
##----------------------------------------------------------------------------- | ||
## python application | ||
##----------------------------------------------------------------------------- | ||
|
||
use_python = false | ||
python_version = var.python_version | ||
|
||
##----------------------------------------------------------------------------- | ||
## php application | ||
##----------------------------------------------------------------------------- | ||
|
||
use_php = false | ||
php_version = var.php_version | ||
|
||
##----------------------------------------------------------------------------- | ||
## Ruby application | ||
##----------------------------------------------------------------------------- | ||
|
||
use_ruby = false | ||
ruby_version = var.ruby_version | ||
|
||
##----------------------------------------------------------------------------- | ||
## Go application | ||
##----------------------------------------------------------------------------- | ||
|
||
use_go = false | ||
go_version = var.go_version | ||
|
||
site_config = var.site_config | ||
app_settings = var.app_settings | ||
|
||
##----------------------------------------------------------------------------- | ||
## App service logs | ||
##----------------------------------------------------------------------------- | ||
|
||
app_service_logs = var.app_service_logs | ||
|
||
|
||
##----------------------------------------------------------------------------- | ||
## log analytics | ||
##----------------------------------------------------------------------------- | ||
log_analytics_workspace_id = module.log-analytics.workspace_id | ||
app_insights_workspace_id = module.log-analytics.workspace_id # log analytics workspace id in app insights | ||
} | ||
|
File renamed without changes.
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,98 @@ | ||
##----------------------------------------------------------------------------- | ||
## App Service | ||
##----------------------------------------------------------------------------- | ||
|
||
variable "linux_sku_name" { | ||
default = "B1" | ||
|
||
} | ||
|
||
variable "os_type" { | ||
default = "Linux" | ||
} | ||
|
||
variable "enable" { | ||
default = true | ||
} | ||
|
||
variable "is_linux_webapp" { | ||
default = true | ||
} | ||
|
||
variable "dotnet_version" { | ||
default = "8.0" | ||
} | ||
|
||
variable "node_version" { | ||
default = "20-lts" | ||
} | ||
|
||
variable "site_config" { | ||
default = { | ||
container_registry_use_managed_identity = true # Set to true | ||
} | ||
} | ||
|
||
variable "app_settings" { | ||
type = map(string) | ||
description = "A map of settings for the application" | ||
default = { | ||
foo = "bar" | ||
} | ||
} | ||
|
||
variable "php_version" { | ||
type = string | ||
default = "8.2" | ||
} | ||
|
||
variable "python_version" { | ||
type = string | ||
default = "3.12" | ||
} | ||
|
||
variable "go_version" { | ||
type = string | ||
default = "1.19" | ||
} | ||
|
||
variable "ruby_version" { | ||
type = string | ||
default = "2.7" | ||
} | ||
|
||
variable "java_version" { | ||
type = string | ||
default = "17" | ||
} | ||
|
||
variable "java_server" { | ||
type = string | ||
default = "JAVA" | ||
# Possible values include JAVA, TOMCAT, and JBOSSEAP ( Its in premium sku ). | ||
} | ||
|
||
variable "java_server_version" { | ||
type = string | ||
default = "17" | ||
} | ||
|
||
variable "docker_image_name" { | ||
default = "nginx:latest" | ||
} | ||
|
||
variable "app_service_logs" { | ||
default = { | ||
detailed_error_messages = false | ||
failed_request_tracing = false | ||
application_logs = { | ||
file_system_level = "Information" | ||
} | ||
http_logs = { | ||
file_system = { | ||
retention_in_days = 7 | ||
retention_in_mb = 35 | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.