Skip to content

Resource: awsMedialiveInput

Terraform resource for managing an AWS MediaLive Input.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsMedialiveInputSecurityGroupExample =
  new aws.medialiveInputSecurityGroup.MedialiveInputSecurityGroup(
    this,
    "example",
    {
      tags: {
        ENVIRONMENT: "prod",
      },
      whitelistRules: [
        {
          cidr: "10.0.0.8/32",
        },
      ],
    }
  );
const awsMedialiveInputExample = new aws.medialiveInput.MedialiveInput(
  this,
  "example_1",
  {
    inputSecurityGroups: [awsMedialiveInputSecurityGroupExample.id],
    name: "example-input",
    tags: {
      ENVIRONMENT: "prod",
    },
    type: "UDP_PUSH",
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsMedialiveInputExample.overrideLogicalId("example");

Argument Reference

The following arguments are required:

  • name - (Required) Name of the input.
  • inputSecurityGroups - (Required) List of input security groups.
  • type - (Required) The different types of inputs that AWS Elemental MediaLive supports.

The following arguments are optional:

  • destinations - (Optional) Destination settings for PUSH type inputs. See Destinations for more details.
  • inputDevices - (Optional) Settings for the devices. See Input Devices for more details.
  • mediaConnectFlows - (Optional) A list of the MediaConnect Flows. See Media Connect Flows for more details.
  • roleArn - (Optional) The ARN of the role this input assumes during and after creation.
  • sources - (Optional) The source URLs for a PULL-type input. See Sources for more details.
  • tags- (Optional) A map of tags to assign to the Input. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  • vpc - (Optional) Settings for a private VPC Input. See VPC for more details.

Destinations

  • streamName - A unique name for the location the RTMP stream is being pushed to.

Input Devices

  • id - The unique ID for the device.

Media Connect Flows

  • flowArn - The ARN of the MediaConnect Flow

Sources

  • passwordParam - The key used to extract the password from EC2 Parameter store.
  • url - The URL where the stream is pulled from.
  • username - The username for the input source.

VPC

  • subnetIds - A list of 2 VPC subnet IDs from the same VPC.
  • securityGroupIds - A list of up to 5 EC2 VPC security group IDs to attach to the Input.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - ARN of the Input.
  • attachedChannels - Channels attached to Input.
  • inputClass - The input class.
  • inputPartnerIds - A list of IDs for all Inputs which are partners of this one.
  • inputSourceType - Source type of the input.

Timeouts

Configuration options:

  • create - (Default 30M)
  • update - (Default 30M)
  • delete - (Default 30M)

Import

MediaLive Input can be imported using the id, e.g.,

$ terraform import aws_medialive_input.example 12345678