Ensure aws_rds_cluster can have storage_encrypted set to true
This commit is contained in:
parent
0085bf6ae8
commit
fc7e9fcd53
|
@ -37,6 +37,29 @@ func TestAccAWSRDSCluster_basic(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestAccAWSRDSCluster_encrypted(t *testing.T) {
|
||||
var v rds.DBCluster
|
||||
|
||||
ri := rand.New(rand.NewSource(time.Now().UnixNano())).Int()
|
||||
encConfig := fmt.Sprintf(testAccAWSClusterConfig_encrypted, ri)
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSClusterDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: encConfig,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSClusterExists("aws_rds_cluster.default", &v),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_rds_cluster.default", "storage_encrypted", "true"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestAccAWSRDSCluster_backupsUpdate(t *testing.T) {
|
||||
var v rds.DBCluster
|
||||
|
||||
|
@ -152,6 +175,16 @@ resource "aws_rds_cluster" "default" {
|
|||
master_password = "mustbeeightcharaters"
|
||||
}`
|
||||
|
||||
var testAccAWSClusterConfig_encrypted = `
|
||||
resource "aws_rds_cluster" "default" {
|
||||
cluster_identifier = "tf-aurora-cluster-%d"
|
||||
availability_zones = ["us-west-2a","us-west-2b","us-west-2c"]
|
||||
database_name = "mydb"
|
||||
master_username = "foo"
|
||||
master_password = "mustbeeightcharaters"
|
||||
storage_encrypted = true
|
||||
}`
|
||||
|
||||
var testAccAWSClusterConfig_backups = `
|
||||
resource "aws_rds_cluster" "default" {
|
||||
cluster_identifier = "tf-aurora-cluster-%d"
|
||||
|
|
Loading…
Reference in New Issue