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

Fix typo in aws_medialive_channel documentation #33410

Merged
merged 5 commits into from
Dec 12, 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
3 changes: 3 additions & 0 deletions .changelog/33410.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_medialive_channel: Fixed errors related to setting the `failover_condition` argument
```
4 changes: 2 additions & 2 deletions internal/service/medialive/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ func expandInputAttachmentAutomaticInputFailoverSettings(tfList []interface{}) *
if v, ok := m["error_clear_time_msec"].(int); ok && v != 0 {
out.ErrorClearTimeMsec = aws.Int32(int32(v))
}
if v, ok := m["failover_conditions"].(*schema.Set); ok && v.Len() > 0 {
if v, ok := m["failover_condition"].(*schema.Set); ok && v.Len() > 0 {
out.FailoverConditions = expandInputAttachmentAutomaticInputFailoverSettingsFailoverConditions(v.List())
}
if v, ok := m["input_preference"].(string); ok && v != "" {
Expand Down Expand Up @@ -2054,7 +2054,7 @@ func flattenInputAttachmentAutomaticInputFailoverSettings(in *types.AutomaticInp
m := map[string]interface{}{
"secondary_input_id": aws.ToString(in.SecondaryInputId),
"error_clear_time_msec": int(aws.ToInt32(in.ErrorClearTimeMsec)),
"failover_conditions": flattenInputAttachmentAutomaticInputFailoverSettingsFailoverConditions(in.FailoverConditions),
"failover_condition": flattenInputAttachmentAutomaticInputFailoverSettingsFailoverConditions(in.FailoverConditions),
"input_preference": string(in.InputPreference),
}

Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/medialive_channel.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ The following arguments are optional:

* `secondary_input_id` - (Required) The input ID of the secondary input in the automatic input failover pair.
* `error_clear_time_msec` - (Optional) This clear time defines the requirement a recovered input must meet to be considered healthy. The input must have no failover conditions for this length of time. Enter a time in milliseconds. This value is particularly important if the input\_preference for the failover pair is set to PRIMARY\_INPUT\_PREFERRED, because after this time, MediaLive will switch back to the primary input.
* `failover_conditions` - (Optional) A list of failover conditions. If any of these conditions occur, MediaLive will perform a failover to the other input. See [Failover Conditions](#failover-conditions) for more details.
* `failover_condition` - (Optional) A list of failover conditions. If any of these conditions occur, MediaLive will perform a failover to the other input. See [Failover Condition Block](#failover-condition-block) for more details.
* `input_preference` - (Optional) Input preference when deciding which input to make active when a previously failed input has recovered.

### Failover Conditions
### Failover Condition Block

* `failover_condition_settings` - (Optional) Failover condition type-specific settings. See [Failover Condition Settings](#failover-condition-settings) for more details.

Expand Down