-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.tf
31 lines (26 loc) · 882 Bytes
/
main.tf
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
# Configure the Azure provider
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.0.2"
}
}
required_version = ">= 1.1.0"
}
provider "azurerm" {
features {}
# subscription_id = "dcXYZ168-a050-4...-8496-c...b50485xx"
# tenant_id = "b2XYZ98d-4f5a-4...-a4c9-3...b93fa3xx"
# client_id = "1bXYZ9d0-f341-4...-bec8-8...cbb5e6xx"
# client_secret = "upXYZ...C7Hg...Wi8YNrbhoX0BcE.ceDM...xx"
}
resource "azurerm_resource_group" "rg" {
name = "testabc-pipeline"
location = "westus2"
}
resource "azurerm_network_security_group" "example" {
name = "ex-security-group"
resource_group_name = azurerm_resource_group.rg.name # Pointers create a DEPENDENCY on the RG existing
location = azurerm_resource_group.rg.location # which PREVENTS racing conditions!
}