Skip to content

Commit 2bc820c

Browse files
authored
azurerm_automation_software_update_configuration - Deprecate Automation Software Update Configuration resource (hashicorp#30265)
1 parent a343ded commit 2bc820c

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

internal/services/automation/automation_software_update_configuration_resource.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ type SoftwareUpdateConfigurationResource struct{}
129129

130130
var _ sdk.ResourceWithUpdate = SoftwareUpdateConfigurationResource{}
131131

132+
var _ sdk.ResourceWithDeprecationAndNoReplacement = SoftwareUpdateConfigurationResource{}
133+
134+
func (m SoftwareUpdateConfigurationResource) DeprecationMessage() string {
135+
return "The `azurerm_automation_software_update_configuration` resource is deprecated and will be removed in version 5.0 of the AzureRM Provider. " +
136+
"Azure Automation Update Management was deprecated on 2024-08-31 and has been shut down on 2025-02-28. " +
137+
"Please migrate to Azure Update Manager, and use the `azurerm_maintenance_configuration` resource combined with the appropriate assignment resources instead. " +
138+
"For more details, see: https://techcommunity.microsoft.com/blog/azuregovernanceandmanagementblog/log-analytics-agent-based-azure-management-services-shut-down-starting-28-februa/4381853"
139+
}
140+
132141
func (m SoftwareUpdateConfigurationResource) Arguments() map[string]*pluginsdk.Schema {
133142
linux := pluginsdk.Resource{
134143
Schema: map[string]*pluginsdk.Schema{

internal/services/automation/automation_software_update_configuration_resource_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ func (a SoftwareUpdateConfigurationResource) Exists(ctx context.Context, client
4949
}
5050

5151
func TestAccSoftwareUpdateConfiguration_linuxBasic(t *testing.T) {
52+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
53+
5254
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
5355
r := newSoftwareUpdateConfigurationResource()
5456
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -64,6 +66,8 @@ func TestAccSoftwareUpdateConfiguration_linuxBasic(t *testing.T) {
6466
}
6567

6668
func TestAccSoftwareUpdateConfiguration_occurrence(t *testing.T) {
69+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
70+
6771
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
6872
r := newSoftwareUpdateConfigurationResource()
6973
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -79,6 +83,8 @@ func TestAccSoftwareUpdateConfiguration_occurrence(t *testing.T) {
7983
}
8084

8185
func TestAccSoftwareUpdateConfiguration_linuxComplete(t *testing.T) {
86+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
87+
8288
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
8389
r := newSoftwareUpdateConfigurationResource()
8490
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -94,6 +100,8 @@ func TestAccSoftwareUpdateConfiguration_linuxComplete(t *testing.T) {
94100
}
95101

96102
func TestAccSoftwareUpdateConfiguration_linuxUpdate(t *testing.T) {
103+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
104+
97105
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
98106
r := newSoftwareUpdateConfigurationResource()
99107
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -125,6 +133,8 @@ func TestAccSoftwareUpdateConfiguration_linuxUpdate(t *testing.T) {
125133
}
126134

127135
func TestAccSoftwareUpdateConfiguration_CompleteUpdate(t *testing.T) {
136+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
137+
128138
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
129139
r := newSoftwareUpdateConfigurationResource()
130140
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -156,6 +166,8 @@ func TestAccSoftwareUpdateConfiguration_CompleteUpdate(t *testing.T) {
156166
}
157167

158168
func TestAccSoftwareUpdateConfiguration_withTask(t *testing.T) {
169+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
170+
159171
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
160172
r := newSoftwareUpdateConfigurationResource()
161173
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -171,6 +183,8 @@ func TestAccSoftwareUpdateConfiguration_withTask(t *testing.T) {
171183
}
172184

173185
func TestAccSoftwareUpdateConfiguration_defaultTimeZone(t *testing.T) {
186+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
187+
174188
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
175189
r := newSoftwareUpdateConfigurationResource()
176190
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -194,6 +208,8 @@ func TestAccSoftwareUpdateConfiguration_defaultTimeZone(t *testing.T) {
194208
}
195209

196210
func TestAccSoftwareUpdateConfiguration_update(t *testing.T) {
211+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
212+
197213
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
198214
r := newSoftwareUpdateConfigurationResource()
199215
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -217,6 +233,8 @@ func TestAccSoftwareUpdateConfiguration_update(t *testing.T) {
217233
}
218234

219235
func TestAccSoftwareUpdateConfiguration_windowsBasic(t *testing.T) {
236+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
237+
220238
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
221239
r := newSoftwareUpdateConfigurationResource()
222240
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -232,6 +250,8 @@ func TestAccSoftwareUpdateConfiguration_windowsBasic(t *testing.T) {
232250
}
233251

234252
func TestAccSoftwareUpdateConfiguration_windowsComplete(t *testing.T) {
253+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
254+
235255
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
236256
r := newSoftwareUpdateConfigurationResource()
237257
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -247,6 +267,8 @@ func TestAccSoftwareUpdateConfiguration_windowsComplete(t *testing.T) {
247267
}
248268

249269
func TestAccSoftwareUpdateConfiguration_windowsUpdate(t *testing.T) {
270+
t.Skipf("Skipping since `azurerm_automation_software_update_configuration` is deprecated and will be removed in 5.0")
271+
250272
data := acceptance.BuildTestData(t, automation.SoftwareUpdateConfigurationResource{}.ResourceType(), "test")
251273
r := newSoftwareUpdateConfigurationResource()
252274
data.ResourceTest(t, r, []acceptance.TestStep{

internal/services/automation/registration.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package automation
55

66
import (
7+
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
78
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
89
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
910
)
@@ -23,16 +24,21 @@ func (r Registration) DataSources() []sdk.DataSource {
2324
}
2425

2526
func (r Registration) Resources() []sdk.Resource {
26-
return []sdk.Resource{
27+
resources := []sdk.Resource{
2728
AutomationConnectionTypeResource{},
2829
HybridRunbookWorkerGroupResource{},
2930
HybridRunbookWorkerResource{},
30-
SoftwareUpdateConfigurationResource{},
3131
SourceControlResource{},
3232
WatcherResource{},
3333
Python3PackageResource{},
3434
PowerShell72ModuleResource{},
3535
}
36+
37+
if !features.FivePointOh() {
38+
resources = append(resources, SoftwareUpdateConfigurationResource{})
39+
}
40+
41+
return resources
3642
}
3743

3844
func (r Registration) AssociatedGitHubLabel() string {

website/docs/5.0-upgrade-guide.html.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Please follow the format in the example below for adding removed resources:
3434
This deprecated resource has been superseded/retired and has been removed from the Azure Provider.
3535
```
3636

37+
### `azurerm_automation_software_update_configuration`
38+
39+
* This deprecated resource has been retired and has been removed from the Azure Provider.
40+
3741
### `azurerm_hpc_cache`
3842

3943
* This deprecated resource has been retired and has been removed from the Azure Provider.

website/docs/r/automation_software_update_configuration.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Manages an Automation Software Update Configuration.
1212

13+
!> **Note:** The `azurerm_automation_software_update_configuration` resource has been deprecated because the Azure Automation Update Management was retired on 2024-08-31 and has been shutdown on 2025-02-28. This resource will be removed in v5.0 of the AzureRM Provider. Please migrate to Azure Update Manager, and use the `azurerm_maintenance_configuration` resource combined with the appropriate assignment resources instead. See https://techcommunity.microsoft.com/blog/azuregovernanceandmanagementblog/log-analytics-agent-based-azure-management-services-shut-down-starting-28-februa/4381853 for more information.
14+
1315
## Example Usage
1416

1517
```hcl

0 commit comments

Comments
 (0)