Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service/route53resolver: Remove deprecated (helper/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() #12460

Merged
merged 1 commit into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions aws/resource_aws_route53_resolver_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ func resourceAwsRoute53ResolverEndpointRead(d *schema.ResourceData, meta interfa
func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).route53resolverconn

d.Partial(true)
if d.HasChange("name") {
req := &route53resolver.UpdateResolverEndpointInput{
ResolverEndpointId: aws.String(d.Id()),
Expand All @@ -215,8 +214,6 @@ func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta inter
if err != nil {
return err
}

d.SetPartial("name")
}

if d.HasChange("ip_address") {
Expand Down Expand Up @@ -260,19 +257,15 @@ func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta inter
return err
}
}

d.SetPartial("ip_address")
}

if d.HasChange("tags") {
o, n := d.GetChange("tags")
if err := keyvaluetags.Route53resolverUpdateTags(conn, d.Get("arn").(string), o, n); err != nil {
return fmt.Errorf("error updating Route53 Resolver endpoint (%s) tags: %s", d.Get("arn").(string), err)
}
d.SetPartial("tags")
}

d.Partial(false)
return resourceAwsRoute53ResolverEndpointRead(d, meta)
}

Expand Down
7 changes: 0 additions & 7 deletions aws/resource_aws_route53_resolver_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ func resourceAwsRoute53ResolverRuleRead(d *schema.ResourceData, meta interface{}
func resourceAwsRoute53ResolverRuleUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).route53resolverconn

d.Partial(true)
if d.HasChange("name") || d.HasChange("resolver_endpoint_id") || d.HasChange("target_ip") {
req := &route53resolver.UpdateResolverRuleInput{
ResolverRuleId: aws.String(d.Id()),
Expand Down Expand Up @@ -216,21 +215,15 @@ func resourceAwsRoute53ResolverRuleUpdate(d *schema.ResourceData, meta interface
if err != nil {
return err
}

d.SetPartial("name")
d.SetPartial("resolver_endpoint_id")
d.SetPartial("target_ip")
}

if d.HasChange("tags") {
o, n := d.GetChange("tags")
if err := keyvaluetags.Route53resolverUpdateTags(conn, d.Get("arn").(string), o, n); err != nil {
return fmt.Errorf("error updating Route53 Resolver rule (%s) tags: %s", d.Get("arn").(string), err)
}
d.SetPartial("tags")
}

d.Partial(false)
return resourceAwsRoute53ResolverRuleRead(d, meta)
}

Expand Down