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.76k stars 9.12k forks source link

aws_redshiftserverless_namespace restore from snapshot #35138

Open topazb opened 9 months ago

topazb commented 9 months ago

Description

aws_redshiftserverless_namespace resource should have the ability to be created from a snapshot (same as aws_redshift_cluster): snapshot_arn - (Optional) The ARN of the snapshot from which to create the new cluster. Conflicts with snapshot_identifier. snapshot_identifier - (Optional) The name of the snapshot from which to create the new cluster. Conflicts with snapshot_arn.

This is available from AWS console or API

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

aws_redshiftserverless_namespace

Potential Terraform Configuration

resource "aws_redshiftserverless_namespace" "example" {
  namespace_name = "concurrency-scaling"
  snapshot_arn   =  "arn:aws:redshift-serverless:us-east-1:123456789012:snapshot/12345678-1234-1234-1234-123456789012"
}

References

https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_RestoreFromSnapshot.html

Would you like to implement a fix?

None

github-actions[bot] commented 9 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

noel-phelt commented 7 months ago

redshift-serverless RestoreFromSnapshot can only restore from snapshot to already exist namespace. So it can't create namespace. I suppose it is possible by calling the restore API after the resource is successfully created. But in that way is possibility to conflict with Provider Design Principles, isn't it?

topazb commented 6 months ago

redshift-serverless RestoreFromSnapshot can only restore from snapshot to already exist namespace. So it can't create namespace. I suppose it is possible by calling the restore API after the resource is successfully created. But in that way is possibility to conflict with Provider Design Principles, isn't it?

@noel-phelt - the RestoreFromSnapshot isn't available from the aws_redshiftserverless_namespace TF resource.

topazb commented 6 months ago

@justinretzolk any update?