-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
51 lines (43 loc) · 1.03 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
provider "azurerm" {
features {}
}
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.93.0"
}
}
backend "azurerm" {
resource_group_name = "tf_rg_blobstore"
storage_account_name = "tfstorageimovilaapi"
container_name = "tfstate"
key = "terraform.tfstate"
}
}
variable "imagebuild" {
type = string
description = "Latest Image Build"
}
resource "azurerm_resource_group" "tf_test" {
name = "tfmainrg"
location = "canadaeast"
}
resource "azurerm_container_group" "tfcg_test" {
name = "weatherapi"
location = azurerm_resource_group.tf_test.location
resource_group_name = azurerm_resource_group.tf_test.name
ip_address_type = "Public"
dns_name_label = "imovila-webapi"
os_type = "Linux"
container {
name = "weatherapi"
image = "imovila/weatherapi:${var.imagebuild}"
cpu = "1"
memory = "1"
ports {
port = 8080
protocol = "TCP"
}
}
}