File tree 3 files changed +19
-5
lines changed
3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change
1
+ data "azurerm_subscription" "current" {}
Original file line number Diff line number Diff line change 1
- resource "azurerm_resource_group" "main " {
2
- name = " calculators-and-converters "
3
- location = " Central India " # Change this to your preferred region
1
+ resource "azurerm_resource_group" "rg " {
2
+ name = var . resource_group_name
3
+ location = var . location
4
4
5
- tags = {
6
- environment = " production "
5
+ lifecycle {
6
+ prevent_destroy = true
7
7
}
8
+ }
9
+
10
+ import {
11
+ to = azurerm_resource_group. rg
12
+ id = " /subscriptions/${ data . azurerm_subscription . current . subscription_id } /resourceGroups/${ var . resource_group_name } "
8
13
}
Original file line number Diff line number Diff line change
1
+ variable "resource_group_name" {
2
+ default = " calculators-and-converters"
3
+ }
4
+
5
+ variable "location" {
6
+ default = " Central India"
7
+ }
8
+
You can’t perform that action at this time.
0 commit comments