Skip to content

Commit a5838fb

Browse files
authored
Merge pull request #9 from kumarvna/release/release-1.2.0-remove_provider_config
removing provider configuration dependency
2 parents a3fbf99 + c5bfbc8 commit a5838fb

File tree

11 files changed

+95
-72
lines changed

11 files changed

+95
-72
lines changed

README.md

Lines changed: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ A single database is the quickest and simplest deployment option for Azure SQL D
66

77
You can also create a single database in the provisioned or serverless compute tier. A provisioned database is pre-allocated a fixed amount of computing resources, including CPU and memory, and uses one of two purchasing models. This module creates a provisioned database using the vCore-based purchasing model, but you can choose a DTU-based model as well.
88

9-
## These types of resources are supported
9+
> **[NOTE]**
10+
> **This module now supports the meta arguments including `providers`, `depends_on`, `count`, and `for_each`.**
11+
12+
## Resources supported
1013

1114
* [SQL Servers](https://www.terraform.io/docs/providers/azurerm/r/sql_server.html)
1215
* [SQL Database](https://www.terraform.io/docs/providers/azurerm/r/mysql_database.html)
@@ -25,6 +28,11 @@ You can also create a single database in the provisioned or serverless compute t
2528
## Module Usage
2629

2730
```hcl
31+
# Azurerm provider configuration
32+
provider "azurerm" {
33+
features {}
34+
}
35+
2836
module "mssql-server" {
2937
source = "kumarvna/mssql-db/azurerm"
3038
version = "1.1.0"
@@ -183,55 +191,14 @@ Installation of the Microsoft `sqlcmd` utility on [Ubuntu](https://docs.microsof
183191

184192
## Recommended naming and tagging conventions
185193

186-
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.
194+
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.
195+
For recommendations on how to implement a tagging strategy, see Resource naming and tagging decision guide.
187196

188-
### Resource naming
197+
>**Important** :
198+
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.**
189199

190200
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`.
191201

192-
> ### Metadata tags
193-
194-
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.
195-
196-
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.
197-
198-
Tag Name|Description|Key|Example Value|Required?
199-
--------|-----------|---|-------------|---------|
200-
Project Name|Name of the Project for the infra is created. This is mandatory to create a resource names.|ProjectName|{Project name}|Yes
201-
Application Name|Name of the application, service, or workload the resource is associated with.|ApplicationName|{app name}|Yes
202-
Approver|Name Person responsible for approving costs related to this resource.|Approver|{email}|Yes
203-
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
204-
Cost Center|Accounting cost center associated with this resource.|CostCenter|{number}|Yes
205-
Disaster Recovery|Business criticality of this application, workload, or service.|DR|Mission Critical, Critical, Essential|Yes
206-
Environment|Deployment environment of this application, workload, or service.|Env|Prod, Dev, QA, Stage, Test|Yes
207-
Owner Name|Owner of the application, workload, or service.|Owner|{email}|Yes
208-
Requester Name|User that requested the creation of this application.|Requestor| {email}|Yes
209-
Service Class|Service Level Agreement level of this application, workload, or service.|ServiceClass|Dev, Bronze, Silver, Gold|Yes
210-
Start Date of the project|Date when this application, workload, or service was first deployed.|StartDate|{date}|No
211-
End Date of the Project|Date when this application, workload, or service is planned to be retired.|EndDate|{date}|No
212-
213-
> This module allows you to manage the above metadata tags directly or as an 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.
214-
215-
```hcl
216-
module "mssql-server" {
217-
source = "kumarvna/mssql-db/azurerm"
218-
version = "1.1.0"
219-
220-
# Resource Group, location, VNet and Subnet details
221-
resource_group_name = "rg-hub-demo-internal-shared-westeurope-001"
222-
223-
# ... omitted
224-
225-
tags = {
226-
ProjectName = "demo-internal"
227-
Env = "dev"
228-
229-
BusinessUnit = "CORP"
230-
ServiceClass = "Gold"
231-
}
232-
}
233-
```
234-
235202
## Requirements
236203

237204
| Name | Version |

examples/README.md

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Terraform module for Azure to create a MS SQL server with initial database, Azur
77
### Simple Azure SQL single database creation
88

99
```hcl
10+
# Azurerm provider configuration
11+
provider "azurerm" {
12+
features {}
13+
}
14+
1015
module "mssql-server" {
1116
source = "kumarvna/mssql-db/azurerm"
1217
version = "1.1.0"
@@ -81,6 +86,11 @@ module "mssql-server" {
8186
### Simple Azure SQL single database using private Endpoint
8287

8388
```hcl
89+
# Azurerm provider configuration
90+
provider "azurerm" {
91+
features {}
92+
}
93+
8494
module "mssql-server" {
8595
source = "kumarvna/mssql-db/azurerm"
8696
version = "1.1.0"
@@ -160,6 +170,11 @@ module "mssql-server" {
160170
### Azure SQL database creation using geo-replication with auto-failover groups
161171

162172
```hcl
173+
# Azurerm provider configuration
174+
provider "azurerm" {
175+
features {}
176+
}
177+
163178
module "mssql-server" {
164179
source = "kumarvna/mssql-db/azurerm"
165180
version = "1.1.0"
@@ -238,6 +253,11 @@ module "mssql-server" {
238253
### Azure SQL database creation using geo-replication with auto-failover groups and Private Endpoints
239254

240255
```hcl
256+
# Azurerm provider configuration
257+
provider "azurerm" {
258+
features {}
259+
}
260+
241261
module "mssql-server" {
242262
source = "kumarvna/mssql-db/azurerm"
243263
version = "1.1.0"
@@ -332,25 +352,25 @@ Run `terraform destroy` when you don't need these resources.
332352

333353
## Outputs
334354

335-
| Name | Description |
336-
| -------------------------------------------- | ------------------------------------------------------------------ |
337-
| `resource_group_name` | The name of the resource group in which resources are created |
338-
| `resource_group_location` | The location of the resource group in which resources are created |
339-
| `storage_account_id` | The ID of the storage account |
340-
| `storage_account_name` | The name of the storage account |
341-
| `primary_sql_server_id` | The primary Microsoft SQL Server ID |
342-
| `primary_sql_server_fqdn` | The fully qualified domain name of the primary Azure SQL Server |
343-
| `secondary_sql_server_id` | The secondary Microsoft SQL Server ID |
344-
| `secondary_sql_server_fqdn` | The fully qualified domain name of the secondary Azure SQL Server |
345-
| `sql_server_admin_user` | SQL database administrator login id |
346-
| `sql_server_admin_password` | SQL database administrator login password |
347-
| `sql_database_id` | The SQL Database ID |
348-
| `sql_database_name` | The SQL Database Name |
349-
| `sql_failover_group_id` | A failover group of databases on a collection of Azure SQL servers |
350-
| `primary_sql_server_private_endpoint` | id of the Primary SQL server Private Endpoint |
351-
| `secondary_sql_server_private_endpoint` | id of the Primary SQL server Private Endpoint |
352-
| `sql_server_private_dns_zone_domain` | DNS zone name of SQL server Private endpoints dns name records |
353-
| `primary_sql_server_private_endpoint_ip` | Primary SQL server private endpoint IPv4 Addresses |
354-
| `primary_sql_server_private_endpoint_fqdn` | Primary SQL server private endpoint IPv4 Addresses |
355-
| `secondary_sql_server_private_endpoint_ip` | Secondary SQL server private endpoint IPv4 Addresses |
356-
| `secondary_sql_server_private_endpoint_fqdn` | Secondary SQL server private endpoint IPv4 Addresses |
355+
Name | Description
356+
---- | -----------
357+
`resource_group_name` | The name of the resource group in which resources are created
358+
`resource_group_location`| The location of the resource group in which resources are created
359+
`storage_account_id`|The ID of the storage account
360+
`storage_account_name`|The name of the storage account
361+
`primary_sql_server_id`|The primary Microsoft SQL Server ID
362+
`primary_sql_server_fqdn`|The fully qualified domain name of the primary Azure SQL Server
363+
`secondary_sql_server_id`|The secondary Microsoft SQL Server ID
364+
`secondary_sql_server_fqdn`|The fully qualified domain name of the secondary Azure SQL Server
365+
`sql_server_admin_user`|SQL database administrator login id
366+
`sql_server_admin_password`|SQL database administrator login password
367+
`sql_database_id`|The SQL Database ID
368+
`sql_database_name`|The SQL Database Name
369+
`sql_failover_group_id`|A failover group of databases on a collection of Azure SQL servers
370+
`primary_sql_server_private_endpoint`|id of the Primary SQL server Private Endpoint
371+
`secondary_sql_server_private_endpoint`|id of the Primary SQL server Private Endpoint
372+
`sql_server_private_dns_zone_domain`|DNS zone name of SQL server Private endpoints DNS name records
373+
`primary_sql_server_private_endpoint_ip`|Primary SQL server private endpoint IPv4 Addresses
374+
`primary_sql_server_private_endpoint_fqdn`|Primary SQL server private endpoint IPv4 Addresses
375+
`secondary_sql_server_private_endpoint_ip`|Secondary SQL server private endpoint IPv4 Addresses
376+
`secondary_sql_server_private_endpoint_fqdn`|Secondary SQL server private endpoint FQDN Addresses

examples/SQL_DB_Using_Geo-replication_with_Auto-Failover_Groups/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Terraform module to create a SQL server with initial database, Azure AD login, F
55
## Module Usage
66

77
```hcl
8+
# Azurerm provider configuration
9+
provider "azurerm" {
10+
features {}
11+
}
12+
813
module "mssql-server" {
914
source = "kumarvna/mssql-db/azurerm"
1015
version = "1.1.0"

examples/SQL_DB_Using_Geo-replication_with_Auto-Failover_Groups/main.tf

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

examples/SQL_DB_Using_Geo-replication_with_Auto-Failover_Groups_and_Private_Endpoints/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Terraform module to create a SQL server with initial database, Azure AD login, F
55
## Module Usage
66

77
```hcl
8+
# Azurerm provider configuration
9+
provider "azurerm" {
10+
features {}
11+
}
12+
813
module "mssql-server" {
914
source = "kumarvna/mssql-db/azurerm"
1015
version = "1.1.0"

examples/SQL_DB_Using_Geo-replication_with_Auto-Failover_Groups_and_Private_Endpoints/main.tf

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

examples/Simple_SQL_Single_Database_Using_Private_Endpoint/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Terraform module to create a SQL server with initial database, Azure AD login, F
55
## Module Usage
66

77
```hcl
8+
# Azurerm provider configuration
9+
provider "azurerm" {
10+
features {}
11+
}
12+
813
module "mssql-server" {
914
source = "kumarvna/mssql-db/azurerm"
1015
version = "1.1.0"

examples/Simple_SQL_Single_Database_Using_Private_Endpoint/main.tf

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

examples/Simple_SQL_Single_Database_creation/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Terraform module to create a SQL server with initial database, Azure AD login, F
55
## Module Usage
66

77
```hcl
8+
# Azurerm provider configuration
9+
provider "azurerm" {
10+
features {}
11+
}
12+
813
module "mssql-server" {
914
source = "kumarvna/mssql-db/azurerm"
1015
version = "1.1.0"

examples/Simple_SQL_Single_Database_creation/main.tf

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

0 commit comments

Comments
 (0)