-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
47 lines (40 loc) · 1009 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# We strongly recommend using the required_providers block to set the
# Azure Provider source and version being used
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.0.0"
}
}
}
# Configure the Microsoft Azure Provider
provider "azurerm"{
version = "3.0.0"
features {}
}
# Create a resource group
resource "azurerm_resource_group" "tf_test"{
name = "tf_rg_blobstore"
location = "Canada Central"
container = "tfstate"
key ="terraform.state"
}
resource "azurerm_container_group" "tfcg_test" {
name = "weahterapi"
location = azurerm_resource_group.tf_test.location
resource_group_name = azurerm_resource_group.tf_test.name
ip_address_type = "Public"
dns_name_label = "mesutguzelwa"
os_type = "Linux"
container {
name = "weatherapi"
image = "mesutguzel/weatherapi"
cpu = "0.5"
memory = "1"
ports {
port = 80
protocol = "TCP"
}
}
}