Skip to content

Commit

Permalink
Merge pull request #8887 from WhistleLabs/upgrade-0.12
Browse files Browse the repository at this point in the history
aws_elasticache_replication_group: Implement noop MigrateState for v0..v1
  • Loading branch information
bflad authored Jun 11, 2019
2 parents 3e0df56 + dbc10a0 commit 9f7859d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions aws/resource_aws_elasticache_replication_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/elasticache"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"github.com/hashicorp/terraform/terraform"
)

func resourceAwsElasticacheReplicationGroup() *schema.Resource {
Expand Down Expand Up @@ -224,6 +226,13 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource {
},
SchemaVersion: 1,

// SchemaVersion: 1 did not include any state changes via MigrateState.
// Perform a no-operation state upgrade for Terraform 0.12 compatibility.
// Future state migrations should be performed with StateUpgraders.
MigrateState: func(v int, inst *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) {
return inst, nil
},

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(60 * time.Minute),
Delete: schema.DefaultTimeout(40 * time.Minute),
Expand Down

0 comments on commit 9f7859d

Please sign in to comment.