Terraform
Terraform
Terraform est un outil open source d'infrastructure en tant que code (IaC) créé par HashiCorp
Download terraform
- init
- plan
- apply
Required Provider
terraform {
required_providers {
azuread = {
source = "hashicorp/azuread"
version = "~> 2.44.0"
}
azurerm = {
source = "hashicorp/azurerm"
# Root module should specify the maximum provider version
# The ~> operator is a convenient shorthand for allowing only patch releases within a specific minor release.
version = "~> 3.77"
}
}
}
Function
Storage Account
resource "azurerm_storage_account" "app_module_fx_sa" {
name = "${var.environment}${var.module_collection_name}fxsa"
resource_group_name = azurerm_resource_group.product_rg.name
location = azurerm_resource_group.product_rg.location
access_tier = "Hot"
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "LRS"
allow_nested_items_to_be_public = false
cross_tenant_replication_enabled = false
queue_encryption_key_type = "Account"
table_encryption_key_type = "Account"
}
LifeCycle Meta Data
lifecycle {
ignore_changes = [ state ]
}
Documentation
- https://registry.terraform.io/
- https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app#runtime_version
- https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle
Commentaires
Enregistrer un commentaire