Definition of AWS::Pipes::Pipe Resource Type
Create a pipe with SQS queues as the source and destination:
data "aws_caller_identity" "example" {}
resource "awscc_sqs_queue" "source" {}
resource "awscc_sqs_queue" "target" {}
resource "awscc_iam_role" "example" {
assume_role_policy_document = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = "sts:AssumeRole"
Effect = "Allow"
Principal = {
Service = "pipes.amazonaws.com"
}
Condition = {
StringEquals = {
"aws:SourceAccount" = data.aws_caller_identity.example.account_id
}
}
},
]
})
policies = [{
policy_name = "SQSAccess"
policy_document = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = [
"sqs:DeleteMessage",
"sqs:GetQueueAttributes",
"sqs:ReceiveMessage",
],
Effect = "Allow",
Resource = [
awscc_sqs_queue.source.arn
]
},
{
Action = [
"sqs:SendMessage",
],
Effect = "Allow",
Resource = [
awscc_sqs_queue.target.arn
]
},
]
})
}]
}
resource "awscc_pipes_pipe" "example" {
name = "example-pipe"
role_arn = awscc_iam_role.example.arn
source = awscc_sqs_queue.source.arn
target = awscc_sqs_queue.target.arn
tags = {
"Modified by" = "AWSCC"
}
}
Create a pipe with enrichment:
data "aws_iam_role" "example" {
name = "awscc_example"
}
data "aws_cloudwatch_event_connection" "example" {
name = "awscc-example"
}
resource "awscc_sqs_queue" "source" {}
resource "awscc_sqs_queue" "target" {}
resource "awscc_events_api_destination" "example" {
connection_arn = data.aws_cloudwatch_event_connection.example.arn
http_method = "GET"
invocation_endpoint = "https://example.com"
}
resource "awscc_pipes_pipe" "example" {
name = "example-pipe"
role_arn = data.aws_iam_role.example.arn
source = awscc_sqs_queue.source.arn
target = awscc_sqs_queue.target.arn
enrichment = awscc_events_api_destination.example.arn
enrichment_parameters = {
http_parameters = {
path_parameter_values = ["example-path-param"]
header_parameters = {
"example-header" = "example-value"
"second-example-header" = "second-example-value"
}
query_string_parameteres = {
"example-query-string" = "example-value"
"second-example-query-string" = "second-example-value"
}
}
}
}
Create a pipe with source filtering and custom parameters for source and target locations:
data "aws_iam_role" "example" {
name = "awscc_example"
}
resource "awscc_sqs_queue" "source" {
fifo_queue = true
}
resource "awscc_sqs_queue" "target" {
fifo_queue = true
}
resource "awscc_pipes_pipe" "example" {
name = "example-pipe"
role_arn = data.aws_iam_role.example.arn
source = awscc_sqs_queue.source.arn
target = awscc_sqs_queue.target.arn
source_parameters = {
filter_criteria = {
filters = [{
pattern = jsonencode({
source = ["event-source"]
})
}]
}
sqs_queue_parameters = {
batch_size = 1
}
}
target_parameters = {
sqs_queue_parameters = {
message_deduplication_id = "example-dedupe"
message_group_id = "example-group"
}
}
}
role_arn
(String)source
(String)target
(String)description
(String)desired_state
(String)enrichment
(String)enrichment_parameters
(Attributes) (see below for nested schema)log_configuration
(Attributes) (see below for nested schema)name
(String)source_parameters
(Attributes) (see below for nested schema)tags
(Map of String)target_parameters
(Attributes) (see below for nested schema)arn
(String)creation_time
(String)current_state
(String)id
(String) Uniquely identifies the resource.last_modified_time
(String)state_reason
(String)enrichment_parameters
Optional:
http_parameters
(Attributes) (see below for nested schema)input_template
(String)enrichment_parameters.http_parameters
Optional:
header_parameters
(Map of String)path_parameter_values
(List of String)query_string_parameters
(Map of String)log_configuration
Optional:
cloudwatch_logs_log_destination
(Attributes) (see below for nested schema)firehose_log_destination
(Attributes) (see below for nested schema)include_execution_data
(List of String)level
(String)s3_log_destination
(Attributes) (see below for nested schema)log_configuration.cloudwatch_logs_log_destination
Optional:
log_group_arn
(String)log_configuration.firehose_log_destination
Optional:
delivery_stream_arn
(String)log_configuration.s3_log_destination
Optional:
bucket_name
(String)bucket_owner
(String)output_format
(String)prefix
(String)source_parameters
Optional:
active_mq_broker_parameters
(Attributes) (see below for nested schema)dynamo_db_stream_parameters
(Attributes) (see below for nested schema)filter_criteria
(Attributes) (see below for nested schema)kinesis_stream_parameters
(Attributes) (see below for nested schema)managed_streaming_kafka_parameters
(Attributes) (see below for nested schema)rabbit_mq_broker_parameters
(Attributes) (see below for nested schema)self_managed_kafka_parameters
(Attributes) (see below for nested schema)sqs_queue_parameters
(Attributes) (see below for nested schema)source_parameters.active_mq_broker_parameters
Required:
credentials
(Attributes) (see below for nested schema)queue_name
(String)Optional:
batch_size
(Number)maximum_batching_window_in_seconds
(Number)source_parameters.active_mq_broker_parameters.credentials
Optional:
basic_auth
(String) Optional SecretManager ARN which stores the database credentialssource_parameters.dynamo_db_stream_parameters
Required:
starting_position
(String)Optional:
batch_size
(Number)dead_letter_config
(Attributes) (see below for nested schema)maximum_batching_window_in_seconds
(Number)maximum_record_age_in_seconds
(Number)maximum_retry_attempts
(Number)on_partial_batch_item_failure
(String)parallelization_factor
(Number)source_parameters.dynamo_db_stream_parameters.dead_letter_config
Optional:
arn
(String)source_parameters.filter_criteria
Optional:
filters
(Attributes List) (see below for nested schema)source_parameters.filter_criteria.filters
Optional:
pattern
(String)source_parameters.kinesis_stream_parameters
Required:
starting_position
(String)Optional:
batch_size
(Number)dead_letter_config
(Attributes) (see below for nested schema)maximum_batching_window_in_seconds
(Number)maximum_record_age_in_seconds
(Number)maximum_retry_attempts
(Number)on_partial_batch_item_failure
(String)parallelization_factor
(Number)starting_position_timestamp
(String)source_parameters.kinesis_stream_parameters.dead_letter_config
Optional:
arn
(String)source_parameters.managed_streaming_kafka_parameters
Required:
topic_name
(String)Optional:
batch_size
(Number)consumer_group_id
(String)credentials
(Attributes) (see below for nested schema)maximum_batching_window_in_seconds
(Number)starting_position
(String)source_parameters.managed_streaming_kafka_parameters.credentials
Optional:
client_certificate_tls_auth
(String) Optional SecretManager ARN which stores the database credentialssasl_scram_512_auth
(String) Optional SecretManager ARN which stores the database credentialssource_parameters.rabbit_mq_broker_parameters
Required:
credentials
(Attributes) (see below for nested schema)queue_name
(String)Optional:
batch_size
(Number)maximum_batching_window_in_seconds
(Number)virtual_host
(String)source_parameters.rabbit_mq_broker_parameters.credentials
Optional:
basic_auth
(String) Optional SecretManager ARN which stores the database credentialssource_parameters.self_managed_kafka_parameters
Required:
topic_name
(String)Optional:
additional_bootstrap_servers
(List of String)batch_size
(Number)consumer_group_id
(String)credentials
(Attributes) (see below for nested schema)maximum_batching_window_in_seconds
(Number)server_root_ca_certificate
(String) Optional SecretManager ARN which stores the database credentialsstarting_position
(String)vpc
(Attributes) (see below for nested schema)source_parameters.self_managed_kafka_parameters.credentials
Optional:
basic_auth
(String) Optional SecretManager ARN which stores the database credentialsclient_certificate_tls_auth
(String) Optional SecretManager ARN which stores the database credentialssasl_scram_256_auth
(String) Optional SecretManager ARN which stores the database credentialssasl_scram_512_auth
(String) Optional SecretManager ARN which stores the database credentialssource_parameters.self_managed_kafka_parameters.vpc
Optional:
security_group
(List of String) List of SecurityGroupId.subnets
(List of String) List of SubnetId.source_parameters.sqs_queue_parameters
Optional:
batch_size
(Number)maximum_batching_window_in_seconds
(Number)target_parameters
Optional:
batch_job_parameters
(Attributes) (see below for nested schema)cloudwatch_logs_parameters
(Attributes) (see below for nested schema)ecs_task_parameters
(Attributes) (see below for nested schema)event_bridge_event_bus_parameters
(Attributes) (see below for nested schema)http_parameters
(Attributes) (see below for nested schema)input_template
(String)kinesis_stream_parameters
(Attributes) (see below for nested schema)lambda_function_parameters
(Attributes) (see below for nested schema)redshift_data_parameters
(Attributes) (see below for nested schema)sage_maker_pipeline_parameters
(Attributes) (see below for nested schema)sqs_queue_parameters
(Attributes) (see below for nested schema)step_function_state_machine_parameters
(Attributes) (see below for nested schema)target_parameters.batch_job_parameters
Required:
job_definition
(String)job_name
(String)Optional:
array_properties
(Attributes) (see below for nested schema)container_overrides
(Attributes) (see below for nested schema)depends_on
(Attributes List) (see below for nested schema)parameters
(Map of String)retry_strategy
(Attributes) (see below for nested schema)target_parameters.batch_job_parameters.array_properties
Optional:
size
(Number)target_parameters.batch_job_parameters.container_overrides
Optional:
command
(List of String)environment
(Attributes List) (see below for nested schema)instance_type
(String)resource_requirements
(Attributes List) (see below for nested schema)target_parameters.batch_job_parameters.container_overrides.environment
Optional:
name
(String)value
(String)target_parameters.batch_job_parameters.container_overrides.resource_requirements
Required:
type
(String)value
(String)target_parameters.batch_job_parameters.depends_on
Optional:
job_id
(String)type
(String)target_parameters.batch_job_parameters.retry_strategy
Optional:
attempts
(Number)target_parameters.cloudwatch_logs_parameters
Optional:
log_stream_name
(String)timestamp
(String)target_parameters.ecs_task_parameters
Required:
task_definition_arn
(String)Optional:
capacity_provider_strategy
(Attributes List) (see below for nested schema)enable_ecs_managed_tags
(Boolean)enable_execute_command
(Boolean)group
(String)launch_type
(String)network_configuration
(Attributes) (see below for nested schema)overrides
(Attributes) (see below for nested schema)placement_constraints
(Attributes List) (see below for nested schema)placement_strategy
(Attributes List) (see below for nested schema)platform_version
(String)propagate_tags
(String)reference_id
(String)tags
(Attributes List) (see below for nested schema)task_count
(Number)target_parameters.ecs_task_parameters.capacity_provider_strategy
Required:
capacity_provider
(String)Optional:
base
(Number)weight
(Number)target_parameters.ecs_task_parameters.network_configuration
Optional:
awsvpc_configuration
(Attributes) (see below for nested schema)target_parameters.ecs_task_parameters.network_configuration.awsvpc_configuration
Required:
subnets
(List of String)Optional:
assign_public_ip
(String)security_groups
(List of String)target_parameters.ecs_task_parameters.overrides
Optional:
container_overrides
(Attributes List) (see below for nested schema)cpu
(String)ephemeral_storage
(Attributes) (see below for nested schema)execution_role_arn
(String)inference_accelerator_overrides
(Attributes List) (see below for nested schema)memory
(String)task_role_arn
(String)target_parameters.ecs_task_parameters.overrides.container_overrides
Optional:
command
(List of String)cpu
(Number)environment
(Attributes List) (see below for nested schema)environment_files
(Attributes List) (see below for nested schema)memory
(Number)memory_reservation
(Number)name
(String)resource_requirements
(Attributes List) (see below for nested schema)target_parameters.ecs_task_parameters.overrides.task_role_arn.environment
Optional:
name
(String)value
(String)target_parameters.ecs_task_parameters.overrides.task_role_arn.environment_files
Required:
type
(String)value
(String)target_parameters.ecs_task_parameters.overrides.task_role_arn.resource_requirements
Required:
type
(String)value
(String)target_parameters.ecs_task_parameters.overrides.ephemeral_storage
Optional:
size_in_gi_b
(Number)target_parameters.ecs_task_parameters.overrides.inference_accelerator_overrides
Optional:
device_name
(String)device_type
(String)target_parameters.ecs_task_parameters.placement_constraints
Optional:
expression
(String)type
(String)target_parameters.ecs_task_parameters.placement_strategy
Optional:
field
(String)type
(String)target_parameters.ecs_task_parameters.tags
Required:
key
(String)value
(String)target_parameters.event_bridge_event_bus_parameters
Optional:
detail_type
(String)endpoint_id
(String)resources
(List of String)source
(String)time
(String)target_parameters.http_parameters
Optional:
header_parameters
(Map of String)path_parameter_values
(List of String)query_string_parameters
(Map of String)target_parameters.kinesis_stream_parameters
Required:
partition_key
(String)target_parameters.lambda_function_parameters
Optional:
invocation_type
(String)target_parameters.redshift_data_parameters
Required:
database
(String) Redshift Databasesqls
(List of String) A list of SQLs.Optional:
db_user
(String) Database user namesecret_manager_arn
(String) Optional SecretManager ARN which stores the database credentialsstatement_name
(String) A name for Redshift DataAPI statement which can be used as filter of ListStatement.with_event
(Boolean)target_parameters.sage_maker_pipeline_parameters
Optional:
pipeline_parameter_list
(Attributes List) (see below for nested schema)target_parameters.sage_maker_pipeline_parameters.pipeline_parameter_list
Required:
name
(String)value
(String)target_parameters.sqs_queue_parameters
Optional:
message_deduplication_id
(String)message_group_id
(String)target_parameters.step_function_state_machine_parameters
Optional:
invocation_type
(String)Import is supported using the following syntax:
$ terraform import awscc_pipes_pipe.example <resource ID>