Skip to content

Commit

Permalink
fix chap04
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkrief committed Aug 22, 2023
1 parent 646f15e commit 696896a
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 16 deletions.
22 changes: 22 additions & 0 deletions CHAP04/archive/.terraform.lock.hcl

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

Binary file added CHAP04/archive/archives/backup.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions CHAP04/archive/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ data "archive_file" "backup" {
source_file = "../mytextfile.txt"
output_path = "${path.module}/archives/backup.zip"
}


output "archive" {
value = data.archive_file.backup.id
}
22 changes: 22 additions & 0 deletions CHAP04/data/.terraform.lock.hcl

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

6 changes: 0 additions & 6 deletions CHAP04/data/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ provider "azurerm" {
features {}
}

locals {
common_app_settings = {
"INSTRUMENTATIONKEY" = azurerm_application_insights.appinsight-app.instrumentation_key
}
}

resource "azurerm_resource_group" "rg-app" {
name = "${var.resource_group_name}-${var.environment}"
location = var.location
Expand Down
14 changes: 5 additions & 9 deletions CHAP04/data/variables.tf
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
variable "resource_group_name" {
description = "Resource group name"
type = string
}

variable "location" {
description = "Location of Azure reource"
default = "westeurope"
type = string
}

variable "service_plan_name" {
description = "Service plan name"
}

variable "app_name" {
description = "Name of application"
default = "MyApp"
type = string
}

variable "environment" {
description = "Environment Name"
}


variable "custom_app_settings" {
description = "Custom App settings"
default = {}
type = string
}

variable "createdby" {
description = "name of the triggers user"
default = "NA"
type = string
}
42 changes: 42 additions & 0 deletions CHAP04/external/.terraform.lock.hcl

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

5 changes: 4 additions & 1 deletion CHAP04/external/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ provider "azurerm" {

variable "application_name" {
description = "The name of application"
type = string
}

variable "environment_name" {
description = "The name of environment"
type = string
}

variable "country_code" {
description = "The country code (FR-US-...)"
type = string
}

locals {
Expand All @@ -28,7 +31,7 @@ data "external" "getlocation" {
program = ["pwsh", "./GetLocation.ps1"]

query = {
environment = "${var.environment_name}"
environment = var.environment_name
}
}

Expand Down
22 changes: 22 additions & 0 deletions CHAP04/files/.terraform.lock.hcl

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

42 changes: 42 additions & 0 deletions CHAP04/files_local_exec/.terraform.lock.hcl

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

24 changes: 24 additions & 0 deletions CHAP04/shell/.terraform.lock.hcl

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

0 comments on commit 696896a

Please sign in to comment.