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

fix: deprecated retention policy days #3

Merged
merged 4 commits into from
Sep 26, 2023
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
28 changes: 15 additions & 13 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
default: init


tools:
@echo "==> installing required tooling..."
go install github.com/terraform-docs/[email protected]

documentation:
terraform-docs markdown "$(CURDIR)" --output-file README.md

graph:
@sh -c "'$(CURDIR)/scripts/terraform-graph.sh'"

clean:
rm --force --recursive --verbose .terraform

init-upgrade:
terraform init \
-input=false \
-lock-timeout=0s \
-lock=true \
-no-color \
-upgrade \
&& terraform providers lock \
-platform=windows_amd64 \
-platform=darwin_amd64 \
-platform=linux_amd64

init:
terraform init \
-input=false \
-lock-timeout=0s \
-lock=true \
-lockfile=readonly \
-no-color \
&& terraform providers lock \
-platform=windows_amd64 \
-platform=darwin_amd64 \
-platform=linux_amd64

fmt: init
terraform fmt \
-recursive . \
&& terraform fmt \
-check \
-diff \
-list=true \
-recursive \
-write=false

fmt-only:
terraform fmt \
-recursive . \
&& terraform fmt \
-check \
-diff \
-list=true \
-recursive \
-write=false

validate: fmt
terraform validate \
-no-color

validate-only:
terraform validate \
-no-color


.PHONY: \
build \
documentation \
fmt \
fmt-only \
graph \
init \
init-upgrade \
tools \
validate \
validate-only
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ git fetch --all --tags --prune --prune-tags \

| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.43.0 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.74.0 |

## Modules

Expand Down
10 changes: 8 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ resource "azurerm_monitor_diagnostic_setting" "diagnostic_setting" {
content {
category = enabled_log.value

# TODO: The `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource.
# Learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention).
# https://github.com/hashicorp/terraform-provider-azurerm/pull/23260
# https://github.com/hashicorp/terraform-provider-azurerm/issues/23051
retention_policy {
enabled = true
days = 30
}
}
}
Expand All @@ -36,9 +39,12 @@ resource "azurerm_monitor_diagnostic_setting" "diagnostic_setting" {
category = metric.value
enabled = true

# TODO: The `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource.
# Learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention).
# https://github.com/hashicorp/terraform-provider-azurerm/pull/23260
# https://github.com/hashicorp/terraform-provider-azurerm/issues/23051
retention_policy {
enabled = true
days = 30
}
}
}
Expand Down
Loading