-
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.
- Loading branch information
Showing
20 changed files
with
397 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
resource "azurerm_resource_group" "this" { | ||
name = "RG-${title(var.name)}" | ||
location = var.location | ||
} | ||
|
||
module "logic_app" { | ||
source = "../../" | ||
name = var.name | ||
location = var.location | ||
resource_group_name = azurerm_resource_group.this.name | ||
identity_type = "SystemAssigned" | ||
workflow_parameters = { | ||
storage_account_name : { | ||
type : "String", | ||
defaultValue : "storageaccountname" | ||
} | ||
} | ||
recurrence_triggers = { | ||
run-every-day = { | ||
frequency = "Day" | ||
interval = 1 | ||
time_zone = "GMT Standard Time" | ||
at_these_minutes = [0, 30] | ||
at_these_hours = [0, 12] | ||
} | ||
} | ||
custom_actions = { | ||
"Initialize_variable" : file("${path.module}/templates/actions/initialize_variable.json") | ||
} | ||
tags = { | ||
env : "dev" | ||
} | ||
} |
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,19 @@ | ||
output "logic_app_id" { | ||
description = "The Logic App ID." | ||
value = module.logic_app.id | ||
} | ||
|
||
output "http_triggers" { | ||
description = "Http Triggers." | ||
value = module.logic_app.http_triggers | ||
} | ||
|
||
output "recurrence_triggers" { | ||
description = "Recurrence Triggers." | ||
value = module.logic_app.recurrence_triggers | ||
} | ||
|
||
output "custom_triggers" { | ||
description = "Custom Triggers." | ||
value = module.logic_app.custom_triggers | ||
} |
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,5 @@ | ||
provider "azurerm" { | ||
skip_provider_registration = true | ||
subscription_id = var.subscription_id | ||
features {} | ||
} |
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 @@ | ||
{ | ||
"inputs": { | ||
"variables": [ | ||
{ | ||
"name": "ProcessedFiles", | ||
"type": "array" | ||
} | ||
] | ||
}, | ||
"runAfter": {}, | ||
"type": "InitializeVariable" | ||
} |
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,16 @@ | ||
variable "name" { | ||
description = "Specifies the name of resource group." | ||
type = string | ||
default = "logic-app-demo" | ||
} | ||
|
||
variable "location" { | ||
description = "Specifies the Azure Region where the logic app should exists. Changing this forces a new resource to be created." | ||
type = string | ||
default = "westeurope" | ||
} | ||
|
||
variable "subscription_id" { | ||
description = "Specifies the subscription id should be used for this demo." | ||
type = string | ||
} |
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,9 @@ | ||
terraform { | ||
required_version = ">= 0.13.1" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">= 3.22" | ||
} | ||
} | ||
} |
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,45 @@ | ||
data "azurerm_client_config" "current" {} | ||
|
||
resource "azurerm_resource_group" "this" { | ||
name = "RG-${title(var.name)}" | ||
location = var.location | ||
} | ||
|
||
module "logic_app" { | ||
source = "../../" | ||
name = var.name | ||
location = var.location | ||
resource_group_name = azurerm_resource_group.this.name | ||
identity_type = "SystemAssigned" | ||
workflow_parameters = { | ||
storage_account_name : { | ||
type : "String", | ||
defaultValue : "storageaccountname" | ||
} | ||
} | ||
disable_sas_auth_schema = true | ||
authentication_policies = { | ||
test-policy : [ | ||
{ | ||
claim_name : "Issuer", | ||
claim_value : "https://sts.windows.net/${data.azurerm_client_config.current.tenant_id}" | ||
}, | ||
{ | ||
claim_name : "DummyClaim", | ||
claim_value : "Dummy Value" | ||
}, | ||
] | ||
} | ||
custom_triggers = { | ||
HTTP_Trigger = { | ||
body = file("${path.module}/templates/triggers/http_trigger.json") | ||
} | ||
} | ||
custom_actions = { | ||
"Initialize_variable" : file("${path.module}/templates/actions/initialize_variable.json") | ||
"Response" : file("${path.module}/templates/actions/response.json") | ||
} | ||
tags = { | ||
env : "dev" | ||
} | ||
} |
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,19 @@ | ||
output "logic_app_id" { | ||
description = "The Logic App ID." | ||
value = module.logic_app.id | ||
} | ||
|
||
output "http_triggers" { | ||
description = "Http Triggers." | ||
value = module.logic_app.http_triggers | ||
} | ||
|
||
output "recurrence_triggers" { | ||
description = "Recurrence Triggers." | ||
value = module.logic_app.recurrence_triggers | ||
} | ||
|
||
output "custom_triggers" { | ||
description = "Custom Triggers." | ||
value = module.logic_app.custom_triggers | ||
} |
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,5 @@ | ||
provider "azurerm" { | ||
skip_provider_registration = true | ||
subscription_id = var.subscription_id | ||
features {} | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/disable_sas_scheme/templates/actions/initialize_variable.json
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 @@ | ||
{ | ||
"inputs": { | ||
"variables": [ | ||
{ | ||
"name": "ProcessedFiles", | ||
"type": "array" | ||
} | ||
] | ||
}, | ||
"runAfter": {}, | ||
"type": "InitializeVariable" | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/disable_sas_scheme/templates/actions/response.json
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,15 @@ | ||
{ | ||
"inputs": { | ||
"body": { | ||
"processed_files": "@variables('ProcessedFiles')" | ||
}, | ||
"statusCode": 201 | ||
}, | ||
"kind": "Http", | ||
"runAfter": { | ||
"Initialize_variable": [ | ||
"Succeeded" | ||
] | ||
}, | ||
"type": "Response" | ||
} |
18 changes: 18 additions & 0 deletions
18
examples/disable_sas_scheme/templates/triggers/http_trigger.json
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,18 @@ | ||
{ | ||
"inputs" : { | ||
"method" : "POST", | ||
"schema" : { | ||
"properties" : { | ||
"month" : { | ||
"type" : "integer" | ||
}, | ||
"year" : { | ||
"type" : "integer" | ||
} | ||
}, | ||
"type" : "object" | ||
} | ||
}, | ||
"kind" : "Http", | ||
"type" : "Request" | ||
} |
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,16 @@ | ||
variable "name" { | ||
description = "Specifies the name of resource group." | ||
type = string | ||
default = "logic-app-demo" | ||
} | ||
|
||
variable "location" { | ||
description = "Specifies the Azure Region where the logic app should exists. Changing this forces a new resource to be created." | ||
type = string | ||
default = "westeurope" | ||
} | ||
|
||
variable "subscription_id" { | ||
description = "Specifies the subscription id should be used for this demo." | ||
type = string | ||
} |
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,9 @@ | ||
terraform { | ||
required_version = ">= 0.13.1" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">= 3.22" | ||
} | ||
} | ||
} |
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
Oops, something went wrong.