generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.yaml
108 lines (97 loc) · 3.99 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name : Terraform AZURE STORAGE
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: clouddrove/terraform-azure-storage
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-azure-storage.svg"
url: "https://github.com/clouddrove/terraform-azure-storage/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-azure-storage/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-azure-storage/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
# description of this project
description: |-
Terraform module to create storage resource on AZURE.
# extra content
include:
- "terraform.md"
# How to use this project
# yamllint disable rule:line-length
usage: |-
### Simple Example
Here is an example of how you can use this module in your inventory structure:
#### storage account without cmk encryption
```hcl
module "storage" {
source = "../.."
name = local.name
environment = local.environment
label_order = local.label_order
resource_group_name = "test-rg"
location = "Central India"
storage_account_name = "storage7386"
public_network_access_enabled = true
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "GRS"
## Encryption is not enabled for this Storage account
cmk_encryption_enabled = false
## Storage Container
containers_list = [
{ name = "app-test", access_type = "private" },
]
tables = ["table1"]
queues = ["queue1"]
file_shares = [
{ name = "fileshare", quota = "10" },
]
virtual_network_id = "/subscriptions/--------------<vnet_id>---------------"
subnet_id = "/subscriptions/--------------<subnet_id>---------------"
log_analytics_workspace_id = "/subscriptions/--------------<log_analytics_workspace_id>---------------"
}
```
#### storage account with cmk encryption
```hcl
module "storage" {
source = "../.."
name = local.name
environment = local.environment
label_order = local.label_order
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
storage_account_name = "storage874682"
public_network_access_enabled = true
account_kind = "StorageV2"
account_tier = "Standard"
identity_type = "UserAssigned"
object_id = [data.azurerm_client_config.current_client_config.object_id]
account_replication_type = "ZRS"
cmk_encryption_enabled = true
admin_objects_ids = [data.azurerm_client_config.current_client_config.object_id]
###customer_managed_key can only be set when the account_kind is set to StorageV2 or account_tier set to Premium, and the identity type is UserAssigned.
key_vault_id = module.vault.id
## Storage Container
containers_list = [
{ name = "app-test", access_type = "private" },
]
tables = ["table1"]
queues = ["queue1"]
file_shares = [
{ name = "fileshare", quota = "10" },
]
virtual_network_id = module.vnet.vnet_id[0]
subnet_id = module.subnet.default_subnet_id[0]
log_analytics_workspace_id = module.log-analytics.workspace_id
}
```