Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking(main)!: Update to azurerm_storage_account_queue_properties #587

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ module "terraform_state_storage_account" {
storage_account_queue_properties_logging_write = false
storage_account_queue_properties_logging_version = "1.0"
storage_account_queue_properties_logging_retention_policy_days = 20
storage_account_queue_properties_hour_metrics_enabled = false
storage_account_queue_properties_hour_metrics_include_apis = false
storage_account_queue_properties_hour_metrics_version = "1.0"
storage_account_queue_properties_hour_metrics_retention_policy_days = 20
storage_account_queue_properties_minute_metrics_enabled = false
storage_account_queue_properties_minute_metrics_include_apis = false
storage_account_queue_properties_minute_metrics_version = "1.0"
storage_account_queue_properties_minute_metrics_retention_policy_days = 20
Expand Down
2 changes: 0 additions & 2 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ module "terraform_state_storage_account" {
storage_account_queue_properties_logging_write = false
storage_account_queue_properties_logging_version = "1.0"
storage_account_queue_properties_logging_retention_policy_days = 20
storage_account_queue_properties_hour_metrics_enabled = false
storage_account_queue_properties_hour_metrics_include_apis = false
storage_account_queue_properties_hour_metrics_version = "1.0"
storage_account_queue_properties_hour_metrics_retention_policy_days = 20
storage_account_queue_properties_minute_metrics_enabled = false
storage_account_queue_properties_minute_metrics_include_apis = false
storage_account_queue_properties_minute_metrics_version = "1.0"
storage_account_queue_properties_minute_metrics_retention_policy_days = 20
Expand Down
48 changes: 24 additions & 24 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,6 @@ resource "azurerm_storage_account" "this" {
allow_nested_items_to_be_public = var.storage_account_allow_nested_items_to_be_public
shared_access_key_enabled = var.storage_account_shared_access_key_enabled

queue_properties {
logging {
delete = var.storage_account_queue_properties_logging_delete
read = var.storage_account_queue_properties_logging_read
write = var.storage_account_queue_properties_logging_write
version = var.storage_account_queue_properties_logging_version
retention_policy_days = var.storage_account_queue_properties_logging_retention_policy_days
}

hour_metrics {
enabled = var.storage_account_queue_properties_hour_metrics_enabled
include_apis = var.storage_account_queue_properties_hour_metrics_include_apis
version = var.storage_account_queue_properties_hour_metrics_version
retention_policy_days = var.storage_account_queue_properties_hour_metrics_retention_policy_days
}

minute_metrics {
enabled = var.storage_account_queue_properties_minute_metrics_enabled
include_apis = var.storage_account_queue_properties_minute_metrics_include_apis
version = var.storage_account_queue_properties_minute_metrics_version
retention_policy_days = var.storage_account_queue_properties_minute_metrics_retention_policy_days
}
}

blob_properties {
change_feed_enabled = var.storage_account_blob_properties_change_feed_enabled
change_feed_retention_in_days = var.storage_account_blob_properties_change_feed_retention_in_days
Expand All @@ -55,6 +31,30 @@ resource "azurerm_storage_account" "this" {
tags = var.tags
}

resource "azurerm_storage_account_queue_properties" "this" {
storage_account_id = azurerm_storage_account.this.id

logging {
delete = var.storage_account_queue_properties_logging_delete
read = var.storage_account_queue_properties_logging_read
write = var.storage_account_queue_properties_logging_write
version = var.storage_account_queue_properties_logging_version
retention_policy_days = var.storage_account_queue_properties_logging_retention_policy_days
}

hour_metrics {
include_apis = var.storage_account_queue_properties_hour_metrics_include_apis
version = var.storage_account_queue_properties_hour_metrics_version
retention_policy_days = var.storage_account_queue_properties_hour_metrics_retention_policy_days
}

minute_metrics {
include_apis = var.storage_account_queue_properties_minute_metrics_include_apis
version = var.storage_account_queue_properties_minute_metrics_version
retention_policy_days = var.storage_account_queue_properties_minute_metrics_retention_policy_days
}
}

resource "azurerm_storage_container" "this" {
name = var.storage_container_name
storage_account_name = azurerm_storage_account.this.name
Expand Down
12 changes: 0 additions & 12 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ variable "storage_account_queue_properties_logging_retention_policy_days" {
default = 10
}

variable "storage_account_queue_properties_hour_metrics_enabled" {
type = bool
description = "(optional) Indicates whether hour metrics are enabled for the queue service"
default = true
}

variable "storage_account_queue_properties_hour_metrics_include_apis" {
type = bool
description = "(optional) Indicates whether metrics should generate summary statistics for called API operations"
Expand All @@ -128,12 +122,6 @@ variable "storage_account_queue_properties_hour_metrics_retention_policy_days" {
default = 10
}

variable "storage_account_queue_properties_minute_metrics_enabled" {
type = bool
description = "(optional) Indicates whether minute metrics are enabled for the queue service"
default = true
}

variable "storage_account_queue_properties_minute_metrics_include_apis" {
type = bool
description = "(optional) Indicates whether metrics should generate summary statistics for called API operations"
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.114.0"
version = ">= 4.9.0"
}
}
}