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.85k stars 9.19k forks source link

[Enhancement]: Data Source: aws_redshift_cluster New Attribute "number_of_slices" #34299

Open simonB2020 opened 1 year ago

simonB2020 commented 1 year ago

Description

Request that a new attribute provides the number of slices in a cluster.

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

Data Source: aws_redshift_cluster

Potential Terraform Configuration

data "aws_redshift_cluster" "example" {
  cluster_identifier = "example-cluster"
}

resource "aws_glue_job" "my_glue_job" {
  name  = "my_glue_job"
  default_arguments = {
    "--cluster-slices" = data.aws_redshift_cluster.example.number_of_slices
 }
}

References

AWS Redshift documentation specifies that a developer (e.g of an AWS Glue Job) should split files into a multiple of the number of slices in the target Redshift cluster.

Hence we would need to obtain this value in order to pass to Glue Jobs or Lambda functions provisioned by Terraform.

https://docs.aws.amazon.com/redshift/latest/dg/t_splitting-data-files.html

"Split your data into files so that the number of files is a multiple of the number of slices in your cluster"

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue