Skip to content

Commit f792bbe

Browse files
authored
Merge pull request #5 from kumarvna/develop
removing provider configuration dependency
2 parents ad26dbf + 378a04a commit f792bbe

File tree

8 files changed

+60
-47
lines changed

8 files changed

+60
-47
lines changed

README.md

Lines changed: 15 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
Terraform Module to create an Azure storage account with a set of containers (and access level), set of file shares (and quota), tables, queues, Network policies and Blob lifecycle management.
44

5-
To defines the kind of account, set the argument to `account_kind = "StorageV2"`. Account kind defaults to `StorageV2`. If you want to change this value to other storage accounts kind, then this module automatically computes the appropriate values for `account_tier`, `account_replication_type`. The valid options are `BlobStorage`, `BlockBlobStorage`, `FileStorage`, `Storage` and `StorageV2`.
5+
To defines the kind of account, set the argument to `account_kind = "StorageV2"`. Account kind defaults to `StorageV2`. If you want to change this value to other storage accounts kind, then this module automatically computes the appropriate values for `account_tier`, `account_replication_type`. The valid options are `BlobStorage`, `BlockBlobStorage`, `FileStorage`, `Storage` and `StorageV2`. `static_website` can only be set when the account_kind is set to `StorageV2`.
66

7-
>Note: *static_website can only be set when the account_kind is set to `StorageV2`.*
7+
> **[NOTE]**
8+
> **This module now supports the meta arguments including `providers`, `depends_on`, `count`, and `for_each`.**
89
9-
These types of resources are supported:
10+
## resources are supported:
1011

1112
* [Storage Account](https://www.terraform.io/docs/providers/azurerm/r/storage_account.html)
1213
* [Storage Advanced Threat Protection](https://www.terraform.io/docs/providers/azurerm/r/advanced_threat_protection.html)
@@ -20,6 +21,11 @@ These types of resources are supported:
2021
## Module Usage
2122

2223
```hcl
24+
# Azure Provider configuration
25+
provider "azurerm" {
26+
features {}
27+
}
28+
2329
module "storage" {
2430
source = "kumarvna/storage/azurerm"
2531
version = "2.2.0"
@@ -65,11 +71,11 @@ module "storage" {
6571
}
6672
```
6773

68-
## Create resource group
74+
### Resource Group
6975

7076
By default, this module will not create a resource group and the name of an existing resource group to be given in an argument `resource_group_name`. If you want to create a new resource group, set the argument `create_resource_group = true`.
7177

72-
>*If you are using an existing resource group, then this module uses the same resource group location to create all resources in this module.*
78+
*If you are using an existing resource group, then this module uses the same resource group location to create all resources in this module.*
7379

7480
## BlockBlobStorage accounts
7581

@@ -176,52 +182,14 @@ module "storage" {
176182

177183
## Recommended naming and tagging conventions
178184

179-
Well-defined naming and metadata tagging conventions help to quickly locate and manage resources. These conventions also help associate cloud usage costs with business teams via chargeback and show back accounting mechanisms.
185+
Applying tags to your Azure resources, resource groups, and subscriptions to logically organize them into a taxonomy. Each tag consists of a name and a value pair. For example, you can apply the name `Environment` and the value `Production` to all the resources in production.
186+
For recommendations on how to implement a tagging strategy, see Resource naming and tagging decision guide.
180187

181-
> ### Resource naming
188+
>**Important** :
189+
Tag names are case-insensitive for operations. A tag with a tag name, regardless of the casing, is updated or retrieved. However, the resource provider might keep the casing you provide for the tag name. You'll see that casing in cost reports. **Tag values are case-sensitive.**
182190

183191
An effective naming convention assembles resource names by using important resource information as parts of a resource's name. For example, using these [recommended naming conventions](https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging#example-names), a public IP resource for a production SharePoint workload is named like this: `pip-sharepoint-prod-westus-001`.
184192

185-
> ### Metadata tags
186-
187-
When applying metadata tags to the cloud resources, you can include information about those assets that couldn't be included in the resource name. You can use that information to perform more sophisticated filtering and reporting on resources. This information can be used by IT or business teams to find resources or generate reports about resource usage and billing.
188-
189-
The following list provides the recommended common tags that capture important context and information about resources. Use this list as a starting point to establish your tagging conventions.
190-
191-
Tag Name|Description|Key|Example Value|Required?
192-
--------|-----------|---|-------------|---------|
193-
Project Name|Name of the Project for the infra is created. This is mandatory to create a resource names.|ProjectName|{Project name}|Yes
194-
Application Name|Name of the application, service, or workload the resource is associated with.|ApplicationName|{app name}|Yes
195-
Approver|Name Person responsible for approving costs related to this resource.|Approver|{email}|Yes
196-
Business Unit|Top-level division of your company that owns the subscription or workload the resource belongs to. In smaller organizations, this may represent a single corporate or shared top-level organizational element.|BusinessUnit|FINANCE, MARKETING,{Product Name},CORP,SHARED|Yes
197-
Cost Center|Accounting cost center associated with this resource.|CostCenter|{number}|Yes
198-
Disaster Recovery|Business criticality of this application, workload, or service.|DR|Mission Critical, Critical, Essential|Yes
199-
Environment|Deployment environment of this application, workload, or service.|Env|Prod, Dev, QA, Stage, Test|Yes
200-
Owner Name|Owner of the application, workload, or service.|Owner|{email}|Yes
201-
Requester Name|User that requested the creation of this application.|Requestor| {email}|Yes
202-
Service Class|Service Level Agreement level of this application, workload, or service.|ServiceClass|Dev, Bronze, Silver, Gold|Yes
203-
Start Date of the project|Date when this application, workload, or service was first deployed.|StartDate|{date}|No
204-
End Date of the Project|Date when this application, workload, or service is planned to be retired.|EndDate|{date}|No
205-
206-
> This module allows you to manage the above metadata tags directly or as a variable using `variables.tf`. All Azure resources which support tagging can be tagged by specifying key-values in argument `tags`. Tag `ResourceName` is added automatically to all resources.
207-
208-
```hcl
209-
module "key-vault" {
210-
source = "kumarvna/storage/azurerm"
211-
version = "2.2.0"
212-
213-
# ... omitted
214-
215-
tags = {
216-
ProjectName = "demo-project"
217-
Env = "dev"
218-
219-
BusinessUnit = "CORP"
220-
ServiceClass = "Gold"
221-
}
222-
}
223-
```
224-
225193
## Requirements
226194

227195
| Name | Version |

examples/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Terraform Module to create an Azure storage account with a set of containers (an
77
### Storage account with Containers
88

99
```hcl
10+
# Azure Provider configuration
11+
provider "azurerm" {
12+
features {}
13+
}
14+
1015
module "storage" {
1116
source = "kumarvna/storage/azurerm"
1217
version = "2.2.0"
@@ -42,6 +47,11 @@ module "storage" {
4247
### Storage account with SMB File Shares
4348

4449
```hcl
50+
# Azure Provider configuration
51+
provider "azurerm" {
52+
features {}
53+
}
54+
4555
module "storage" {
4656
source = "kumarvna/storage/azurerm"
4757
version = "2.2.0"
@@ -77,6 +87,11 @@ module "storage" {
7787
### Storage Account with all additional features
7888

7989
```hcl
90+
# Azure Provider configuration
91+
provider "azurerm" {
92+
features {}
93+
}
94+
8095
module "storage" {
8196
source = "kumarvna/storage/azurerm"
8297
version = "2.2.0"

examples/complete/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
This example is to create a storage account with containers, SMB file shares, tables, queues, lifecycle management and other additional features.
44

55
```hcl
6+
# Azure Provider configuration
7+
provider "azurerm" {
8+
features {}
9+
}
10+
611
module "storage" {
712
source = "kumarvna/storage/azurerm"
813
version = "2.2.0"

examples/complete/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Azure Provider configuration
2+
provider "azurerm" {
3+
features {}
4+
}
5+
16
module "storage" {
27
source = "kumarvna/storage/azurerm"
38
version = "2.2.0"

examples/storage_account_with_containers/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Simple configuration to create a Azure storage account with Containers.
55
## Module Usage
66

77
```hcl
8+
# Azure Provider configuration
9+
provider "azurerm" {
10+
features {}
11+
}
12+
813
module "storage" {
914
source = "kumarvna/storage/azurerm"
1015
version = "2.2.0"

examples/storage_account_with_containers/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Azure Provider configuration
2+
provider "azurerm" {
3+
features {}
4+
}
5+
16
module "storage" {
27
source = "kumarvna/storage/azurerm"
38
version = "2.2.0"

examples/storage_account_with_fileshares/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Simple configuration to create a Azure storage account with SMB file shares.
55
## Module Usage
66

77
```hcl
8+
# Azure Provider configuration
9+
provider "azurerm" {
10+
features {}
11+
}
12+
813
module "storage" {
914
source = "kumarvna/storage/azurerm"
1015
version = "2.1.0"

examples/storage_account_with_fileshares/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Azure Provider configuration
2+
provider "azurerm" {
3+
features {}
4+
}
5+
16
module "storage" {
27
source = "kumarvna/storage/azurerm"
38
version = "2.2.0"

0 commit comments

Comments
 (0)