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

[Bug]: medialive encodersettings #29159

Closed
chrjoh opened this issue Jan 30, 2023 · 4 comments · Fixed by #29917
Closed

[Bug]: medialive encodersettings #29159

chrjoh opened this issue Jan 30, 2023 · 4 comments · Fixed by #29917
Labels
bug Addresses a defect in current functionality. service/medialive Issues and PRs that pertain to the medialive service.
Milestone

Comments

@chrjoh
Copy link

chrjoh commented Jan 30, 2023

Terraform Core Version

1.3.7

AWS Provider Version

4.5.2

Affected Resource(s)

  • aws_medialive_channel

In the schema for ms smooth the key for audioOnlyTimecodeControl is sprcified as audio_only_timecodec_control

and the spelling here is audio_only_timecode_control
https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/medialive/channel_encoder_settings_schema.go#L3109

So we get the following error

Terraform v1.3.7
on linux_amd64
Initializing plugins and modules...
aws_security_group.sg: Refreshing state... [id=sg-03500334f2404e471]
aws_medialive_input.input-testa: Refreshing state... [id=8624773]
aws_medialive_input.input-testb: Refreshing state... [id=9597455]
aws_medialive_channel.channel-test: Refreshing state... [id=9736460]
╷
│ Error: setting AWS Elemental MediaLive Channel (9736460): Invalid address to set: []string{"encoder_settings", "0", "output_groups", "0", "output_group_settings", "0", "ms_smooth_group_settings", "0", "audio_only_timecode_control"}
│ 
│   with aws_medialive_channel.channel-test,
│   on cdk.tf.json line 563, in resource.aws_medialive_channel.channel-test:
│  563:       }
│ 
╵
Operation failed: failed running terraform plan (exit 1)�

So we tried just to edit the key in generated terraform and apply to see what happened and get the following error

Terraform v1.3.7
on linux_amd64
Initializing plugins and modules...
╷
│ Error: Extraneous JSON object property
│ 
│   on cdk.tf.json line 126, in resource.aws_medialive_channel.channel-test.encoder_settings.output_groups[0].output_group_settings.ms_smooth_group_settings:
│  126:                   "audio_only_timecode_control": "USE_CONFIGURED_CLOCK",
│ 
│ No argument or block type is named "audio_only_timecode_control". Did you
│ mean "audio_only_timecodec_control"?
╵
Operation failed: failed running terraform plan (exit 1)�

I think there is a spelling misstake in the schema

Expected Behavior

the fieldname should be audio_only_timecode_control

Actual Behavior

Since the key is spelled wrong we can not apply any chnages

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

we just downloaded an existing json setup from medialive

 const channel_config = JSON.parse(
                readFileSync(`./channel_config/${channel.file}.json`, 'utf-8'),
            )
            let encoderSetting = <MedialiveChannelEncoderSettings>channel_config['encoderSettings']

```
where we have created two of each MedialiveInput, MedialiveChannelDestinations and MedialiveChannelInputAttachments

        new MedialiveChannel(this, 'channel', channel.name), {
            name: channel.name,
            channelClass: 'SINGLE_PIPELINE',
            roleArn: `arn:aws:iam::${accountId}:role/MediaLiveAccessRole`,
            destinations: destinations,
            inputAttachments: attachements,
            inputSpecification: {
                codec: 'AVC',
                inputResolution: 'HD',
                maximumBitrate: 'MAX_50_MBPS',
            },
            encoderSettings: encoderSetting,
            maintenance: {
                maintenanceDay: channel.maintenance.day,
                maintenanceStartTime: channel.maintenance.time
            }
        })

Steps to Reproduce

just try to create a medialive channel with the follwoing outputgroup
msSmoothGroupSettings with audioOnlyTimecodecControl set to "USE_CONFIGURED_CLOCK"

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@chrjoh chrjoh added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jan 30, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/medialive Issues and PRs that pertain to the medialive service. label Jan 30, 2023
@stevensdavid
Copy link

This seems to me like it's caused by a spelling error in the schema definition, where the schema calls the property audio_only_timecodec_control (see here) and the property is used as audio_only_timecode_control (see here), note the added c in timecodec/timecode.

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Feb 2, 2023
@github-actions github-actions bot added this to the v4.59.0 milestone Mar 14, 2023
@github-actions
Copy link

This functionality has been released in v4.59.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/medialive Issues and PRs that pertain to the medialive service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants