Skip to content

Commit

Permalink
Merge branch 'main' into tengzh/add_diskencryptionsets_indentity_tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyeqf committed Sep 26, 2022
2 parents 9f163ab + 24d67da commit 9c9a86e
Show file tree
Hide file tree
Showing 142 changed files with 8,999 additions and 506 deletions.
38 changes: 29 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
## 3.24.0 (Unreleased)
## 3.24.0 (September 22, 2022)

FEATURES:

* **New Resource**: `azurerm_automation_software_update_configuration` ([#17902](https://github.com/hashicorp/terraform-provider-azurerm/issues/17902))
* **New Resource**: `azurerm_monitor_alert_processing_rule_action_group` ([#17006](https://github.com/hashicorp/terraform-provider-azurerm/issues/17006))
* **New Resource**: `azurerm_monitor_alert_processing_rule_suppression` ([#17006](https://github.com/hashicorp/terraform-provider-azurerm/issues/17006))

ENHANCEMENTS:

* dependencies: updating to version `v0.20220916.1125744` of `github.com/hashicorp/go-azure-sdk` [GH-18446]
* Data Source: `azurerm_storage_account` - export the `azure_files_identity_based_auth` property [GH-18405]
* `azurerm_api_management_api_operation` - support the `example`, `schema_id`, and `type_name` properties [GH-18409]
* `azurerm_sentinel_alert_rule_scheduled` - support for the `techniques` property [GH-18430]
* `azurerm_linux_virtual_machine` - support for the `patch_assessment_mode` property [GH-18437]
* `azurerm_virtual_machine_extension` - support for the `failure_suppression_enabled` property [GH-18441]
* `azurerm_virtual_machine_scale_set_extension` - support for the `failure_suppression_enabled` property [GH-18441]
* `azurerm_windows_virtual_machine` - support for the `patch_assessment_mode` property [GH-18437]
* dependencies: updating to version `v0.20220916.1125744` of `github.com/hashicorp/go-azure-sdk` ([#18446](https://github.com/hashicorp/terraform-provider-azurerm/issues/18446))
* dependencies: `disks` - updating to use `2022-03-02` ([#17671](https://github.com/hashicorp/terraform-provider-azurerm/issues/17671))
* Data Source: `azurerm_automation_account` - exports the `identity` attribute ([#18478](https://github.com/hashicorp/terraform-provider-azurerm/issues/18478))
* Data Source: `azurerm_storage_account` - export the `azure_files_identity_based_auth` property ([#18405](https://github.com/hashicorp/terraform-provider-azurerm/issues/18405))
* `azurerm_api_management_api_operation` - support the `example`, `schema_id`, and `type_name` properties ([#18409](https://github.com/hashicorp/terraform-provider-azurerm/issues/18409))
* `azurerm_cognitive_account` - support for the `customer_managed_key` property [GH-18516]
* `azurerm_data_factory_flowlet_data_flow` - support for the `rejected_linked_service` property [GH-18056]
* `azurerm_data_factory_data_flow` - support for the `rejected_linked_service` property [GH-18056]
* `azurerm_sentinel_alert_rule_scheduled` - support for the `techniques` property ([#18430](https://github.com/hashicorp/terraform-provider-azurerm/issues/18430))
* `azurerm_linux_virtual_machine` - support for the `patch_assessment_mode` property ([#18437](https://github.com/hashicorp/terraform-provider-azurerm/issues/18437))
* `azurerm_managed_disk` - support for the `PremiumV2_LRS` type ([#17671](https://github.com/hashicorp/terraform-provider-azurerm/issues/17671))
* `azurerm_orchestrated_virtual_machine_scale_set` - support for the `user_data_base64` property [GH-18486]
* `azurerm_private_endpoint` - support for the `custom_network_interface_name` property ([#18025](https://github.com/hashicorp/terraform-provider-azurerm/issues/18025))
* `azurerm_virtual_machine_extension` - support for the `failure_suppression_enabled` property ([#18441](https://github.com/hashicorp/terraform-provider-azurerm/issues/18441))
* `azurerm_virtual_machine_scale_set_extension` - support for the `failure_suppression_enabled` property ([#18441](https://github.com/hashicorp/terraform-provider-azurerm/issues/18441))
* `azurerm_windows_virtual_machine` - support for the `patch_assessment_mode` property ([#18437](https://github.com/hashicorp/terraform-provider-azurerm/issues/18437))

BUG FIXES:

* `azurerm_monitor_metric_alert` - pass multi criteria to the API in the correct order ([#18438](https://github.com/hashicorp/terraform-provider-azurerm/issues/18438))
* `azurerm_monitor_diagnostic_settings` - correctly parsing the case for the `workspace_id` property ([#18467](https://github.com/hashicorp/terraform-provider-azurerm/issues/18467))
* `azurerm_security_center_workspace` - correctly parsing the case for the `workspace_id` property ([#18467](https://github.com/hashicorp/terraform-provider-azurerm/issues/18467))

## 3.23.0 (September 15, 2022)

Expand Down
18 changes: 6 additions & 12 deletions internal/services/appservice/helpers/function_app_slot_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,23 +397,17 @@ func SiteConfigSchemaLinuxFunctionAppSlot() *pluginsdk.Schema {
},

"application_insights_key": {
Type: pluginsdk.TypeString,
Optional: true,
Sensitive: true,
RequiredWith: []string{
"site_config.0.application_insights_connection_string",
},
Type: pluginsdk.TypeString,
Optional: true,
Sensitive: true,
ValidateFunc: validation.StringIsNotEmpty,
Description: "The Instrumentation Key for connecting the Linux Function App to Application Insights.",
},

"application_insights_connection_string": {
Type: pluginsdk.TypeString,
Optional: true,
Sensitive: true,
RequiredWith: []string{
"site_config.0.application_insights_key",
},
Type: pluginsdk.TypeString,
Optional: true,
Sensitive: true,
ValidateFunc: validation.StringIsNotEmpty,
Description: "The Connection String for linking the Linux Function App to Application Insights.",
},
Expand Down
15 changes: 15 additions & 0 deletions internal/services/automation/automation_account_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
identity2 "github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
"github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand Down Expand Up @@ -33,14 +34,19 @@ func dataSourceAutomationAccount() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Computed: true,
},

"secondary_key": {
Type: pluginsdk.TypeString,
Computed: true,
},

"identity": commonschema.SystemAssignedUserAssignedIdentityComputed(),

"endpoint": {
Type: pluginsdk.TypeString,
Computed: true,
},

"private_endpoint_connection": {
Type: pluginsdk.TypeList,
Computed: true,
Expand Down Expand Up @@ -96,6 +102,15 @@ func dataSourceAutomationAccountRead(d *pluginsdk.ResourceData, meta interface{}
d.Set("primary_key", iresp.Keys.Primary)
d.Set("secondary_key", iresp.Keys.Secondary)
}

identity, err := identity2.FlattenSystemAndUserAssignedMap(resp.Model.Identity)
if err != nil {
return fmt.Errorf("flattening `identity`: %+v", err)
}
if err := d.Set("identity", identity); err != nil {
return fmt.Errorf("setting `identity`: %+v", err)
}

d.Set("endpoint", iresp.Endpoint)
if resp.Model != nil && resp.Model.Properties != nil {
d.Set("private_endpoint_connection", flattenPrivateEndpointConnections(resp.Model.Properties.PrivateEndpointConnections))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ resource "azurerm_automation_account" "test" {
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
sku_name = "Basic"
identity {
type = "SystemAssigned"
}
}
data "azurerm_automation_account" "test" {
resource_group_name = azurerm_resource_group.test.name
name = azurerm_automation_account.test.name
}
output "automation_account_system_managed_identity_principal_id" {
value = data.azurerm_automation_account.test.identity[0].principal_id
}
`, data.RandomInteger, data.Locations.Primary)
}
Loading

0 comments on commit 9c9a86e

Please sign in to comment.