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
trigger: | |
- main | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- task: AzureCLI@2 | |
name: RunTerraform | |
inputs: | |
azureSubscription: INSERT NAME OF YOUR SERVICE CONNECTION # The name of your service connection goes here | |
scriptType: bash |
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
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = ">=4.14.0" | |
} | |
} | |
} | |
provider "azurerm" { | |
features {} |
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
module "avm-res-azurestackhci-cluster" { | |
source = "Azure/avm-res-azurestackhci-cluster/azurerm" | |
version = "0.12.0" |
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
module "storage_account" { | |
source = "./modules/storage-account" | |
storage_account_name = "mystorageaccount" | |
resource_group_name = "my-resource-group" | |
location = "East US" | |
account_tier = "Standard" | |
account_replication_type = "LRS" | |
tags = { | |
environment = "dev" | |
project = "example-project" |
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
output "storage_account_name" { | |
value = azurerm_storage_account.example.name | |
} | |
output "primary_blob_endpoint" { | |
value = azurerm_storage_account.example.primary_blob_endpoint | |
} |
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
variable "storage_account_name" { | |
description = "The name of the storage account." | |
type = string | |
} | |
variable "resource_group_name" { | |
description = "The name of the resource group." | |
type = string | |
} | |
variable "location" { | |
description = "The Azure region where the storage account will be created." |
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
resource "azurerm_storage_account" "example" { | |
name = var.storage_account_name | |
resource_group_name = var.resource_group_name | |
location = var.location | |
account_tier = var.account_tier | |
account_replication_type = var.account_replication_type | |
tags = var.tags | |
} |
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
name: Terraform deploy Log Analytics with TFLint checks | |
on: | |
workflow_dispatch: | |
jobs: | |
terraform: | |
runs-on: ubuntu-latest | |
env: |
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
plugin "azurerm" { | |
enabled = true | |
version = "0.27.0" | |
source = "github.com/terraform-linters/tflint-ruleset-azurerm" | |
} | |
# General Terraform rules | |
rule "terraform_deprecated_interpolation" { | |
enabled = true |
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
terraform { | |
required_providers { | |
azapi = { | |
source = "Azure/azapi" | |
version = "2.1.0" | |
} | |
} | |
} | |
provider "azapi" { |
NewerOlder