-
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
10 changed files
with
116 additions
and
3 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,11 @@ | ||
resource "azurerm_resource_group" "this" { | ||
name = "RG-${title(var.name)}" | ||
location = var.location | ||
} | ||
|
||
module "api_connection" { | ||
source = "../../" | ||
api_type = "planner" | ||
resource_group_name = azurerm_resource_group.this.name | ||
connection_display_name = "Demo Planner Connection" | ||
} |
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 "connection_id" { | ||
description = "Api Connection Resource ID." | ||
value = module.api_connection.connection_id | ||
} | ||
|
||
output "managed_api_id" { | ||
description = "Managed API ID." | ||
value = module.api_connection.managed_api_id | ||
} | ||
|
||
output "connection_name" { | ||
description = "Api Connection Name." | ||
value = module.api_connection.connection_name | ||
} | ||
|
||
output "logic_app_parameter" { | ||
description = "Logic Apps Managed Identity Output to use in Logic App Parameters to configure this connection." | ||
value = module.api_connection.logic_app_parameter | ||
} |
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,15 @@ | ||
variable "name" { | ||
description = "Specifies the name of resource group." | ||
type = string | ||
} | ||
|
||
variable "location" { | ||
description = "Specifies the Azure Region to create api connection. 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"name": { | ||
"type": "String" | ||
}, | ||
"displayName": { | ||
"type": "String" | ||
}, | ||
"tags": { | ||
"type": "Object", | ||
"defaultValue": {}, | ||
"metadata": { | ||
"description": "Tags to apply to the Azure Connection." | ||
} | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Web/connections", | ||
"apiVersion": "2016-06-01", | ||
"name": "[parameters('name')]", | ||
"location": "[resourceGroup().location]", | ||
"tags": "[parameters('tags')]", | ||
"kind": "V1", | ||
"properties": { | ||
"displayName": "[parameters('displayName')]", | ||
"api": { | ||
"name": "planner", | ||
"displayName": "Planner", | ||
"description": "Microsoft Planner lets you easily bring together teams, tasks, documents, and conversations for better results.", | ||
"iconUri": "[concat('https://connectoricons-prod.azureedge.net/releases/v1.0.1680/1.0.1680.3652/planner/icon.png')]", | ||
"brandColor": "#107c41", | ||
"id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/',resourceGroup().location,'/managedApis/planner')]", | ||
"type": "Microsoft.Web/locations/managedApis" | ||
} | ||
} | ||
} | ||
], | ||
"outputs": { | ||
"connectionId": { | ||
"type": "String", | ||
"value": "[resourceId('Microsoft.Web/connections', parameters('name'))]" | ||
}, | ||
"managedApiId": { | ||
"type": "String", | ||
"value": "[reference(resourceId('Microsoft.Web/connections', parameters('name')),'2016-06-01', 'full').properties.api.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
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