Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_media* - mark deprecated as service is being retired #22350

Merged
merged 2 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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