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

added teletext destinations settings #33797

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
3 changes: 3 additions & 0 deletions .changelog/33797.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/medialive: Added missing `teletext_destination_settings`.
```
24 changes: 22 additions & 2 deletions internal/service/medialive/channel_encoder_settings_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -5018,7 +5018,7 @@ func expandChannelEncoderSettingsCaptionDescriptionsDestinationSettings(tfList [
out.SmpteTtDestinationSettings = &types.SmpteTtDestinationSettings{} // only unexported fields
}
if v, ok := m["teletext_destination_settings"].([]interface{}); ok && len(v) > 0 {
out.TeletextDestinationSettings = &types.TeletextDestinationSettings{} // only unexported fields
out.TeletextDestinationSettings = expandsCaptionDescriptionsDestinationSettingsTeletextDestinationSettings(v)
}
if v, ok := m["ttml_destination_settings"].([]interface{}); ok && len(v) > 0 {
out.TtmlDestinationSettings = expandsCaptionDescriptionsDestinationSettingsTtmlDestinationSettings(v)
Expand Down Expand Up @@ -5183,6 +5183,16 @@ func expandsCaptionDescriptionsDestinationSettingsEbuTtDDestinationSettings(tfLi
return &out
}

func expandsCaptionDescriptionsDestinationSettingsTeletextDestinationSettings(tfList []interface{}) *types.TeletextDestinationSettings {
if tfList == nil {
return nil
}

var out types.TeletextDestinationSettings

return &out
}

func expandsCaptionDescriptionsDestinationSettingsTtmlDestinationSettings(tfList []interface{}) *types.TtmlDestinationSettings {
if tfList == nil {
return nil
Expand Down Expand Up @@ -6716,7 +6726,7 @@ func flattenCaptionDescriptionsCaptionDestinationSettings(in *types.CaptionDesti
"scte20_plus_embedded_destination_settings": []interface{}{}, // attribute has no exported fields
"scte27_destination_settings": []interface{}{}, // attribute has no exported fields
"smpte_tt_destination_settings": []interface{}{}, // attribute has no exported fields
"teletext_destination_settings": []interface{}{}, // attribute has no exported fields
"teletext_destination_settings": flattenCaptionDescriptionsCaptionDestinationSettingsTeletextDestinationSettings(in.TeletextDestinationSettings),
"ttml_destination_settings": flattenCaptionDescriptionsCaptionDestinationSettingsTtmlDestinationSettings(in.TtmlDestinationSettings),
"webvtt_destination_settings": flattenCaptionDescriptionsCaptionDestinationSettingsWebvttDestinationSettings(in.WebvttDestinationSettings),
}
Expand Down Expand Up @@ -6795,6 +6805,16 @@ func flattenCaptionDescriptionsCaptionDestinationSettingsEbuTtDDestinationSettin
return []interface{}{m}
}

func flattenCaptionDescriptionsCaptionDestinationSettingsTeletextDestinationSettings(in *types.TeletextDestinationSettings) []interface{} {
if in == nil {
return nil
}

m := map[string]interface{}{}

return []interface{}{m}
}

func flattenCaptionDescriptionsCaptionDestinationSettingsTtmlDestinationSettings(in *types.TtmlDestinationSettings) []interface{} {
if in == nil {
return nil
Expand Down
25 changes: 24 additions & 1 deletion internal/service/medialive/channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ func TestAccMediaLiveChannel_captionDescriptions(t *testing.T) {
"name": "test-caption-name",
"destination_settings.0.dvb_sub_destination_settings.0.font_resolution": "100",
}),
resource.TestCheckTypeSetElemNestedAttrs(resourceName, "encoder_settings.0.caption_descriptions.*", map[string]string{
"caption_selector_name": "test-caption-selector-teletext",
"name": "test-caption-name-teletext",
"destination_settings.0.teletext_destination_settings.0": "",
}),
resource.TestCheckTypeSetElemNestedAttrs(resourceName, "encoder_settings.0.video_descriptions.*", map[string]string{
"name": "test-video-name",
}),
Expand Down Expand Up @@ -1827,6 +1832,15 @@ resource "aws_medialive_channel" "test" {
name = %[1]q
}

caption_selector {
name = "test-caption-selector-teletext"
selector_settings {
teletext_source_settings {
page_number = "100"
}
}
}

audio_selector {
name = "test-audio-selector"
}
Expand Down Expand Up @@ -1871,6 +1885,15 @@ resource "aws_medialive_channel" "test" {
}
}

caption_descriptions {
name = "test-caption-name-teletext"
caption_selector_name = "test-caption-selector-teletext"

destination_settings {
teletext_destination_settings {}
}
}

output_groups {
output_group_settings {
archive_group_settings {
Expand All @@ -1884,7 +1907,7 @@ resource "aws_medialive_channel" "test" {
output_name = "test-output-name"
video_description_name = "test-video-name"
audio_description_names = ["test-audio-name"]
caption_description_names = ["test-caption-name"]
caption_description_names = ["test-caption-name", "test-caption-name-teletext"]
output_settings {
archive_output_settings {
name_modifier = "_1"
Expand Down
Loading