Skip to content

Demo #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "demos/KaiMonkey"]
path = demos/KaiMonkey
url = https://github.com/tenable/KaiMonkey
1 change: 1 addition & 0 deletions demos/KaiMonkey
Submodule KaiMonkey added at c5ef4d
16 changes: 16 additions & 0 deletions demos/sample1-sa/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}

resource "azurerm_storage_account" "example" {
name = "storageaccountname"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_replication_type = "GRS"

tags = {
environment = "staging"
}
}
46 changes: 46 additions & 0 deletions demos/sample2-kv/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
provider "azurerm" {
features {
key_vault {
purge_soft_delete_on_destroy = true
recover_soft_deleted_key_vaults = true
}
}
}

data "azurerm_client_config" "current" {}

resource "azurerm_resource_group" "example" {
#ts:skip=AC_AZURE_0389 Disabling for Demo
name = "example-resources"
location = "West Europe"
}

resource "azurerm_key_vault" "example" {
name = "examplekeyvault"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
enabled_for_disk_encryption = true
tenant_id = data.azurerm_client_config.current.tenant_id
soft_delete_retention_days = 7
#tfsec:ignore:azure-keyvault-no-purge
purge_protection_enabled = false

sku_name = "standard"

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"Get",
]

secret_permissions = [
"Get",
]

storage_permissions = [
"Get",
]
}
}
37 changes: 37 additions & 0 deletions demos/sample3-as/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}

resource "azurerm_app_service_plan" "example" {
name = "example-appserviceplan"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name

sku {
tier = "Standard"
size = "S1"
}
}

resource "azurerm_app_service" "example" {
name = "example-app-service"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id

site_config {
dotnet_framework_version = "v4.0"
scm_type = "LocalGit"
}

app_settings = {
"SOME_KEY" = "some-value"
}

connection_string {
name = "Database"
type = "SQLServer"
value = "Server=some-server.mydomain.com;Integrated Security=SSPI"
}
}