Skip to content

Commit

Permalink
fix: terraform provider checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
atrakic committed May 9, 2023
1 parent bb83750 commit b5dc2a7
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ fi
export AZURE_DEV_COLLECT_TELEMETRY=no

if ! [ -x "$(command -v azd)" ]; then curl -fsSL https://aka.ms/install-azd.sh | bash; fi
azd login --check-status || azd login
azd auth login --check-status || azd auth login
37 changes: 31 additions & 6 deletions infra/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions infra/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
test:
if ! [ -x "$$(command -v azd)" ]; then curl -fsSL https://aka.ms/install-azd.sh | bash; fi
azd auth login --check-status || azd auth login
terraform init -backend=false -upgrade
terraform plan -lock=false -var-file test.tfvars

clean:
rm -rf .terraform
9 changes: 4 additions & 5 deletions infra/modules/applicationinsights/applicationinsights.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
terraform {
required_version = ">= 0.13.1"
required_providers {
azurerm = {
version = "~>3.18.0"
version = ">= 3.18.0"
source = "hashicorp/azurerm"
}
azurecaf = {
source = "aztfmod/azurecaf"
version = "~>1.2.15"
version = ">= 1.2.15"
}
}
}
# ------------------------------------------------------------------------------------------------------
# DEPLOY APPLICATION INSIGHTS
# ------------------------------------------------------------------------------------------------------

resource "azurecaf_name" "applicationinsights_name" {
name = var.resource_token
resource_type = "azurerm_application_insights"
Expand Down
9 changes: 4 additions & 5 deletions infra/modules/appserviceplan/appserviceplan.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
terraform {
required_version = ">= 0.13.1"
required_providers {
azurerm = {
version = "~>3.18.0"
version = ">= 3.18.0"
source = "hashicorp/azurerm"
}
azurecaf = {
source = "aztfmod/azurecaf"
version = "~>1.2.15"
version = ">= 1.2.15"
}
}
}
# ------------------------------------------------------------------------------------------------------
# Deploy app service plan
# ------------------------------------------------------------------------------------------------------

resource "azurecaf_name" "plan_name" {
name = var.resource_token
resource_type = "azurerm_app_service_plan"
Expand Down
11 changes: 5 additions & 6 deletions infra/modules/appservicepython/appservicepython.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
terraform {
required_version = ">= 0.13.1"
required_providers {
azurerm = {
version = "~>3.18.0"
version = ">= 3.18.0"
source = "hashicorp/azurerm"
}
azurecaf = {
source = "aztfmod/azurecaf"
version = "~>1.2.15"
version = ">= 1.2.15"
}
}
}
# ------------------------------------------------------------------------------------------------------
# Deploy app service web app
# ------------------------------------------------------------------------------------------------------

resource "azurecaf_name" "web_name" {
name = "${var.service_name}-${var.resource_token}"
resource_type = "azurerm_app_service"
Expand Down Expand Up @@ -59,4 +58,4 @@ resource "azurerm_linux_web_app" "web" {
}
}
}
}
}
9 changes: 4 additions & 5 deletions infra/modules/loganalytics/loganalytics.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
terraform {
required_version = ">= 0.13.1"
required_providers {
azurerm = {
version = "~>3.18.0"
version = ">= 3.18.0"
source = "hashicorp/azurerm"
}
azurecaf = {
source = "aztfmod/azurecaf"
version = "~>1.2.15"
version = ">= 1.2.15"
}
}
}
# ------------------------------------------------------------------------------------------------------
# Deploy log analytics workspace
# ------------------------------------------------------------------------------------------------------

resource "azurecaf_name" "workspace_name" {
name = var.resource_token
resource_type = "azurerm_log_analytics_workspace"
Expand Down
12 changes: 5 additions & 7 deletions infra/provider.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#Set the terraform required version, and Configure the Azure Provider.Use local storage

# Configure the Azure Provider
terraform {
required_version = ">= 1.1.7, < 2.0.0"
required_version = ">= 0.13.1"

required_providers {
azurerm = {
version = "~>3.18.0"
version = ">= 3.18.0"
source = "hashicorp/azurerm"
}
azurecaf = {
source = "aztfmod/azurecaf"
version = "~>1.2.15"
version = ">= 1.2.15"
}
}
}
Expand All @@ -27,4 +25,4 @@ provider "azurerm" {
}

# Make client_id, tenant_id, subscription_id and object_id variables
data "azurerm_client_config" "current" {}
data "azurerm_client_config" "current" {}

0 comments on commit b5dc2a7

Please sign in to comment.