hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[New Resource]: AWS Data Exchange - Job & AWS Data Exchange - Event Action #40418

Open TSKnuhtsen opened 17 hours ago

TSKnuhtsen commented 17 hours ago

Description

A customer we support would like to adopt AWS Data Exchange. Terraform resources aws_dataexchange_job and aws_dataexchange_event_action need to be implemented to adopt.

Affected Resource(s) and/or Data Source(s)

aws_dataexchange_job aws_dataexchange_event_action

Potential Terraform Configuration

# aws_dataexchange_job
resource "aws_dataexchange_job" "example" {
  type        = "IMPORT_ASSETS_FROM_S3"
  data_set_id = aws_dataexchange_data_set.example.id
  revision_id = aws_dataexchange_revision.example.id

  s3_asset_sources = [
    {
      bucket = "source-bucket"
      key    = "source/key/asset.csv"
    }
  ]

  start_on_creation = true
}

# aws_dataexchange_event_action
resource "aws_dataexchange_event_action" "example" {
  action_export_revision_to_s3 {
    bucket      = "my-export-bucket"
    key_pattern = "${Revision.CreatedAt}/${Asset.Name}"

    s3_encryption_type     = "aws:kms"
    s3_encryption_kms_key_arn = aws_kms_key.example.arn
  }

  event_revision_published {
    data_set_id = aws_dataexchange_data_set.example.id
  }
}

References

No response

Would you like to implement a fix?

Yes

github-actions[bot] commented 17 hours ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue