Skip to content

fix(vpc): [123456789] reserve ip address #2977

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

Merged
merged 2 commits into from
Nov 27, 2024
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
3 changes: 2 additions & 1 deletion tencentcloud/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ Virtual Private Cloud(VPC)
tencentcloud_protocol_template_group
tencentcloud_route_table
tencentcloud_vpc_private_nat_gateway
tencentcloud_route_table_association
tencentcloud_route_table_association
tencentcloud_route_entry
tencentcloud_route_table_entry
tencentcloud_dnat
Expand All @@ -1275,6 +1275,7 @@ Virtual Private Cloud(VPC)
tencentcloud_vpc_bandwidth_package
tencentcloud_vpc_bandwidth_package_attachment
tencentcloud_ipv6_address_bandwidth
tencentcloud_reserve_ip_address

Private Link(PLS)
Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func resourceTencentCloudReserveIpAddressUpdate(d *schema.ResourceData, meta int

ctx := tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta)

immutableArgs := []string{"vpc_id", "ip_addresses", "subnet_id"}
immutableArgs := []string{"vpc_id", "ip_address", "subnet_id"}
for _, v := range immutableArgs {
if d.HasChange(v) {
return fmt.Errorf("argument `%s` cannot be changed", v)
Expand Down
59 changes: 59 additions & 0 deletions website/docs/r/reserve_ip_address.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
subcategory: "Virtual Private Cloud(VPC)"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_reserve_ip_address"
sidebar_current: "docs-tencentcloud-resource-reserve_ip_address"
description: |-
Provides a resource to create a vpc reserve ip addresses
---

# tencentcloud_reserve_ip_address

Provides a resource to create a vpc reserve ip addresses

## Example Usage

```hcl
resource "tencentcloud_reserve_ip_address" "reserve_ip" {
vpc_id = "xxxxxx"
subnet_id = "xxxxxx"
ip_address = "10.0.0.13"
name = "reserve-ip-tf"
description = "description"
tags = {
"test1" = "test1"
}
}
```

## Argument Reference

The following arguments are supported:

* `vpc_id` - (Required, String) VPC unique ID.
* `description` - (Optional, String) The IP description is retained on the intranet.
* `ip_address` - (Optional, String) Specify the reserved IP address of the intranet for which the IP application is requested.
* `name` - (Optional, String) The IP name is reserved for the intranet.
* `subnet_id` - (Optional, String) Subnet ID.
* `tags` - (Optional, Map) Tags.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `id` - ID of the resource.
* `created_time` - Created time.
* `ip_type` - Ip type for product application.
* `reserve_ip_id` - Reserve ip ID.
* `resource_id` - The intranet retains the resource instance ID bound to the IPs.
* `state` - Binding status.


## Import

vpc reserve_ip_addresses can be imported using the id, e.g.

```
terraform import tencentcloud_reserve_ip_addresses.reserve_ip_addresses ${vpcId}#${reserveIpId}
```

3 changes: 3 additions & 0 deletions website/tencentcloud.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6400,6 +6400,9 @@
<li>
<a href="/docs/providers/tencentcloud/r/protocol_template_group.html">tencentcloud_protocol_template_group</a>
</li>
<li>
<a href="/docs/providers/tencentcloud/r/reserve_ip_address.html">tencentcloud_reserve_ip_address</a>
</li>
<li>
<a href="/docs/providers/tencentcloud/r/route_entry.html">tencentcloud_route_entry</a>
</li>
Expand Down
Loading