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

resource/aws_api_gateway_stage: Remove deprecated (helper/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() #12467

Merged
merged 1 commit into from
Apr 1, 2020
Merged
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
25 changes: 0 additions & 25 deletions aws/resource_aws_api_gateway_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ func resourceAwsApiGatewayStage() *schema.Resource {
func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).apigatewayconn

d.Partial(true)

input := apigateway.CreateStageInput{
RestApiId: aws.String(d.Get("rest_api_id").(string)),
StageName: aws.String(d.Get("stage_name").(string)),
Expand Down Expand Up @@ -175,13 +173,6 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{})

d.SetId(fmt.Sprintf("ags-%s-%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string)))

d.SetPartial("rest_api_id")
d.SetPartial("stage_name")
d.SetPartial("deployment_id")
d.SetPartial("description")
d.SetPartial("variables")
d.SetPartial("xray_tracing_enabled")

if waitForCache && *out.CacheClusterStatus != apigateway.CacheClusterStatusNotAvailable {
stateConf := &resource.StateChangeConf{
Pending: []string{
Expand All @@ -202,10 +193,6 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{})
}
}

d.SetPartial("cache_cluster_enabled")
d.SetPartial("cache_cluster_size")
d.Partial(false)

if _, ok := d.GetOk("client_certificate_id"); ok {
return resourceAwsApiGatewayStageUpdate(d, meta)
}
Expand Down Expand Up @@ -288,8 +275,6 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er
func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).apigatewayconn

d.Partial(true)

stageArn := arn.ARN{
Partition: meta.(*AWSClient).partition,
Region: meta.(*AWSClient).region,
Expand Down Expand Up @@ -395,12 +380,6 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{})
return fmt.Errorf("Updating API Gateway Stage failed: %s", err)
}

d.SetPartial("client_certificate_id")
d.SetPartial("deployment_id")
d.SetPartial("description")
d.SetPartial("xray_tracing_enabled")
d.SetPartial("variables")

if waitForCache && *out.CacheClusterStatus != apigateway.CacheClusterStatusNotAvailable {
stateConf := &resource.StateChangeConf{
Pending: []string{
Expand All @@ -425,10 +404,6 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{})
}
}

d.SetPartial("cache_cluster_enabled")
d.SetPartial("cache_cluster_size")
d.Partial(false)

return resourceAwsApiGatewayStageRead(d, meta)
}

Expand Down