Skip to content

Commit

Permalink
azurerm_media* - mark deprecated as service is being retired (#22350)
Browse files Browse the repository at this point in the history
  • Loading branch information
teowa authored Jul 3, 2023
1 parent e2a5602 commit 08705f0
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/services/media/media_asset_filter_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ func resourceMediaAssetFilter() *pluginsdk.Resource {
Update: resourceMediaAssetFilterCreateUpdate,
Delete: resourceMediaAssetFilterDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_asset_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func resourceMediaAsset() *pluginsdk.Resource {
Update: resourceMediaAssetCreateUpdate,
Delete: resourceMediaAssetDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_content_key_policy_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ func resourceMediaContentKeyPolicy() *pluginsdk.Resource {
Update: resourceMediaContentKeyPolicyCreateUpdate,
Delete: resourceMediaContentKeyPolicyDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_job_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func resourceMediaJob() *pluginsdk.Resource {
Update: resourceMediaJobUpdate,
Delete: resourceMediaJobDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_live_output_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func resourceMediaLiveOutput() *pluginsdk.Resource {
Read: resourceMediaLiveOutputRead,
Delete: resourceMediaLiveOutputDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/utils"
)

var _ sdk.ResourceWithUpdate = AccountFilterResource{}
var _ sdk.ResourceWithDeprecationAndNoReplacement = AccountFilterResource{}

type AccountFilterModel struct {
Name string `tfschema:"name"`
ResourceGroupName string `tfschema:"resource_group_name"`
Expand Down Expand Up @@ -44,6 +47,10 @@ type Condition struct {

type AccountFilterResource struct{}

func (r AccountFilterResource) DeprecationMessage() string {
return azureMediaRetirementMessage
}

func (r AccountFilterResource) Arguments() map[string]*pluginsdk.Schema {
return map[string]*pluginsdk.Schema{
"name": {
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_services_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func resourceMediaServicesAccount() *pluginsdk.Resource {
Update: resourceMediaServicesAccountCreateUpdate,
Delete: resourceMediaServicesAccountDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_streaming_endpoint_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func resourceMediaStreamingEndpoint() *pluginsdk.Resource {
Update: resourceMediaStreamingEndpointUpdate,
Delete: resourceMediaStreamingEndpointDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ func resourceMediaLiveEvent() *pluginsdk.Resource {
Update: resourceMediaLiveEventUpdate,
Delete: resourceMediaLiveEventDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_streaming_locator_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func resourceMediaStreamingLocator() *pluginsdk.Resource {
Read: resourceMediaStreamingLocatorRead,
Delete: resourceMediaStreamingLocatorDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_streaming_policy_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func resourceMediaStreamingPolicy() *pluginsdk.Resource {
Read: resourceMediaStreamingPolicyRead,
Delete: resourceMediaStreamingPolicyDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
2 changes: 2 additions & 0 deletions internal/services/media/media_transform_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ func resourceMediaTransform() *pluginsdk.Resource {
Update: resourceMediaTransformCreateUpdate,
Delete: resourceMediaTransformDelete,

DeprecationMessage: azureMediaRetirementMessage,

Timeouts: &pluginsdk.ResourceTimeout{
Create: pluginsdk.DefaultTimeout(30 * time.Minute),
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
Expand Down
4 changes: 4 additions & 0 deletions internal/services/media/registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ var (
_ sdk.UntypedServiceRegistrationWithAGitHubLabel = Registration{}
)

const (
azureMediaRetirementMessage = "Azure Media Services will be retired June 30th, 2024. Please see https://learn.microsoft.com/en-us/azure/media-services/latest/azure-media-services-retirement"
)

func (r Registration) AssociatedGitHubLabel() string {
return "service/media"
}
Expand Down

0 comments on commit 08705f0

Please sign in to comment.