mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/aws: Respect 'selection_pattern' in api_gateway_integration_response
- Fixes https://github.com/hashicorp/terraform/issues/5891
This commit is contained in:
parent
5210e1127e
commit
70242c2e6d
@ -66,7 +66,7 @@ func resourceAwsApiGatewayIntegrationResponseCreate(d *schema.ResourceData, meta
|
||||
templates[k] = v.(string)
|
||||
}
|
||||
|
||||
_, err := conn.PutIntegrationResponse(&apigateway.PutIntegrationResponseInput{
|
||||
input := apigateway.PutIntegrationResponseInput{
|
||||
HttpMethod: aws.String(d.Get("http_method").(string)),
|
||||
ResourceId: aws.String(d.Get("resource_id").(string)),
|
||||
RestApiId: aws.String(d.Get("rest_api_id").(string)),
|
||||
@ -74,7 +74,11 @@ func resourceAwsApiGatewayIntegrationResponseCreate(d *schema.ResourceData, meta
|
||||
ResponseTemplates: aws.StringMap(templates),
|
||||
// TODO implement once [GH-2143](https://github.com/hashicorp/terraform/issues/2143) has been implemented
|
||||
ResponseParameters: nil,
|
||||
})
|
||||
}
|
||||
if v, ok := d.GetOk("selection_pattern"); ok {
|
||||
input.SelectionPattern = aws.String(v.(string))
|
||||
}
|
||||
_, err := conn.PutIntegrationResponse(&input)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error creating API Gateway Integration Response: %s", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user