Skip to content

Commit

Permalink
Merge pull request #15537 from terraform-providers/b-aws_db_proxy_tar…
Browse files Browse the repository at this point in the history
…get-fixes

service/rds: Increase default proxy deletion timeout, ensure proxy target import includes all attributes
  • Loading branch information
gdavison authored Oct 8, 2020
2 parents 4d7b28e + 033a858 commit 34fd4af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aws/resource_aws_db_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func resourceAwsDbProxy() *schema.Resource {
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(30 * time.Minute),
Update: schema.DefaultTimeout(30 * time.Minute),
Delete: schema.DefaultTimeout(30 * time.Minute),
Delete: schema.DefaultTimeout(60 * time.Minute),
},

Schema: map[string]*schema.Schema{
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_db_proxy_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ func resourceAwsDbProxyTargetRead(d *schema.ResourceData, meta interface{}) erro
return nil
}

d.Set("db_proxy_name", dbProxyName)
d.Set("endpoint", dbProxyTarget.Endpoint)
d.Set("port", dbProxyTarget.Port)
d.Set("rds_resource_id", dbProxyTarget.RdsResourceId)
d.Set("target_arn", dbProxyTarget.TargetArn)
d.Set("target_group_name", targetGroupName)
d.Set("tracked_cluster_id", dbProxyTarget.TrackedClusterId)
d.Set("type", dbProxyTarget.Type)

Expand Down
3 changes: 1 addition & 2 deletions website/docs/r/db_proxy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ The following arguments are supported:
* `role_arn` - (Required) The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in AWS Secrets Manager.
* `vpc_security_group_ids` - (Optional) One or more VPC security group IDs to associate with the new proxy.
* `vpc_subnet_ids` - (Required) One or more VPC subnet IDs to associate with the new proxy.
describe-db-parameters.html) after initial creation of the group.
* `tags` - (Optional) A mapping of tags to assign to the resource.

`auth` blocks support the following:
Expand All @@ -75,7 +74,7 @@ In addition to all arguments above, the following attributes are exported:

- `create` - (Default `30 minutes`) Used for creating DB proxies.
- `update` - (Default `30 minutes`) Used for modifying DB proxies.
- `delete` - (Default `30 minutes`) Used for destroying DB proxies.
- `delete` - (Default `60 minutes`) Used for destroying DB proxies.

## Import

Expand Down

0 comments on commit 34fd4af

Please sign in to comment.