Skip to content

Resource: awsRedshiftSnapshotScheduleAssociation

Example 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 awsRedshiftClusterDefault = new aws.redshiftCluster.RedshiftCluster(
  this,
  "default",
  {
    clusterIdentifier: "tf-redshift-cluster",
    clusterType: "single-node",
    databaseName: "mydb",
    masterPassword: "Mustbe8characters",
    masterUsername: "foo",
    nodeType: "dc1.large",
  }
);
const awsRedshiftSnapshotScheduleDefault =
  new aws.redshiftSnapshotSchedule.RedshiftSnapshotSchedule(this, "default_1", {
    definitions: ["rate(12 hours)"],
    identifier: "tf-redshift-snapshot-schedule",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsRedshiftSnapshotScheduleDefault.overrideLogicalId("default");
const awsRedshiftSnapshotScheduleAssociationDefault =
  new aws.redshiftSnapshotScheduleAssociation.RedshiftSnapshotScheduleAssociation(
    this,
    "default_2",
    {
      clusterIdentifier: awsRedshiftClusterDefault.id,
      scheduleIdentifier: awsRedshiftSnapshotScheduleDefault.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsRedshiftSnapshotScheduleAssociationDefault.overrideLogicalId("default");

Argument Reference

The following arguments are supported:

  • clusterIdentifier - (Required, Forces new resource) The cluster identifier.
  • scheduleIdentifier - (Required, Forces new resource) The snapshot schedule identifier.

Attributes Reference

No additional attributes are exported.

Import

Redshift Snapshot Schedule Association can be imported using the <clusterIdentifier>/<scheduleIdentifier>, e.g.,

$ terraform import aws_redshift_snapshot_schedule_association.default tf-redshift-cluster/tf-redshift-snapshot-schedule