Skip to content

Commit

Permalink
Merge branch 'hashicorp:main' into feature/cogservices-rai-blocklists
Browse files Browse the repository at this point in the history
  • Loading branch information
feliperezende-barbosa authored Dec 9, 2024
2 parents 7a003bb + 6bab2fb commit c9dbe2f
Show file tree
Hide file tree
Showing 180 changed files with 1,940 additions and 402 deletions.
2 changes: 1 addition & 1 deletion .release/provider-schema.json

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
## 4.13.0 (Unreleased)
## 4.13.0 (December 05, 2024)

ENHANCEMENTS:

* `azurerm_cognitive_deployment` - add support for the `dynamic_throttling_enabled` property [GH-28100]
* `azurerm_cognitive_deployment` - support for the `dynamic_throttling_enabled` property ([#28100](https://github.com/hashicorp/terraform-provider-azurerm/issues/28100))
* `azurerm_key_vault_managed_hardware_security_module_key` - the `key_type` property now supports `oct-HSM` ([#28171](https://github.com/hashicorp/terraform-provider-azurerm/issues/28171))
* `azurerm_machine_learning_datastore_datalake_gen2` - can now be used with storage account in a different subscription ([#28123](https://github.com/hashicorp/terraform-provider-azurerm/issues/28123))
* `azurerm_network_watcher_flow_log` - `target_resource_id` supports subnets and network interfaces ([#28177](https://github.com/hashicorp/terraform-provider-azurerm/issues/28177))

BUG:

* `azurerm_cdn_frontdoor_origin_group` - update validation of `interval_in_seconds` to match API behaviour [GH-28143]
* Data Source: `azurerm_logic_app_standard` - update the `identity` property to support User Assigned Identities ([#28158](https://github.com/hashicorp/terraform-provider-azurerm/issues/28158))
* `azurerm_cdn_frontdoor_origin_group` - update validation of the `interval_in_seconds` property to match API behaviour ([#28143](https://github.com/hashicorp/terraform-provider-azurerm/issues/28143))
* `azurerm_container_group` - retrieve log analytics workspace key from config when updating resource ([#28025](https://github.com/hashicorp/terraform-provider-azurerm/issues/28025))
* `azurerm_mssql_elasticpool` - fix sku tier and family validation that prevented the creation of Hyperscale PRMS pools ([#28178](https://github.com/hashicorp/terraform-provider-azurerm/issues/28178))
* `azurerm_search_service` - the `partition_count` property can now be up to `3` when using basic sku ([#28105](https://github.com/hashicorp/terraform-provider-azurerm/issues/28105))

## 4.12.0 (November 28, 2024)

Expand Down
3 changes: 3 additions & 0 deletions examples/databricks/enhanced-security-compliance/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

provider "azurerm" {
features {}
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ require (
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-azure-helpers v0.71.0
github.com/hashicorp/go-azure-sdk/resource-manager v0.20241128.1112539
github.com/hashicorp/go-azure-sdk/sdk v0.20241128.1112539
github.com/hashicorp/go-azure-sdk/resource-manager v0.20241206.1180327
github.com/hashicorp/go-azure-sdk/sdk v0.20241206.1180327
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-uuid v1.0.3
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-azure-helpers v0.71.0 h1:ra3aIRzg01g6MLKQ+yABcb6WJtrqRUDDgyuPLmyZ9lY=
github.com/hashicorp/go-azure-helpers v0.71.0/go.mod h1:BmbF4JDYXK5sEmFeU5hcn8Br21uElcqLfdQxjatwQKw=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20241128.1112539 h1:rHh2P5qcPObzpfAFafIjle3CowejFAHTfBJAHDkuSGk=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20241128.1112539/go.mod h1:oQAUu+aCHPCM0CDfsQTBnEkfUZ+sLhEW8Ssip9AeCLc=
github.com/hashicorp/go-azure-sdk/sdk v0.20241128.1112539 h1:6Ps2V/DBwBxWEjSx01fM+PqG+uIavHWvxmM2vb1N2Ok=
github.com/hashicorp/go-azure-sdk/sdk v0.20241128.1112539/go.mod h1:oI5R0fTbBx3K/sJBK5R/OlEy8ozdQjvctxVU9v3EDkc=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20241206.1180327 h1:6b8IGRB1RpeFUtUym6bf+GJgyWuQpZq+fa/dBpHgPIE=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20241206.1180327/go.mod h1:Y2T5KK4QAV+/tGfcwp5BzPRQs5/cbIXT/igtHqYZ09U=
github.com/hashicorp/go-azure-sdk/sdk v0.20241206.1180327 h1:c7Y0wwTOdna2dndVW1nalZ/DZX1wDQCSj2JNgiLycKw=
github.com/hashicorp/go-azure-sdk/sdk v0.20241206.1180327/go.mod h1:oI5R0fTbBx3K/sJBK5R/OlEy8ozdQjvctxVU9v3EDkc=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
Expand Down
4 changes: 2 additions & 2 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
dns_v2018_05_01 "github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01"
fluidrelay_2022_05_26 "github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26"
hdinsight_v2021_06_01 "github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01"
nginx_2024_06_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview"
nginx_2024_09_01_preview "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-09-01-preview"
redis_2024_03_01 "github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01"
servicenetworking_2023_11_01 "github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01"
storagecache_2023_05_01 "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01"
Expand Down Expand Up @@ -241,7 +241,7 @@ type Client struct {
Network *network.Client
NetworkFunction *networkfunction.Client
NewRelic *newrelic.Client
Nginx *nginx_2024_06_01_preview.Client
Nginx *nginx_2024_09_01_preview.Client
NotificationHubs *notificationhub.Client
Oracle *oracle.Client
Orbital *orbital.Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ resource "azurerm_api_management_api" "test" {
import {
content_format = "swagger-link-json"
content_value = "http://conferenceapi.azurewebsites.net/?format=json"
content_value = "https://raw.githubusercontent.com/hashicorp/terraform-provider-azurerm/refs/heads/main/internal/services/apimanagement/testdata/api_management_api_swagger.json"
}
}
`, data.RandomInteger, data.Locations.Primary)
Expand Down
1 change: 1 addition & 0 deletions internal/services/appservice/helpers/app_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ func linuxApplicationStackSchema() *pluginsdk.Schema {
"8",
"11",
"17",
"21",
}, false),
ExactlyOneOf: linuxApplicationStackConstraint,
RequiredWith: []string{
Expand Down
10 changes: 6 additions & 4 deletions internal/services/appservice/helpers/function_app_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ type ApplicationStackLinuxFunctionApp struct {
NodeVersion string `tfschema:"node_version"` // Supported values `12LTS`, `14LTS`, `16LTS`, `18LTS, `20LTS``
PythonVersion string `tfschema:"python_version"` // Supported values `3.12`, `3.11`, `3.10`, `3.9`, `3.8`, `3.7`
PowerShellCoreVersion string `tfschema:"powershell_core_version"` // Supported values are `7.0`, `7.2`
JavaVersion string `tfschema:"java_version"` // Supported values `8`, `11`, `17`
JavaVersion string `tfschema:"java_version"` // Supported values `8`, `11`, `17`, `21`
CustomHandler bool `tfschema:"use_custom_runtime"` // Supported values `true`
Docker []ApplicationStackDocker `tfschema:"docker"` // Needs ElasticPremium or Basic (B1) Standard (S 1-3) or Premium(PxV2 or PxV3) LINUX Service Plan
}
Expand All @@ -1043,7 +1043,7 @@ type ApplicationStackWindowsFunctionApp struct {
DotNetVersion string `tfschema:"dotnet_version"` // Supported values `v3.0`, `v4.0`, `v6.0`, `v7.0`, `v8.0` and `v9.0`
DotNetIsolated bool `tfschema:"use_dotnet_isolated_runtime"` // Supported values `true` for `dotnet-isolated`, `false` otherwise
NodeVersion string `tfschema:"node_version"` // Supported values `12LTS`, `14LTS`, `16LTS`, `18LTS, `20LTS`
JavaVersion string `tfschema:"java_version"` // Supported values `8`, `11`, `17`
JavaVersion string `tfschema:"java_version"` // Supported values `8`, `11`, `17`, `21`
PowerShellCoreVersion string `tfschema:"powershell_core_version"` // Supported values are `7.0`, `7.2`
CustomHandler bool `tfschema:"use_custom_runtime"` // Supported values `true`
}
Expand Down Expand Up @@ -1172,6 +1172,7 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema {
"8",
"11",
"17",
"21",
}, false),
ExactlyOneOf: []string{
"site_config.0.application_stack.0.dotnet_version",
Expand All @@ -1182,7 +1183,7 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema {
"site_config.0.application_stack.0.docker",
"site_config.0.application_stack.0.use_custom_runtime",
},
Description: "The version of Java to use. Possible values are `8`, `11`, and `17`",
Description: "The version of Java to use. Possible values are `8`, `11`, `17`, and `21`",
},

"docker": {
Expand Down Expand Up @@ -1405,6 +1406,7 @@ func windowsFunctionAppStackSchema() *pluginsdk.Schema {
"1.8",
"11",
"17",
"21",
}, false),
ExactlyOneOf: []string{
"site_config.0.application_stack.0.dotnet_version",
Expand All @@ -1413,7 +1415,7 @@ func windowsFunctionAppStackSchema() *pluginsdk.Schema {
"site_config.0.application_stack.0.powershell_core_version",
"site_config.0.application_stack.0.use_custom_runtime",
},
Description: "The version of Java to use. Possible values are `1.8`, `11` and `17`",
Description: "The version of Java to use. Possible values are `1.8`, `11`, `17`, and `21`",
},

"powershell_core_version": {
Expand Down
85 changes: 34 additions & 51 deletions internal/services/appservice/helpers/function_app_slot_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
apimValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/apimanagement/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
"github.com/jackofallops/kermit/sdk/web/2022-09-01/web"
)

type SiteConfigWindowsFunctionAppSlot struct {
Expand Down Expand Up @@ -192,10 +191,10 @@ func SiteConfigSchemaWindowsFunctionAppSlot() *pluginsdk.Schema {
"managed_pipeline_mode": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.ManagedPipelineModeIntegrated),
Default: string(webapps.ManagedPipelineModeIntegrated),
ValidateFunc: validation.StringInSlice([]string{
string(web.ManagedPipelineModeClassic),
string(web.ManagedPipelineModeIntegrated),
string(webapps.ManagedPipelineModeClassic),
string(webapps.ManagedPipelineModeIntegrated),
}, false),
Description: "The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`.",
},
Expand Down Expand Up @@ -255,11 +254,11 @@ func SiteConfigSchemaWindowsFunctionAppSlot() *pluginsdk.Schema {
"ftps_state": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.FtpsStateDisabled),
Default: string(webapps.FtpsStateDisabled),
ValidateFunc: validation.StringInSlice([]string{
string(web.FtpsStateAllAllowed),
string(web.FtpsStateDisabled),
string(web.FtpsStateFtpsOnly),
string(webapps.FtpsStateAllAllowed),
string(webapps.FtpsStateDisabled),
string(webapps.FtpsStateFtpsOnly),
}, false),
Description: "State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`.",
},
Expand Down Expand Up @@ -287,27 +286,19 @@ func SiteConfigSchemaWindowsFunctionAppSlot() *pluginsdk.Schema {
},

"minimum_tls_version": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.SupportedTLSVersionsOneFullStopTwo),
ValidateFunc: validation.StringInSlice([]string{
string(web.SupportedTLSVersionsOneFullStopZero),
string(web.SupportedTLSVersionsOneFullStopOne),
string(web.SupportedTLSVersionsOneFullStopTwo),
}, false),
Description: "The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`.",
Type: pluginsdk.TypeString,
Optional: true,
Default: string(webapps.SupportedTlsVersionsOnePointTwo),
ValidateFunc: validation.StringInSlice(webapps.PossibleValuesForSupportedTlsVersions(), false),
Description: "The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, `1.2` and `1.3`. Defaults to `1.2`.",
},

"scm_minimum_tls_version": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.SupportedTLSVersionsOneFullStopTwo),
ValidateFunc: validation.StringInSlice([]string{
string(web.SupportedTLSVersionsOneFullStopZero),
string(web.SupportedTLSVersionsOneFullStopOne),
string(web.SupportedTLSVersionsOneFullStopTwo),
}, false),
Description: "Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`.",
Type: pluginsdk.TypeString,
Optional: true,
Default: string(webapps.SupportedTlsVersionsOnePointTwo),
ValidateFunc: validation.StringInSlice(webapps.PossibleValuesForSupportedTlsVersions(), false),
Description: "Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, `1.2` and `1.3`. Defaults to `1.2`.",
},

"cors": CorsSettingsSchema(),
Expand Down Expand Up @@ -526,10 +517,10 @@ func SiteConfigSchemaLinuxFunctionAppSlot() *pluginsdk.Schema {
"managed_pipeline_mode": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.ManagedPipelineModeIntegrated),
Default: string(webapps.ManagedPipelineModeIntegrated),
ValidateFunc: validation.StringInSlice([]string{
string(web.ManagedPipelineModeClassic),
string(web.ManagedPipelineModeIntegrated),
string(webapps.ManagedPipelineModeClassic),
string(webapps.ManagedPipelineModeIntegrated),
}, false),
Description: "The Managed Pipeline mode. Possible values include: `Integrated`, `Classic`. Defaults to `Integrated`.",
},
Expand Down Expand Up @@ -589,11 +580,11 @@ func SiteConfigSchemaLinuxFunctionAppSlot() *pluginsdk.Schema {
"ftps_state": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.FtpsStateDisabled),
Default: string(webapps.FtpsStateDisabled),
ValidateFunc: validation.StringInSlice([]string{
string(web.FtpsStateAllAllowed),
string(web.FtpsStateDisabled),
string(web.FtpsStateFtpsOnly),
string(webapps.FtpsStateAllAllowed),
string(webapps.FtpsStateDisabled),
string(webapps.FtpsStateFtpsOnly),
}, false),
Description: "State of FTP / FTPS service for this function app. Possible values include: `AllAllowed`, `FtpsOnly` and `Disabled`. Defaults to `Disabled`.",
},
Expand Down Expand Up @@ -621,27 +612,19 @@ func SiteConfigSchemaLinuxFunctionAppSlot() *pluginsdk.Schema {
},

"minimum_tls_version": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.SupportedTLSVersionsOneFullStopTwo),
ValidateFunc: validation.StringInSlice([]string{
string(web.SupportedTLSVersionsOneFullStopZero),
string(web.SupportedTLSVersionsOneFullStopOne),
string(web.SupportedTLSVersionsOneFullStopTwo),
}, false),
Description: "The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`.",
Type: pluginsdk.TypeString,
Optional: true,
Default: string(webapps.SupportedTlsVersionsOnePointTwo),
ValidateFunc: validation.StringInSlice(webapps.PossibleValuesForSupportedTlsVersions(), false),
Description: "The configures the minimum version of TLS required for SSL requests. Possible values include: `1.0`, `1.1`, `1.2` and `1.3`. Defaults to `1.2`.",
},

"scm_minimum_tls_version": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(web.SupportedTLSVersionsOneFullStopTwo),
ValidateFunc: validation.StringInSlice([]string{
string(web.SupportedTLSVersionsOneFullStopZero),
string(web.SupportedTLSVersionsOneFullStopOne),
string(web.SupportedTLSVersionsOneFullStopTwo),
}, false),
Description: "Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, and `1.2`. Defaults to `1.2`.",
Type: pluginsdk.TypeString,
Optional: true,
Default: string(webapps.SupportedTlsVersionsOnePointTwo),
ValidateFunc: validation.StringInSlice(webapps.PossibleValuesForSupportedTlsVersions(), false),
Description: "Configures the minimum version of TLS required for SSL requests to the SCM site Possible values include: `1.0`, `1.1`, `1.2` and `1.3`. Defaults to `1.2`.",
},

"cors": CorsSettingsSchema(),
Expand Down
19 changes: 19 additions & 0 deletions internal/services/appservice/helpers/fx_strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func decodeApplicationStackLinux(fxString string) ApplicationStackLinux {
if strings.HasPrefix(javaParts[0], "17") {
result.JavaVersion = "17"
}
if strings.HasPrefix(javaParts[0], "21") {
result.JavaVersion = "21"
}
result.JavaServerVersion = javaParts[0]

case FxStringPrefixTomcat:
Expand Down Expand Up @@ -278,6 +281,22 @@ func JavaLinuxFxStringBuilder(javaMajorVersion, javaServer, javaServerVersion st
default:
return pointer.To(fmt.Sprintf("%s|%s-java17", javaServer, javaServerVersion)), nil
}
case "21":
switch javaServer {
case LinuxJavaServerJava:
if len(strings.Split(javaServerVersion, ".")) == 3 {
return pointer.To(fmt.Sprintf("%s|%s", LinuxJavaServerJava, javaServerVersion)), nil // "JAVA|21.0.4"
} else {
return pointer.To(fmt.Sprintf("%s|%s-java21", LinuxJavaServerJava, javaServerVersion)), nil // "JAVA|21-21"
}

case LinuxJavaServerTomcat:
return pointer.To(fmt.Sprintf("%s|%s-java21", LinuxJavaServerTomcat, javaServerVersion)), nil // e,g, TOMCAT|10.0-java21 / TOMCAT|10.0.20-java21
case LinuxJavaServerJboss:
return nil, fmt.Errorf("java 21 is not supported on %s", LinuxJavaServerJboss)
default:
return pointer.To(fmt.Sprintf("%s|%s-java21", javaServer, javaServerVersion)), nil
}

default:
return pointer.To(fmt.Sprintf("%s|%s-%s", javaServer, javaServerVersion, javaMajorVersion)), nil
Expand Down
17 changes: 17 additions & 0 deletions internal/services/appservice/linux_function_app_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,23 @@ func TestAccLinuxFunctionApp_appStackJava(t *testing.T) {
})
}

func TestAccLinuxFunctionApp_appStackJava21(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_linux_function_app", "test")
r := LinuxFunctionAppResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.appStackJava(data, SkuBasicPlan, "21"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
check.That(data.ResourceName).Key("site_config.0.linux_fx_version").HasValue("JAVA|21"),
),
},
data.ImportStep("site_credential.0.password"),
})
}

func TestAccLinuxFunctionApp_appStackJavaUpdate(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_linux_function_app", "test")
r := LinuxFunctionAppResource{}
Expand Down
Loading

0 comments on commit c9dbe2f

Please sign in to comment.