Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei committed Jan 24, 2024
2 parents a69292b + 978abcf commit 11bc7c1
Show file tree
Hide file tree
Showing 2,661 changed files with 24,648 additions and 7,937 deletions.
3 changes: 3 additions & 0 deletions .github/labeler-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ service/purview:
service/recovery-services:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(backup_|recovery_services_vault|site_recovery_)((.|\n)*)###'

service/redhatopenshift:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_redhat_openshift_cluster((.|\n)*)###'

service/redis:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_redis_((.|\n)*)###'

Expand Down
5 changes: 5 additions & 0 deletions .github/labeler-pull-request-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,11 @@ service/recovery-services:
- any-glob-to-any-file:
- internal/services/recoveryservices/**/*

service/redhatopenshift:
- changed-files:
- any-glob-to-any-file:
- internal/services/redhatopenshift/**/*

service/redis:
- changed-files:
- any-glob-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/add-waiting-response-on-fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: Get Artifact
id: get_artifact
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0
with:
github_token: ${{secrets.GITHUB_TOKEN}}
run_id: ${{ github.event.workflow_run.id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
go-version-file: ./.go-version
- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: 'v1.51.1'
version: 'v1.55.1'
args: -v ./internal/...
save-artifacts-on-fail:
if: ${{ needs.golint.result }} == 'failure'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-reviewed-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Get Artifact
id: get_artifact
continue-on-error: true
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: pull-request-reviewed.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-reviewed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo ${{ github.repository }} > wr_actions/ghrepo.txt
echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt
echo "remove-waiting-response" > wr_actions/action.txt
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: artifact
path: wr_actions
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fetch-depth: 0
- name: Generate Release Notes
run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > release-notes.txt
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: release-notes
path: release-notes.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/save-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
echo ${{ github.repository_owner }} > wr_actions/ghowner.txt
echo ${{ github.event.repository.name }} > wr_actions/ghrepo.txt
echo ${{ github.event.pull_request.number }} > wr_actions/prnumber.txt
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: artifact
path: wr_actions
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

run:
timeout: 60m
go: 1.19
go: 1.21
modules-download-mode: vendor
skip-dirs:
- /sdk/ # Excluding sdk folders as these are externally generated
Expand All @@ -26,7 +26,7 @@ linters:
- gosimple
- govet
- ineffassign
- nakedret
#- nakedret
- misspell
#- nolintlint
#- nlreturn
Expand Down
2 changes: 1 addition & 1 deletion .release/provider-schema.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .teamcity/components/generated/services.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var services = mapOf(
"blueprints" to "Blueprints",
"bot" to "Bot",
"cdn" to "CDN",
"chaosstudio" to "ChaosStudio",
"cognitive" to "Cognitive Services",
"communication" to "Communication",
"compute" to "Compute",
Expand Down Expand Up @@ -102,6 +103,7 @@ var services = mapOf(
"privatednsresolver" to "Private DNS Resolver",
"purview" to "Purview",
"recoveryservices" to "Recovery Services",
"redhatopenshift" to "Red Hat OpenShift",
"redis" to "Redis",
"redisenterprise" to "Redis Enterprise",
"relay" to "Relay",
Expand Down
76 changes: 56 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,68 @@
## 3.88.0 (Unreleased)
## 3.89.0 (Unreleased)

FEATURES:

* New Data Source: `azurerm_nginx_deployment` [GH-24492]
* New Resource: `azurerm_spring_cloud_dynatrace_application_performance_monitoring` [GH-23889]
* New Resource: `azurerm_virtual_machine_run_command` [GH-23377]
* New Data Source: `azurerm_data_factory_trigger_schedule` [GH-24572]
* New Data Source: `azurerm_data_factory_trigger_schedules` [GH-24572]
* New Data Source: `azurerm_ip_groups` [GH-24540]
* New Data Source: `azurerm_nginx_certificate` [GH-24577]
* New Resource: `azurerm_chaos_studio_target` [GH-24580]
* New Resource: `azurerm_elastic_san_volume_group` [GH-24166]
* New Resource: `azurerm_netapp_account_encryption` [GH-23733]
* New Resource: `azurerm_redhat_openshift_cluster` [GH-24375]

ENHANCEMENTS:

* dependencies: updating to `v0.20240117.1163544` of `github.com/hashicorp/go-azure-sdk` [GH-24481]
* dependencies: updating to `v0.65.1` of `github.com/hashicorp/go-azure-helpers` [GH-24479]
* `datashare`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` [GH-24481]
* `kusto`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` [GH-24477]
* Data Source: `azurerm_application_gateway` - support for the `trusted_client_certificate.data` property [GH-24474]
* `azurerm_service_plan`: refactoring to use `hashicorp/go-azure-sdk` [GH-24483]
* `azurerm_container_group` - support for the `priority` property [GH-24374]
* `azurerm_mssql_managed_database` - support for the `point_in_time_restore` property [GH-24535]
* `azurerm_mssql_managed_instance` - now exports the `dns_zone` attribute [GH-24435]
* `azurerm_linux_web_app_slot` - support for setting `python_version` to `3.12` [GH-24363]
* `azurerm_linux_web_app` - support for setting `python_version` to `3.12` [GH-24363]
* `azurerm_linux_function_app_slot` - support for setting `python_version` to `3.12` [GH-24363]
* `azurerm_linux_function_app` - support for setting `python_version` to `3.12` [GH-24363]
* dependencies: updating to `v0.66.1` of `github.com/hashicorp/go-azure-helpers` [GH-24561]
* dependencies: updating to `v0.20240122.1074123` of `github.com/hashicorp/go-azure-sdk` [GH-24581]
* `containerservice`: the SDK Clients now support logging [GH-24564]
* `cosmosdb`: updating to API Version `2023-04-15` [GH-24541]
* `loadtestservice`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` (and support logging) [GH-24578]
* `managedidentity`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` (and support logging) [GH-24578]
* `azurerm_api_management_api` - change `id` format so specific `revision`s can be managed by Terraform [GH-23031]
* `azurerm_data_protection_backup_vault`: `redundancy` can now be set to `ZoneRedundant` [GH-24556]

BUG FIXES:

* `azurerm_application_gateway` - the `components` property within the `url` block is no longer computed [GH-24480]
* `azurerm_cdn_frontdoor_route` - prevent an issue where `cdn_frontdoor_origin_path` gets removed on update if unchanged. [GH-24488]
* `azurerm_cognitive_account` - fixing support for the `DC0` SKU [GH-24526]
* `azurerm_app_configuration_key` - the value for the property `value` can now be removed/emptied [GH-24582]
* `azurerm_app_service_plan` - fix casing in `serverFarms` due to ID update [GH-24562]
* `azurerm_cognitive_deployment` - `model.version` is no longer a required property [GH-24264]
* `azurerm_container_app` - fix issue where multiple `custom_scale_rule` were not being updated [GH-24509]
* `azurerm_container_registry_task_schedule_run_now` - fix issue where the incorrect scheduled run in tracked if there have been multiple [GH-24592]
* `azurerm_logic_app_standard` - fix read function to parse app service ID insensitively [GH-24562]
* `azurerm_logic_app_workflow` - fix issue where `workflow_parameters` were unable to handle information specified by `$connections` [GH-24141]
* `azurerm_mssql_managed_instance_security_alert_policy` - fix error when updating with empty storage attributes [GH-24553]
* `azurerm_network_interface` - all `ip_configuration` are no longer added to a Load Balancer Backend if one of those `ip_configurations` is associated with a backend [GH-24470]

## 3.88.0 (January 18, 2024)

FEATURES:

* New Data Source: `azurerm_nginx_deployment` ([#24492](https://github.com/hashicorp/terraform-provider-azurerm/issues/24492))
* New Resource: `azurerm_spring_cloud_dynatrace_application_performance_monitoring` ([#23889](https://github.com/hashicorp/terraform-provider-azurerm/issues/23889))
* New Resource: `azurerm_virtual_machine_run_command` ([#23377](https://github.com/hashicorp/terraform-provider-azurerm/issues/23377))

ENHANCEMENTS:

* dependencies: updating to `v0.20240117.1163544` of `github.com/hashicorp/go-azure-sdk` ([#24481](https://github.com/hashicorp/terraform-provider-azurerm/issues/24481))
* dependencies: updating to `v0.65.1` of `github.com/hashicorp/go-azure-helpers` ([#24479](https://github.com/hashicorp/terraform-provider-azurerm/issues/24479))
* `datashare`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24481](https://github.com/hashicorp/terraform-provider-azurerm/issues/24481))
* `kusto`: updating to use the base layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24477](https://github.com/hashicorp/terraform-provider-azurerm/issues/24477))
* Data Source: `azurerm_application_gateway` - support for the `trusted_client_certificate.data` property ([#24474](https://github.com/hashicorp/terraform-provider-azurerm/issues/24474))
* `azurerm_service_plan`: refactoring to use `hashicorp/go-azure-sdk` ([#24483](https://github.com/hashicorp/terraform-provider-azurerm/issues/24483))
* `azurerm_container_group` - support for the `priority` property ([#24374](https://github.com/hashicorp/terraform-provider-azurerm/issues/24374))
* `azurerm_mssql_managed_database` - support for the `point_in_time_restore` property ([#24535](https://github.com/hashicorp/terraform-provider-azurerm/issues/24535))
* `azurerm_mssql_managed_instance` - now exports the `dns_zone` attribute ([#24435](https://github.com/hashicorp/terraform-provider-azurerm/issues/24435))
* `azurerm_linux_web_app_slot` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363))
* `azurerm_linux_web_app` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363))
* `azurerm_linux_function_app_slot` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363))
* `azurerm_linux_function_app` - support for setting `python_version` to `3.12` ([#24363](https://github.com/hashicorp/terraform-provider-azurerm/issues/24363))

BUG FIXES:

* `azurerm_application_gateway` - the `components` property within the `url` block is no longer computed ([#24480](https://github.com/hashicorp/terraform-provider-azurerm/issues/24480))
* `azurerm_cdn_frontdoor_route` - prevent an issue where `cdn_frontdoor_origin_path` gets removed on update if unchanged. ([#24488](https://github.com/hashicorp/terraform-provider-azurerm/issues/24488))
* `azurerm_cognitive_account` - fixing support for the `DC0` SKU ([#24526](https://github.com/hashicorp/terraform-provider-azurerm/issues/24526))

## 3.87.0 (January 11, 2024)

Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tools:
go install github.com/katbyte/terrafmt@latest
go install golang.org/x/tools/cmd/goimports@latest
go install mvdan.cc/gofumpt@latest
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH || $$GOPATH)/bin v1.51.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH || $$GOPATH)/bin v1.55.1

build: fmtcheck generate
go install
Expand Down
5 changes: 5 additions & 0 deletions examples/netapp/nfsv3_volume_cmk_userassigned/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Example: NetApp Files Customer-Managed Keys Volume Encryption

This example shows how to create an Azure NetApp volume with Customer-Managed Key Encryption enabled.

For more information, please refer to [Configure customer-managed keys for Azure NetApp Files volume encryption](https://learn.microsoft.com/en-us/azure/azure-netapp-files/configure-customer-managed-keys).
182 changes: 182 additions & 0 deletions examples/netapp/nfsv3_volume_cmk_userassigned/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

provider "azurerm" {
features {}
}

data "azurerm_client_config" "current" {
}

resource "azurerm_resource_group" "example" {
name = "${var.prefix}-resources"
location = var.location
}

resource "azurerm_virtual_network" "example" {
name = "${var.prefix}-vnet"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
address_space = ["10.6.0.0/16"]
}

resource "azurerm_subnet" "example-delegated" {
name = "${var.prefix}-delegated-subnet"
resource_group_name = azurerm_resource_group.example.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefixes = ["10.6.1.0/24"]

delegation {
name = "exampledelegation"

service_delegation {
name = "Microsoft.Netapp/volumes"
actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
}
}
}

resource "azurerm_subnet" "example-non-delegated" {
name = "${var.prefix}-non-delegated-subnet"
resource_group_name = azurerm_resource_group.example.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefixes = ["10.6.0.0/24"]
}

resource "azurerm_key_vault" "example" {
name = "${var.prefix}anfakv"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
enabled_for_disk_encryption = true
enabled_for_deployment = true
enabled_for_template_deployment = true
purge_protection_enabled = true
tenant_id = var.tenant_id

sku_name = "standard"

access_policy {
tenant_id = var.tenant_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"Get",
"Create",
"Delete",
"WrapKey",
"UnwrapKey",
"GetRotationPolicy",
"SetRotationPolicy",
]
}

access_policy {
tenant_id = var.tenant_id
object_id = azurerm_user_assigned_identity.example.principal_id

key_permissions = [
"Get",
"Encrypt",
"Decrypt"
]
}
}

resource "azurerm_key_vault_key" "example" {
name = "${var.prefix}anfenckey"
key_vault_id = azurerm_key_vault.example.id
key_type = "RSA"
key_size = 2048

key_opts = [
"decrypt",
"encrypt",
"sign",
"unwrapKey",
"verify",
"wrapKey",
]
}

resource "azurerm_private_endpoint" "example" {
name = "${var.prefix}-pe-akv"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
subnet_id = azurerm_subnet.example-non-delegated.id

private_service_connection {
name = "${var.prefix}-pe-sc-akv"
private_connection_resource_id = azurerm_key_vault.example.id
is_manual_connection = false
subresource_names = ["Vault"]
}
}

resource "azurerm_user_assigned_identity" "example" {
name = "${var.prefix}-user-assigned-identity"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
}

resource "azurerm_netapp_account" "example" {
name = "${var.prefix}-netappaccount"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name

identity {
type = "UserAssigned"
identity_ids = [
azurerm_user_assigned_identity.example.id
]
}
}

resource "azurerm_netapp_account_encryption" "example" {
netapp_account_id = azurerm_netapp_account.example.id

user_assigned_identity_id = azurerm_user_assigned_identity.example.id

encryption_key = azurerm_key_vault_key.example.versionless_id
}

resource "azurerm_netapp_pool" "example" {
name = "${var.prefix}-pool"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
account_name = azurerm_netapp_account.example.name
service_level = "Standard"
size_in_tb = 4

depends_on = [
azurerm_netapp_account_encryption.example
]
}

resource "azurerm_netapp_volume" "example" {
name = "${var.prefix}-vol"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
account_name = azurerm_netapp_account.example.name
pool_name = azurerm_netapp_pool.example.name
volume_path = "${var.prefix}-my-unique-file-path-vol"
service_level = "Standard"
subnet_id = azurerm_subnet.example-delegated.id
storage_quota_in_gb = 100
network_features = "Standard"
encryption_key_source = "Microsoft.KeyVault"
key_vault_private_endpoint_id = azurerm_private_endpoint.example.id

export_policy_rule {
rule_index = 1
allowed_clients = ["0.0.0.0/0"]
protocols_enabled = ["NFSv3"]
unix_read_only = false
unix_read_write = true
root_access_enabled = true
}

depends_on = [
azurerm_netapp_account_encryption.example,
azurerm_private_endpoint.example
]
}
Loading

0 comments on commit 11bc7c1

Please sign in to comment.