Skip to content

Commit 03e1767

Browse files
committed
updating examples
1 parent 607b30a commit 03e1767

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@ module "key-vault" {
1212
version = "2.1.0"
1313
1414
# Resource Group and Key Vault pricing tier details
15-
resource_group_name = "rg-demo-project-shared-westeurope-001"
15+
resource_group_name = "rg-shared-westeurope-01"
1616
key_vault_name = "demo-project-shard"
1717
key_vault_sku_pricing_tier = "premium"
1818
1919
# Once `Purge Protection` has been Enabled it's not possible to Disable it
2020
# Deleting the Key Vault with `Purge Protection` enabled will schedule the Key Vault to be deleted (currently 90 days)
2121
# Once `Soft Delete` has been Enabled it's not possible to Disable it.
2222
enable_purge_protection = false
23-
enable_soft_delete = false
2423
25-
# Adding Key valut logs to Azure monitoring and Log Analytics space
24+
# Adding Key vault logs to Azure monitoring and Log Analytics space
2625
log_analytics_workspace_id = var.log_analytics_workspace_id
2726
storage_account_id = var.storage_account_id
2827
@@ -37,23 +36,24 @@ module "key-vault" {
3736
storage_permissions = ["backup", "get", "list", "recover"]
3837
},
3938
40-
# Access policies for AD Groups, enable this feature to provide list of Azure AD groups and set permissions.
39+
# Access policies for AD Groups, enable this feature to provide list of Azure AD groups and set permissions.
4140
{
4241
azure_ad_group_names = ["ADGroupName1", "ADGroupName2"]
4342
secret_permissions = ["get", "list", "set"]
4443
},
44+
4545
]
4646
4747
# Create a required Secrets as per your need.
48-
# When you Add `usernames` with empty password this module creates a strong random password
49-
# use .tfvars file to manage the secrets to avoid security violations.
48+
# When you Add `usernames` with empty password this module creates a strong random password
49+
# use .tfvars file to manage the secrets as variables to avoid security issues.
5050
secrets = {
5151
"message" = "Hello, world!"
5252
"vmpass" = ""
5353
}
5454
5555
# Adding TAG's to your Azure resources (Required)
56-
# ProjectName and Env are already declared above, to use them here or create a varible.
56+
# ProjectName and Env are already declared above, to use them here or create a varible.
5757
tags = {
5858
ProjectName = "demo-project"
5959
Env = "dev"
@@ -113,7 +113,7 @@ When you need to pass a secure value (like a password) as a parameter during dep
113113

114114
When soft-delete is enabled, resources marked as deleted resources are retained for a specified period (90 days by default). The service further provides a mechanism for recovering the deleted object, essentially undoing the deletion.
115115

116-
When creating a new key vault, soft-delete is enabled by default. __The ability to opt out of soft-delete will be deprecated by the end of the year 2020__, and soft-delete protection will automatically be turned on for all key vaults.
116+
When creating a new key vault, soft-delete is enabled by default. __As of 2020-12-15 Azure now requires that Soft Delete is enabled on Key Vaults and this can no longer be disabled__.
117117

118118
Purge protection is an optional Key Vault behavior and is not enabled by default. Purge protection can only be enabled once soft-delete is enabled. It can be turned on using this module by setting the argument `enable_purge_protection = true`.
119119

examples/complete/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ module "key-vault" {
1010
version = "2.1.0"
1111
1212
# Resource Group and Key Vault pricing tier details
13-
resource_group_name = "rg-demo-project-shared-westeurope-001"
13+
resource_group_name = "rg-shared-westeurope-01"
1414
key_vault_name = "demo-project-shard"
1515
key_vault_sku_pricing_tier = "premium"
1616
1717
# Once `Purge Protection` has been Enabled it's not possible to Disable it
1818
# Deleting the Key Vault with `Purge Protection` enabled will schedule the Key Vault to be deleted (currently 90 days)
1919
# Once `Soft Delete` has been Enabled it's not possible to Disable it.
2020
enable_purge_protection = false
21-
enable_soft_delete = false
2221
23-
# Adding Key valut logs to Azure monitoring and Log Analytics space
22+
# Adding Key vault logs to Azure monitoring and Log Analytics space
2423
log_analytics_workspace_id = var.log_analytics_workspace_id
2524
storage_account_id = var.storage_account_id
2625
@@ -35,23 +34,24 @@ module "key-vault" {
3534
storage_permissions = ["backup", "get", "list", "recover"]
3635
},
3736
38-
# Access policies for AD Groups, enable this feature to provide list of Azure AD groups and set permissions.
37+
# Access policies for AD Groups, enable this feature to provide list of Azure AD groups and set permissions.
3938
{
4039
azure_ad_group_names = ["ADGroupName1", "ADGroupName2"]
4140
secret_permissions = ["get", "list", "set"]
4241
},
42+
4343
]
4444
4545
# Create a required Secrets as per your need.
46-
# When you Add `usernames` with empty password this module creates a strong random password
47-
# use .tfvars file to manage the secrets to avoid security violations.
46+
# When you Add `usernames` with empty password this module creates a strong random password
47+
# use .tfvars file to manage the secrets as variables to avoid security issues.
4848
secrets = {
4949
"message" = "Hello, world!"
5050
"vmpass" = ""
5151
}
5252
5353
# Adding TAG's to your Azure resources (Required)
54-
# ProjectName and Env are already declared above, to use them here or create a varible.
54+
# ProjectName and Env are already declared above, to use them here or create a varible.
5555
tags = {
5656
ProjectName = "demo-project"
5757
Env = "dev"

examples/complete/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module "key-vault" {
33
version = "2.1.0"
44

55
# Resource Group and Key Vault pricing tier details
6-
resource_group_name = "rg-sap-test-kumars" #"rg-shared-westeurope-01"
6+
resource_group_name = "rg-shared-westeurope-01"
77
key_vault_name = "demo-project-shard"
88
key_vault_sku_pricing_tier = "premium"
99

@@ -12,7 +12,7 @@ module "key-vault" {
1212
# Once `Soft Delete` has been Enabled it's not possible to Disable it.
1313
enable_purge_protection = false
1414

15-
# Adding Key valut logs to Azure monitoring and Log Analytics space
15+
# Adding Key vault logs to Azure monitoring and Log Analytics space
1616
log_analytics_workspace_id = var.log_analytics_workspace_id
1717
storage_account_id = var.storage_account_id
1818

@@ -27,7 +27,7 @@ module "key-vault" {
2727
storage_permissions = ["backup", "get", "list", "recover"]
2828
},
2929

30-
/* # Access policies for AD Groups, enable this feature to provide list of Azure AD groups and set permissions.
30+
/* # Access policies for AD Groups, enable this feature to provide list of Azure AD groups and set permissions.
3131
{
3232
azure_ad_group_names = ["ADGroupName1", "ADGroupName2"]
3333
secret_permissions = ["get", "list", "set"]

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ resource "azurerm_monitor_diagnostic_setting" "diag" {
168168
target_resource_id = azurerm_key_vault.main.id
169169
log_analytics_workspace_id = var.log_analytics_workspace_id
170170
log_analytics_destination_type = "Dedicated"
171-
storage_account_id = var.storage_account_id
171+
storage_account_id = var.storage_account_id != null ? var.storage_account_id : null
172172
log {
173173
category = "AuditEvent"
174174
enabled = true

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ variable "log_analytics_workspace_id" {
6767

6868
variable "azure_monitor_logs_retention_in_days" {
6969
description = "The Azure Monitoring data retention in days."
70-
default = 30
70+
default = 0
7171
}
7272

7373
variable "storage_account_id" {

0 commit comments

Comments
 (0)