Skip to content

Commit

Permalink
docs(vpc): fix docs of vpc service (#1021)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhukun-Huawei authored Dec 1, 2023
1 parent 3d71452 commit 1173ff8
Show file tree
Hide file tree
Showing 20 changed files with 209 additions and 87 deletions.
6 changes: 3 additions & 3 deletions docs/data-sources/networking_port.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ subcategory: "Virtual Private Cloud (VPC)"

# flexibleengine_networking_port

Use this data source to get the ID of an available Flexibleengine port.
Use this data source to get the ID of an available FlexibleEngine port.

## Example Usage

Expand Down Expand Up @@ -40,12 +40,12 @@ In addition to all arguments above, the following attributes are exported:

* `name` - The name of the port.

* `admin_state_up` - The administrative state of the port.

* `device_owner` - The device owner of the port.

* `device_id` - The ID of the device the port belongs to.

* `all_allowed_ips` - The collection of allowed IP addresses on the port.

* `all_fixed_ips` - The collection of Fixed IP addresses on the port.

* `all_security_group_ids` - The collection of security group IDs applied on the port.
18 changes: 12 additions & 6 deletions docs/data-sources/vpc_peering_connection_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,24 @@ resource "flexibleengine_vpc_route_v2" "vpc_route" {
The arguments of this data source act as filters for querying the available VPC peering connection.
The given filters must match exactly one VPC peering connection whose data will be exported as attributes.

* `id` (Optional) - The ID of the specific VPC Peering Connection to retrieve.
* `region` - (Optional, String) The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs.
If omitted, the region argument of the provider is used.

* `status` (Optional) - The status of the specific VPC Peering Connection to retrieve.
* `id` (Optional, String) - The ID of the specific VPC Peering Connection to retrieve.

* `vpc_id` (Optional) - The ID of the requester VPC of the specific VPC Peering Connection to retrieve.
* `name` (Optional, String) - The name of the specific VPC Peering Connection to retrieve.

* `peer_vpc_id` (Optional) - The ID of the accepter/peer VPC of the specific VPC Peering Connection to retrieve.
* `status` (Optional, String) - The status of the specific VPC Peering Connection to retrieve.

* `peer_tenant_id` (Optional) - The Tenant ID of the accepter/peer VPC of the specific VPC Peering Connection to retrieve.
* `vpc_id` (Optional, String) - The ID of the requester VPC of the specific VPC Peering Connection to retrieve.

* `name` (Optional) - The name of the specific VPC Peering Connection to retrieve.
* `peer_vpc_id` (Optional, String) - The ID of the accepter/peer VPC of the specific VPC Peering Connection to retrieve.

* `peer_tenant_id` (Optional, String) - The Tenant ID of the accepter/peer VPC
of the specific VPC Peering Connection to retrieve.

## Attributes Reference

* `description` - The description of the VPC Peering Connection.

All of the argument attributes are exported as result attributes.
5 changes: 4 additions & 1 deletion docs/data-sources/vpc_route_ids_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ output "route_nexthop" {

## Argument Reference

* `vpc_id` (Required) - The VPC ID that you want to filter from.
* `region` - (Optional, String) The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs.
If omitted, the region argument of the provider is used.

* `vpc_id` (Required, String) - The VPC ID that you want to filter from.

## Attributes Reference

Expand Down
13 changes: 8 additions & 5 deletions docs/data-sources/vpc_route_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ The arguments of this data source act as filters for querying the available
routes in the current tenant. The given filters must match exactly one
route whose data will be exported as attributes.

* `id` (Optional) - The id of the specific route to retrieve.
* `region` - (Optional, String) The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs.
If omitted, the region argument of the provider is used.

* `vpc_id` (Optional) - The id of the VPC that the desired route belongs to.
* `id` (Optional, String) - The id of the specific route to retrieve.

* `destination` (Optional) - The route destination address (CIDR).
* `vpc_id` (Optional, String) - The id of the VPC that the desired route belongs to.

* `tenant_id` (Optional) - Only the administrator can specify the tenant ID of other tenants.
* `destination` (Optional, String) - The route destination address (CIDR).

* `type` (Optional) - Route type for filtering.
* `tenant_id` (Optional, String) - Only the administrator can specify the tenant ID of other tenants.

* `type` (Optional, String) - Route type for filtering.

## Attribute Reference

Expand Down
7 changes: 6 additions & 1 deletion docs/data-sources/vpc_subnet_ids_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ output "subnet_cidr_blocks" {

The following arguments are supported:

* `vpc_id` (Required) - Specifies the VPC ID used as the query filter.
* `region` - (Optional, String) The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs.
If omitted, the region argument of the provider is used.

* `vpc_id` (Required, String) - Specifies the VPC ID used as the query filter.

## Attributes Reference

The following attributes are exported:

* `id` - Specifies a data source ID in UUID format.

* `ids` - A list of all the subnet ids found. This data source will fail if none are found.
23 changes: 14 additions & 9 deletions docs/data-sources/vpc_subnet_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,28 @@ The arguments of this data source act as filters for querying the available
subnets in the current tenant. The given filters must match exactly one
subnet whose data will be exported as attributes.

* `id` - (Optional) - Specifies the ID in UUID format.
* `region` - (Optional, String) The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs.
If omitted, the region argument of the provider is used.

* `name` (Optional) - The name of the specific subnet to retrieve.
* `id` - (Optional, String) - Specifies the ID in UUID format.

* `cidr` (Optional) - The network segment of specific subnet to retrieve. The value must be in CIDR format.
* `name` (Optional, String) - The name of the specific subnet to retrieve.

* `status` (Optional) - The value can be ACTIVE, DOWN, UNKNOWN, or ERROR.
* `cidr` (Optional, String) - The network segment of specific subnet to retrieve. The value must be in CIDR format.

* `vpc_id` (Optional) - The id of the VPC that the desired subnet belongs to.
* `status` (Optional, String) - The value can be ACTIVE, DOWN, UNKNOWN, or ERROR.

* `gateway_ip` (Optional) - The subnet gateway address of specific subnet.
* `vpc_id` (Optional, String) - The id of the VPC that the desired subnet belongs to.

* `primary_dns` (Optional) - The IP address of DNS server 1 on the specific subnet.
* `gateway_ip` (Optional, String) - The subnet gateway address of specific subnet.

* `secondary_dns` (Optional) - The IP address of DNS server 2 on the specific subnet.
* `primary_dns` (Optional, String) - The IP address of DNS server 1 on the specific subnet.

* `availability_zone` (Optional) - The availability zone (AZ) to which the subnet should belong.
* `secondary_dns` (Optional, String) - The IP address of DNS server 2 on the specific subnet.

* `availability_zone` (Optional, String) - The availability zone (AZ) to which the subnet should belong.

* `description` - The description of the subnet.

## **Attributes Reference**

Expand Down
4 changes: 4 additions & 0 deletions docs/data-sources/vpc_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ The following attributes are exported:
* `shared` - Specifies whether the cross-tenant sharing is supported.

* `region` - See Argument Reference above.

* `routes.destination` - The destination network segment of a route.

* `routes.nexthop` - The next hop of a route.
3 changes: 3 additions & 0 deletions docs/data-sources/vpcep_endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ The `endpoints` block contains:
* `whitelist` - List of IP or CIDR block which can access the VPC endpoint.
* `private_domain_name` - DNS name pointing to the VPC endpoint ip.
* `tags` - The key/value pairs to associate with the VPC endpoint.
+ `key` - The tag key. Each tag key contains a maximum of 127 unicode characters but cannot be left blank.
+ `value` - The tag value list. Each value contains a maximum of 255 Unicode characters.
Before using values, delete SBC spaces before and after the value.
* `project_id` - The ID of the project holding the VPC endpoint.
* `created_at` - Creation date of the VPC endpoint.
* `updated_at` - Last update date of the VPC endpoint.
5 changes: 3 additions & 2 deletions docs/data-sources/vpcep_public_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ data "flexibleengine_vpcep_public_services" "dns_service" {

## Argument Reference

* `region` - (Optional, String) The region in which to obtain the public VPC endpoint services.
If omitted, the provider-level region will be used.

* `service_name` - (Optional, String) Specifies the name of the public VPC endpoint service.
The value is not case-sensitive and supports fuzzy match.

Expand All @@ -30,8 +33,6 @@ In addition to all arguments above, the following attributes are exported:

* `id` - Specifies a data source ID in UUID format.

* `region` - The region in which to obtain the public VPC endpoint services.

* `services` - Indicates the public VPC endpoint services information. Structure is documented below.

The `services` block contains:
Expand Down
28 changes: 18 additions & 10 deletions docs/resources/networking_secgroup_rule_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ resource "flexibleengine_networking_secgroup_rule_v2" "secgroup_rule_1" {

The following arguments are supported:

* `region` - (Optional) The region in which to obtain the V2 networking client.
* `region` - (Optional, String, ForceNew) The region in which to obtain the V2 networking client.
A networking client is needed to create a port. If omitted, the
`region` argument of the provider is used. Changing this creates a new
security group rule.

* `security_group_id` - (Required) The security group ID the rule should belong
* `security_group_id` - (Required, String, ForceNew) The security group ID the rule should belong
to. Changing this creates a new security group rule.

* `direction` - (Required) The direction of the rule, valid values are **ingress**
* `direction` - (Required, String, ForceNew) The direction of the rule, valid values are **ingress**
or **egress**. Changing this creates a new security group rule.

* `ethertype` - (Required) The layer 3 protocol type, valid values are **IPv4**
* `ethertype` - (Required, String, ForceNew) The layer 3 protocol type, valid values are **IPv4**
or **IPv6**. Changing this creates a new security group rule.

* `protocol` - (Optional) The layer 4 protocol type, valid values are following.
* `protocol` - (Optional, String, ForceNew) The layer 4 protocol type, valid values are following.
Changing this creates a new security group rule. This is required if you want to specify a port range.
+ **tcp**
+ **udp**
Expand All @@ -69,22 +69,24 @@ The following arguments are supported:
+ **udplite**
+ **vrrp**

* `port_range_min` - (Optional) The lower part of the allowed port range, valid
* `port_range_min` - (Optional, Int, ForceNew) The lower part of the allowed port range, valid
integer value needs to be between 1 and 65535. Changing this creates a new
security group rule.

* `port_range_max` - (Optional) The higher part of the allowed port range, valid
* `port_range_max` - (Optional, Int, ForceNew) The higher part of the allowed port range, valid
integer value needs to be between 1 and 65535. Changing this creates a new
security group rule.

* `remote_ip_prefix` - (Optional) The remote CIDR, the value needs to be a valid
* `remote_ip_prefix` - (Optional, String, ForceNew) The remote CIDR, the value needs to be a valid
CIDR (i.e. 192.168.0.0/16). Changing this creates a new security group rule.

* `remote_group_id` - (Optional) The remote group id, the value needs to be an
* `remote_group_id` - (Optional, String, ForceNew) The remote group id, the value needs to be an
FlexibleEngine ID of a security group in the same tenant. Changing this creates
a new security group rule.

* `description` - (Optional) Specifies the supplementary information about the security group rule.
* `tenant_id` - (Optional, String, ForceNew) The owner of the security group.

* `description` - (Optional, String, ForceNew) Specifies the supplementary information about the security group rule.
This parameter can contain a maximum of 255 characters and cannot contain angle brackets (< or >).
Changing this creates a new security group rule.

Expand All @@ -94,6 +96,12 @@ In addition to all arguments above, the following attributes are exported:

* `id` - The resource ID in UUID format.

## Timeouts

This resource provides the following timeouts configuration options:

* `delete` - Default is 10 minute.

## Import

Security Group Rules can be imported using the `id`, e.g.
Expand Down
16 changes: 12 additions & 4 deletions docs/resources/networking_secgroup_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@ resource "flexibleengine_networking_secgroup_v2" "example_secgroup" {

The following arguments are supported:

* `region` - (Optional) The region in which to obtain the V2 networking client.
* `region` - (Optional, String) The region in which to obtain the V2 networking client.
A networking client is needed to create a port. If omitted, the
`region` argument of the provider is used. Changing this creates a new
security group.

* `name` - (Required) A unique name for the security group.
* `name` - (Required, String) A unique name for the security group.

* `description` - (Optional) A unique name for the security group.
* `description` - (Optional, String) A unique name for the security group.

* `delete_default_rules` - (Optional) Whether or not to delete the default
* `delete_default_rules` - (Optional, String) Whether or not to delete the default
egress security rules. This is `false` by default. See the below note
for more information.

* `tenant_id` - (Optional, String, ForceNew) The owner of the security group.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:
Expand Down Expand Up @@ -68,6 +70,12 @@ behavior. Some FlexibleEngine clouds might provide additional rules and some mig
not provide any rules at all (in which case the `delete_default_rules` setting
is moot).

## Timeouts

This resource provides the following timeouts configuration options:

* `delete` - Default is 10 minute.

## Import

Security Groups can be imported using the `id`, e.g.
Expand Down
9 changes: 8 additions & 1 deletion docs/resources/vpc_flow_log_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,17 @@ In addition to all arguments above, the following attributes are exported:

* `status` - The status of the flow log. The value can be `ACTIVE`, `DOWN` or `ERROR`.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 10 minute.
* `delete` - Default is 10 minute.

## Import

VPC flow logs can be imported using the `id`, e.g.

```sh
```shell
terraform import flexibleengine_vpc_flow_log_v1.flowlog1 41b9d73f-eb1c-4795-a100-59a99b062513
```
18 changes: 14 additions & 4 deletions docs/resources/vpc_peering_connection_accepter_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@ resource "flexibleengine_vpc_peering_connection_accepter_v2" "peer" {

The following arguments are supported:

* `vpc_peering_connection_id` (Required) - The VPC Peering Connection ID to manage.
* `region` - (Optional, String, ForceNew) Specifies the region in which to create the VPC peering connection accepter.
If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection accepter.

* `vpc_peering_connection_id` (Required, String, ForceNew) - The VPC Peering Connection ID to manage.
Changing this creates a new VPC peering connection accepter.

* `accept` (Optional)- Whether or not to accept the peering request. Defaults to `false`.
* `accept` (Optional, Bool)- Whether or not to accept the peering request. Defaults to `false`.

## Removing flexibleengine_vpc_peering_connection_accepter_v2 from your configuration

Expand All @@ -90,10 +93,10 @@ from your state file and management, but will not destroy the VPC Peering Connec

All of the argument attributes except accept are also exported as result attributes.

* `name` - The VPC peering connection name.

* `id` - The VPC peering connection ID.

* `name` - The VPC peering connection name.

* `status` - The VPC peering connection status.

* `vpc_id` - The ID of requester VPC involved in a VPC peering connection.
Expand All @@ -102,6 +105,13 @@ All of the argument attributes except accept are also exported as result attribu

* `peer_tenant_id` - The Tenant Id of the accepter tenant.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 10 minute.
* `delete` - Default is 10 minute.

## Import

VPC Peering Connection Accepter can be imported using the VPC Peering Connection ID `vpc_peering_connection_id`, e.g.
Expand Down
22 changes: 17 additions & 5 deletions docs/resources/vpc_peering_connection_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,20 @@ resource "flexibleengine_vpc_peering_connection_v2" "peering" {

The following arguments are supported:

* `name` (Required) - Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
* `region` - (Optional, String, ForceNew) Specifies the region in which to create the VPC peering connection.
If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection.

* `vpc_id` (Required) - Specifies the ID of a VPC involved in a VPC peering connection.
* `name` (Required, String) - Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.

* `vpc_id` (Required, String, ForceNew) - Specifies the ID of a VPC involved in a VPC peering connection.
Changing this creates a new VPC peering connection.

* `peer_vpc_id` (Required, String, ForceNew) - Specifies the VPC ID of the accepter tenant.
Changing this creates a new VPC peering connection.

* `peer_vpc_id` (Required) - Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
* `peer_tenant_id` (Optional, String, ForceNew) - Specified the Tenant Id of the accepter tenant.
Changing this creates a new VPC peering connection.

* `peer_tenant_id` (Optional) - Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.

## Attributes Reference

All of the argument attributes are also exported as
Expand All @@ -53,6 +58,13 @@ result attributes:

* `status` - The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 10 minute.
* `delete` - Default is 10 minute.

## Import

VPC Peering resources can be imported using the `vpc peering id`, e.g.
Expand Down
Loading

0 comments on commit 1173ff8

Please sign in to comment.