Skip to content

Commit b0884a8

Browse files
committed
added demos
1 parent f45a2c1 commit b0884a8

File tree

5 files changed

+103
-0
lines changed

5 files changed

+103
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "demos/KaiMonkey"]
2+
path = demos/KaiMonkey
3+
url = https://github.com/tenable/KaiMonkey

demos/KaiMonkey

Submodule KaiMonkey added at c5ef4d4

demos/sample1-sa/main.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
resource "azurerm_resource_group" "example" {
2+
name = "example-resources"
3+
location = "West Europe"
4+
}
5+
6+
resource "azurerm_storage_account" "example" {
7+
name = "storageaccountname"
8+
resource_group_name = azurerm_resource_group.example.name
9+
location = azurerm_resource_group.example.location
10+
account_tier = "Standard"
11+
account_replication_type = "GRS"
12+
13+
tags = {
14+
environment = "staging"
15+
}
16+
}

demos/sample2-kv/main.tf

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
provider "azurerm" {
2+
features {
3+
key_vault {
4+
purge_soft_delete_on_destroy = true
5+
recover_soft_deleted_key_vaults = true
6+
}
7+
}
8+
}
9+
10+
data "azurerm_client_config" "current" {}
11+
12+
resource "azurerm_resource_group" "example" {
13+
#ts:skip=AC_AZURE_0389 Disabling for Demo
14+
name = "example-resources"
15+
location = "West Europe"
16+
}
17+
18+
resource "azurerm_key_vault" "example" {
19+
name = "examplekeyvault"
20+
location = azurerm_resource_group.example.location
21+
resource_group_name = azurerm_resource_group.example.name
22+
enabled_for_disk_encryption = true
23+
tenant_id = data.azurerm_client_config.current.tenant_id
24+
soft_delete_retention_days = 7
25+
#tfsec:ignore:azure-keyvault-no-purge
26+
purge_protection_enabled = false
27+
28+
sku_name = "standard"
29+
30+
access_policy {
31+
tenant_id = data.azurerm_client_config.current.tenant_id
32+
object_id = data.azurerm_client_config.current.object_id
33+
34+
key_permissions = [
35+
"Get",
36+
]
37+
38+
secret_permissions = [
39+
"Get",
40+
]
41+
42+
storage_permissions = [
43+
"Get",
44+
]
45+
}
46+
}

demos/sample3-as/main.tf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
resource "azurerm_resource_group" "example" {
2+
name = "example-resources"
3+
location = "West Europe"
4+
}
5+
6+
resource "azurerm_app_service_plan" "example" {
7+
name = "example-appserviceplan"
8+
location = azurerm_resource_group.example.location
9+
resource_group_name = azurerm_resource_group.example.name
10+
11+
sku {
12+
tier = "Standard"
13+
size = "S1"
14+
}
15+
}
16+
17+
resource "azurerm_app_service" "example" {
18+
name = "example-app-service"
19+
location = azurerm_resource_group.example.location
20+
resource_group_name = azurerm_resource_group.example.name
21+
app_service_plan_id = azurerm_app_service_plan.example.id
22+
23+
site_config {
24+
dotnet_framework_version = "v4.0"
25+
scm_type = "LocalGit"
26+
}
27+
28+
app_settings = {
29+
"SOME_KEY" = "some-value"
30+
}
31+
32+
connection_string {
33+
name = "Database"
34+
type = "SQLServer"
35+
value = "Server=some-server.mydomain.com;Integrated Security=SSPI"
36+
}
37+
}

0 commit comments

Comments
 (0)