Skip to content

Commit

Permalink
feat: remove blob pitr (#89)
Browse files Browse the repository at this point in the history
AzAPI provider currently does not support OIDC authentication.
(Azure/terraform-provider-azapi#101)
Comment out until this is supported.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
helenakallekleiv and github-actions[bot] authored Sep 19, 2022
1 parent 4405ad2 commit 18c921c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ Terraform module which creates an Azure Storage account.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_azapi"></a> [azapi](#requirement\_azapi) | >= 0.1.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.0.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_azapi"></a> [azapi](#provider\_azapi) | >= 0.1.0 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >= 3.0.0 |

## Modules
Expand All @@ -26,7 +24,6 @@ No modules.

| Name | Type |
|------|------|
| [azapi_update_resource.this](https://registry.terraform.io/providers/azure/azapi/latest/docs/resources/update_resource) | resource |
| [azurerm_advanced_threat_protection.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/advanced_threat_protection) | resource |
| [azurerm_monitor_diagnostic_setting.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_diagnostic_setting) | resource |
| [azurerm_storage_account.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account) | resource |
Expand Down
35 changes: 19 additions & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,25 @@ resource "azurerm_storage_account" "this" {
}
}

# Enable point-in-time restore (PITR) for this Blob Storage.
# This feature is not yet supported by the AzureRM provider.
resource "azapi_update_resource" "this" {
type = "Microsoft.Storage/storageAccounts/blobServices@2021-09-01"
parent_id = azurerm_storage_account.this.id
name = "default"

body = jsonencode({
properties = {
restorePolicy = {
enabled = var.blob_pitr_enabled
days = var.blob_pitr_days
}
}
})
}
# AzAPI provider currently does not support OIDC authentication. (Azure/terraform-provider-azapi#101)
# Comment out until this is supported.

# # Enable point-in-time restore (PITR) for this Blob Storage.
# # This feature is not yet supported by the AzureRM provider.
# resource "azapi_update_resource" "this" {
# type = "Microsoft.Storage/storageAccounts/blobServices@2021-09-01"
# parent_id = azurerm_storage_account.this.id
# name = "default"

# body = jsonencode({
# properties = {
# restorePolicy = {
# enabled = var.blob_pitr_enabled
# days = var.blob_pitr_days
# }
# }
# })
# }

resource "azurerm_advanced_threat_protection" "this" {
target_resource_id = azurerm_storage_account.this.id
Expand Down
8 changes: 4 additions & 4 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ terraform {
version = ">= 3.0.0"
}

azapi = {
source = "azure/azapi"
version = ">= 0.1.0"
}
# azapi = {
# source = "azure/azapi"
# version = ">= 0.1.0"
# }
}
}

0 comments on commit 18c921c

Please sign in to comment.