diff --git a/docs/data-sources/vpc_peering_connection_v2.md b/docs/data-sources/vpc_peering_connection_v2.md index 4d63b2b1..579e6ddc 100644 --- a/docs/data-sources/vpc_peering_connection_v2.md +++ b/docs/data-sources/vpc_peering_connection_v2.md @@ -43,8 +43,8 @@ The given filters must match exactly one VPC peering connection whose data will * `peer_tenant_id` (Optional, String) - The Tenant ID of the accepter/peer VPC of the specific VPC Peering Connection to retrieve. -## Attributes Reference +## Attribute Reference -* `description` - The description of the VPC Peering Connection. +All the arguments above can also be exported attributes. -All of the argument attributes are exported as result attributes. +* `description` - The description of the VPC Peering Connection. diff --git a/docs/data-sources/vpc_subnet_v1.md b/docs/data-sources/vpc_subnet_v1.md index a2fb4473..b87f5962 100644 --- a/docs/data-sources/vpc_subnet_v1.md +++ b/docs/data-sources/vpc_subnet_v1.md @@ -51,12 +51,11 @@ subnet whose data will be exported as attributes. * `description` - The description of the subnet. -## **Attributes Reference** +## Attribute Reference -All of the argument attributes are also exported as -result attributes. This data source will complete the data by populating -any fields that are not included in the configuration with the data for -the selected subnet. +All the argument attributes are also exported as result attributes. +This data source will complete the data by populating any fields that are not included in the configuration with the +data for the selected subnet. * `dns_list` - The IP address list of DNS servers on the subnet. diff --git a/docs/resources/networking_vip_associate_v2.md b/docs/resources/networking_vip_associate_v2.md index 832b77ef..d115e580 100644 --- a/docs/resources/networking_vip_associate_v2.md +++ b/docs/resources/networking_vip_associate_v2.md @@ -46,16 +46,32 @@ resource "flexibleengine_networking_vip_associate_v2" "vip_associate_1" { The following arguments are supported: -* `vip_id` - (Required) The ID of vip to attach the port to. +* `region` - (Optional, String, ForceNew) The region in which to create the vip associate resource. If omitted, the + provider-level region will be used. + +* `vip_id` - (Required, String, ForceNew) The ID of vip to attach the port to. Changing this creates a new vip associate. -* `port_ids` - (Required) An array of one or more IDs of the ports to attach the vip to. +* `port_ids` - (Required, List) An array of one or more IDs of the ports to attach the vip to. Changing this creates a new vip associate. -## Attributes Reference +## Attribute Reference In addition to all arguments above, the following attributes are exported: * `id` - The resource ID. + * `vip_subnet_id` - The ID of the subnet this vip connects to. + * `vip_ip_address` - The IP address in the subnet for this vip. + +* `ip_addresses` - The IP addresses of ports to attach the vip to. + +## Import + +Vip associate can be imported using the `vip_id` and port IDs separated by slashes (no limit on the number of +port IDs), e.g. + +```shell +terraform import flexibleengine_networking_vip_associate.vip_associated vip_id/port1_id/port2_id +``` diff --git a/docs/resources/vpc_peering_connection_v2.md b/docs/resources/vpc_peering_connection_v2.md index 696b302e..c6e4ad47 100644 --- a/docs/resources/vpc_peering_connection_v2.md +++ b/docs/resources/vpc_peering_connection_v2.md @@ -49,10 +49,11 @@ The following arguments are supported: * `peer_tenant_id` (Optional, String, ForceNew) - Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection. -## Attributes Reference +* `description` - (Optional, String) Specifies the description of the VPC peering connection. -All of the argument attributes are also exported as -result attributes: +## Attribute Reference + +All the arguments above can also be exported attributes. * `id` - The VPC peering connection ID. diff --git a/flexibleengine/provider.go b/flexibleengine/provider.go index 5a861c87..4fe3f604 100644 --- a/flexibleengine/provider.go +++ b/flexibleengine/provider.go @@ -248,11 +248,9 @@ func Provider() *schema.Provider { "flexibleengine_kms_key_v1": dataSourceKmsKeyV1(), "flexibleengine_kms_data_key_v1": dataSourceKmsDataKeyV1(), - "flexibleengine_vpc_v1": dataSourceVirtualPrivateCloudVpcV1(), - "flexibleengine_vpc_subnet_v1": dataSourceVpcSubnetV1(), - "flexibleengine_vpc_subnet_ids_v1": dataSourceVpcSubnetIdsV1(), - "flexibleengine_vpc_peering_connection_v2": dataSourceVpcPeeringConnectionV2(), - "flexibleengine_vpc_eip": dataSourceVpcEipV1(), + "flexibleengine_vpc_v1": dataSourceVirtualPrivateCloudVpcV1(), + "flexibleengine_vpc_subnet_ids_v1": dataSourceVpcSubnetIdsV1(), + "flexibleengine_vpc_eip": dataSourceVpcEipV1(), "flexibleengine_nat_gateway_v2": dataSourceNatGatewayV2(), @@ -373,9 +371,12 @@ func Provider() *schema.Provider { "flexibleengine_smn_topics": smn.DataSourceTopics(), "flexibleengine_smn_message_templates": smn.DataSourceSmnMessageTemplates(), "flexibleengine_sms_source_servers": sms.DataSourceServers(), - "flexibleengine_vpc_route_table": vpc.DataSourceVPCRouteTable(), - "flexibleengine_vpc_subnets": vpc.DataSourceVpcSubnets(), - "flexibleengine_vpcs": vpc.DataSourceVpcs(), + + "flexibleengine_vpc_peering_connection_v2": vpc.DataSourceVpcPeeringConnectionV2(), + "flexibleengine_vpc_route_table": vpc.DataSourceVPCRouteTable(), + "flexibleengine_vpc_subnet_v1": vpc.DataSourceVpcSubnetV1(), + "flexibleengine_vpc_subnets": vpc.DataSourceVpcSubnets(), + "flexibleengine_vpcs": vpc.DataSourceVpcs(), "flexibleengine_waf_certificate": waf.DataSourceWafCertificateV1(), "flexibleengine_waf_dedicated_instances": waf.DataSourceWafDedicatedInstancesV1(), @@ -480,8 +481,7 @@ func Provider() *schema.Provider { "flexibleengine_rds_read_replica_v3": resourceRdsReadReplicaInstance(), "flexibleengine_rds_parametergroup_v3": resourceRdsConfigurationV3(), - "flexibleengine_networking_vip_v2": resourceNetworkingVIPV2(), - "flexibleengine_networking_vip_associate_v2": resourceNetworkingVIPAssociateV2(), + "flexibleengine_networking_vip_v2": resourceNetworkingVIPV2(), "flexibleengine_drs_replication_v2": resourceReplication(), "flexibleengine_drs_replicationconsistencygroup_v2": resourceReplicationConsistencyGroup(), @@ -492,7 +492,6 @@ func Provider() *schema.Provider { "flexibleengine_vpc_eip": resourceVpcEIPV1(), "flexibleengine_vpc_flow_log_v1": resourceVpcFlowLogV1(), - "flexibleengine_vpc_peering_connection_v2": resourceVpcPeeringConnectionV2(), "flexibleengine_vpc_peering_connection_accepter_v2": resourceVpcPeeringConnectionAccepterV2(), "flexibleengine_sfs_file_system_v2": resourceSFSFileSystemV2(), @@ -658,9 +657,11 @@ func Provider() *schema.Provider { "flexibleengine_tms_tags": tms.ResourceTmsTag(), - "flexibleengine_vpc_eip_associate": eip.ResourceEIPAssociate(), - "flexibleengine_vpc_route_table": vpc.ResourceVPCRouteTable(), - "flexibleengine_vpc_route": vpc.ResourceVPCRouteTableRoute(), + "flexibleengine_vpc_eip_associate": eip.ResourceEIPAssociate(), + "flexibleengine_networking_vip_associate_v2": vpc.ResourceNetworkingVIPAssociateV2(), + "flexibleengine_vpc_peering_connection_v2": vpc.ResourceVpcPeeringConnectionV2(), + "flexibleengine_vpc_route_table": vpc.ResourceVPCRouteTable(), + "flexibleengine_vpc_route": vpc.ResourceVPCRouteTableRoute(), "flexibleengine_waf_dedicated_instance": ResourceWafDedicatedInstance(), "flexibleengine_waf_dedicated_policy": ResourceWafDedicatedPolicyV1(), diff --git a/flexibleengine/resource_flexibleengine_vpc_peering_connection_v2_test.go b/flexibleengine/resource_flexibleengine_vpc_peering_connection_v2_test.go index 5025742f..3d5389f7 100644 --- a/flexibleengine/resource_flexibleengine_vpc_peering_connection_v2_test.go +++ b/flexibleengine/resource_flexibleengine_vpc_peering_connection_v2_test.go @@ -109,6 +109,7 @@ resource "flexibleengine_vpc_peering_connection_v2" "peering_1" { name = "flexibleengine_peering" vpc_id = flexibleengine_vpc_v1.vpc_1.id peer_vpc_id = flexibleengine_vpc_v1.vpc_2.id + description = "tf test1" } ` const testAccFlexibleEngineVpcPeeringConnectionV2_update = ` @@ -126,5 +127,6 @@ resource "flexibleengine_vpc_peering_connection_v2" "peering_1" { name = "flexibleengine_peering_1" vpc_id = flexibleengine_vpc_v1.vpc_1.id peer_vpc_id = flexibleengine_vpc_v1.vpc_2.id + description = "tf update" } `