-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EC-217] Move EUCovidCert storage accounts to their own module (#920)
- Loading branch information
Showing
9 changed files
with
107 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
terraform { | ||
|
||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
output "storage_account_eucovidcert" { | ||
value = { | ||
id = module.storage_account_eucovidcert.id | ||
name = module.storage_account_eucovidcert.name | ||
resource_group_name = var.resource_group_name | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/domains/eucovidcert/_modules/storage_accounts/storage_account_eucovidcert.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module "storage_account_eucovidcert" { | ||
source = "github.com/pagopa/terraform-azurerm-v3//storage_account?ref=v7.69.1" | ||
|
||
name = "${replace(var.project, "-", "")}steucovidcert" | ||
account_kind = "StorageV2" | ||
account_tier = "Standard" | ||
access_tier = "Hot" | ||
blob_versioning_enabled = false | ||
account_replication_type = "GZRS" | ||
resource_group_name = var.resource_group_name | ||
location = var.location | ||
advanced_threat_protection = false | ||
allow_nested_items_to_be_public = false | ||
public_network_access_enabled = true | ||
|
||
tags = var.tags | ||
} |
19 changes: 19 additions & 0 deletions
19
src/domains/eucovidcert/_modules/storage_accounts/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
variable "project" { | ||
type = string | ||
description = "IO prefix and short environment" | ||
} | ||
|
||
variable "location" { | ||
type = string | ||
description = "Azure region" | ||
} | ||
|
||
variable "tags" { | ||
type = map(any) | ||
description = "Resource tags" | ||
} | ||
|
||
variable "resource_group_name" { | ||
type = string | ||
description = "Name of the resource group where resources will be created" | ||
} |
53 changes: 39 additions & 14 deletions
53
src/domains/eucovidcert/prod/westeurope/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module "storage_accounts" { | ||
source = "../../_modules/storage_accounts" | ||
|
||
location = local.location | ||
project = local.project | ||
resource_group_name = module.resource_groups.resource_group_eucovidcert.name | ||
|
||
tags = local.tags | ||
} |