This repository has been archived by the owner on Apr 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
main.tf
31 lines (27 loc) · 1.22 KB
/
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
provider "azurerm" {
subscription_id = "${var.azure_subscription_id}"
client_id = "${var.azure_client_id}"
client_secret = "${var.azure_client_secret}"
tenant_id = "${var.azure_tenant_id}"
}
resource "azurerm_resource_group" "osrg" {
name = "${format("%s-%s-%s",var.openshift_azure_resource_prefix,var.openshift_azure_resource_group,var.openshift_azure_resource_suffix)}"
location = "${var.openshift_azure_region}"
}
resource "random_id" "randomId" {
byte_length = 4
}
resource "azurerm_storage_account" "osstorageregistry" {
name = "${var.openshift_azure_resource_prefix}sa${random_id.randomId.hex}"
resource_group_name = "${azurerm_resource_group.osrg.name}"
depends_on = ["azurerm_resource_group.osrg"]
location = "${azurerm_resource_group.osrg.location}"
account_type = "Standard_LRS"
}
resource "azurerm_storage_account" "osstoragepv" {
name = "${var.openshift_azure_resource_prefix}pv${random_id.randomId.hex}"
resource_group_name = "${azurerm_resource_group.osrg.name}"
depends_on = ["azurerm_resource_group.osrg"]
location = "${azurerm_resource_group.osrg.location}"
account_type = "Standard_LRS"
}