Skip to content

Commit d124255

Browse files
authored
Improve documentation for resource groups (#154)
1 parent 4ad3c20 commit d124255

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

docs/resources/azure_subscription.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ description: |-
1111
4. exocompute - Provides snapshot indexing, file recovery, storage tiering, and application-consistent protection of Azure objects.
1212
5. sql_db_protection - Provides centralized database backup management and recovery in an Azure SQL Database deployment.
1313
6. sql_mi_protection - Provides centralized database backup management and recovery for an Azure SQL Managed Instance deployment.
14+
~> Note: Even though the resource_group_name and the resource_group_region fields are marked as optional you should always specify them. They are marked as optional to simplify the migration of existing Terraform configurations. If omitted, RSC will generate a unique resource group name but it will not create the actual resource group. Until the resource group is created, the RSC feature depending on the resource group will not function as expected.
1415
-> Note: As of now, sql_db_protection and sql_mi_protection does not support specifying an Azure resource group.
1516
---
1617

@@ -26,6 +27,8 @@ Any combination of different RSC features can be enabled for a subscription:
2627
5. `sql_db_protection` - Provides centralized database backup management and recovery in an Azure SQL Database deployment.
2728
6. `sql_mi_protection` - Provides centralized database backup management and recovery for an Azure SQL Managed Instance deployment.
2829

30+
~> **Note:** Even though the `resource_group_name` and the `resource_group_region` fields are marked as optional you should always specify them. They are marked as optional to simplify the migration of existing Terraform configurations. If omitted, RSC will generate a unique resource group name but it will not create the actual resource group. Until the resource group is created, the RSC feature depending on the resource group will not function as expected.
31+
2932
-> **Note:** As of now, `sql_db_protection` and `sql_mi_protection` does not support specifying an Azure resource group.
3033

3134
## Example Usage
@@ -105,7 +108,7 @@ Required:
105108

106109
Optional:
107110

108-
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature.
111+
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature. RSC assumes the resource group already exists.
109112
- `resource_group_region` (String) Region of the Azure resource group.
110113
- `resource_group_tags` (Map of String) Tags to add to the Azure resource group.
111114

@@ -123,7 +126,7 @@ Required:
123126

124127
Optional:
125128

126-
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature.
129+
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature. RSC assumes the resource group already exists.
127130
- `resource_group_region` (String) Region of the Azure resource group.
128131
- `resource_group_tags` (Map of String) Tags to add to the Azure resource group.
129132

@@ -141,7 +144,7 @@ Required:
141144

142145
Optional:
143146

144-
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature.
147+
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature. RSC assumes the resource group already exists.
145148
- `resource_group_region` (String) Region of the Azure resource group.
146149
- `resource_group_tags` (Map of String) Tags to add to the Azure resource group.
147150

@@ -159,7 +162,7 @@ Required:
159162

160163
Optional:
161164

162-
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature.
165+
- `resource_group_name` (String) Name of the Azure resource group where RSC places all resources created by the feature. RSC assumes the resource group already exists.
163166
- `resource_group_region` (String) Region of the Azure resource group.
164167
- `resource_group_tags` (Map of String) Tags to add to the Azure resource group.
165168

internal/provider/resource_azure_subscription.go

+16-8
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ func resourceAzureSubscription() *schema.Resource {
6363
" 6. `sql_mi_protection` - Provides centralized database backup management and recovery for an Azure SQL " +
6464
" Managed Instance deployment.\n" +
6565
"\n" +
66+
"~> **Note:** Even though the `resource_group_name` and the `resource_group_region` fields are marked as " +
67+
"optional you should always specify them. They are marked as optional to simplify the migration of existing " +
68+
"Terraform configurations. If omitted, RSC will generate a unique resource group name but it will not create " +
69+
"the actual resource group. Until the resource group is created, the RSC feature depending on the resource " +
70+
"group will not function as expected.\n" +
71+
"\n" +
6672
"-> **Note:** As of now, `sql_db_protection` and `sql_mi_protection` does not support specifying an Azure " +
6773
" resource group.\n",
6874
Schema: map[string]*schema.Schema{
@@ -86,9 +92,10 @@ func resourceAzureSubscription() *schema.Resource {
8692
"specified in the standard Azure style, e.g. `eastus`.",
8793
},
8894
keyResourceGroupName: {
89-
Type: schema.TypeString,
90-
Optional: true,
91-
Description: "Name of the Azure resource group where RSC places all resources created by the feature.",
95+
Type: schema.TypeString,
96+
Optional: true,
97+
Description: "Name of the Azure resource group where RSC places all resources created by " +
98+
"the feature. RSC assumes the resource group already exists.",
9299
ValidateFunc: validation.StringIsNotWhiteSpace,
93100
},
94101
keyResourceGroupRegion: {
@@ -138,7 +145,7 @@ func resourceAzureSubscription() *schema.Resource {
138145
Type: schema.TypeString,
139146
Optional: true,
140147
Description: "Name of the Azure resource group where RSC places all resources created by " +
141-
"the feature.",
148+
"the feature. RSC assumes the resource group already exists.",
142149
ValidateFunc: validation.StringIsNotWhiteSpace,
143150
},
144151
keyResourceGroupRegion: {
@@ -188,7 +195,7 @@ func resourceAzureSubscription() *schema.Resource {
188195
Type: schema.TypeString,
189196
Optional: true,
190197
Description: "Name of the Azure resource group where RSC places all resources created by " +
191-
"the feature.",
198+
"the feature. RSC assumes the resource group already exists.",
192199
ValidateFunc: validation.StringIsNotWhiteSpace,
193200
},
194201
keyResourceGroupRegion: {
@@ -241,9 +248,10 @@ func resourceAzureSubscription() *schema.Resource {
241248
"the standard Azure style, e.g. `eastus`.",
242249
},
243250
keyResourceGroupName: {
244-
Type: schema.TypeString,
245-
Optional: true,
246-
Description: "Name of the Azure resource group where RSC places all resources created by the feature.",
251+
Type: schema.TypeString,
252+
Optional: true,
253+
Description: "Name of the Azure resource group where RSC places all resources created by " +
254+
"the feature. RSC assumes the resource group already exists.",
247255
ValidateFunc: validation.StringIsNotWhiteSpace,
248256
},
249257
keyResourceGroupRegion: {

0 commit comments

Comments
 (0)