Skip to content

Commit 84ab3cd

Browse files
committed
terraform updates
1 parent 4a1a401 commit 84ab3cd

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

build/azure-pipelines-terraform-destroy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ stages:
4949
5050
- bash: |
5151
terraform plan -destroy \
52-
-var "prefix=$(prefix)" \
52+
-var "prefix=$(kv-prefix)" \
5353
-var "sql_admin_password=$(kv-sql-password)" \
5454
-out $PLAN_FILE
5555
displayName: Terraform Plan -Destroy

terraform/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@
3737
- ![tf_init](../img/terraform_init.PNG)
3838
- Plan examples
3939
- `terraform plan -var "prefix=${prefix}" -out "main.tfplan"`
40+
- `terraform plan -var "prefix=${prefix}" -var "sql_admin_password=$env:MANGO_TF_SQL_PASS" -out "main.tfplan"`
4041
- `terraform plan -out main.tfplan`
4142
- `terraform plan -var-file='terraform.dev.tfvars' -var sql_admin_username='razumovsky_r' -var sql_admin_password='Zd2yqLgyV4uHVC0eTPiH' -out 'main.tfplan'`
4243
- `terraform plan -var-file='terraform.dev.tfvars' -out 'dev.tfplan'`
4344
- Apply examples:
4445
- `terraform apply main.tfplan`
4546
- `terraform fmt --check`
4647
- Destroy examples:
47-
- `terraform plan -destroy -out "main.destroy.tfplan"`
48+
- `terraform plan -var "sql_admin_password=$env:MANGO_TF_SQL_PASS" -var "prefix=${prefix}" -destroy -out "main.destroy.tfplan"`
4849
- `terraform apply -destroy -auto-approve "main.destroy.tfplan"`
4950
- Workspace examples:
5051
- `terraform workspace new d01`

terraform/modules/sql/main.tf

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ resource "azurerm_mssql_database" "public" {
2222
depends_on = [azurerm_mssql_server.public]
2323
}
2424

25-
#resource "azurerm_mssql_firewall_rule" "public" {
26-
# for_each = toset(azurerm_windows_web_app.public.outbound_ip_address_list)
27-
# name = "FirewallRule_${replace(each.key, ".", "_")}"
28-
# server_id = azurerm_mssql_server.public.id
29-
# start_ip_address = each.key
30-
# end_ip_address = each.key
31-
#
32-
# depends_on = [azurerm_mssql_server.public, azurerm_mssql_database.public, azurerm_windows_web_app.public]
33-
#}
25+
resource "azurerm_mssql_firewall_rule" "public" {
26+
name = "AllowAzureResources"
27+
server_id = azurerm_mssql_server.public.id
28+
start_ip_address = "0.0.0.0"
29+
end_ip_address = "0.0.0.0"
30+
31+
depends_on = [azurerm_mssql_server.public]
32+
}
3433

3534

terraform/modules/webapp/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ variable "app_service_name" {
2424

2525
variable "app_service_plan_sku" {
2626
type = string
27-
default = "F1"
27+
default = "B1"
2828
description = "Messenger app service plan sku"
2929
}
3030

terraform/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = "=3.42.0"
5+
version = "=3.47.0"
66
}
77
}
88

0 commit comments

Comments
 (0)