diff --git a/ibm/resource_ibm_is_virtual_endpoint_gateway.go b/ibm/resource_ibm_is_virtual_endpoint_gateway.go index 0df9718166..5e7c482358 100644 --- a/ibm/resource_ibm_is_virtual_endpoint_gateway.go +++ b/ibm/resource_ibm_is_virtual_endpoint_gateway.go @@ -162,9 +162,10 @@ func resourceIBMISEndpointGateway() *schema.Resource { Description: "The target crn", }, isVirtualEndpointGatewayTargetResourceType: { - Type: schema.TypeString, - Required: true, - Description: "The target resource type", + Type: schema.TypeString, + Required: true, + ValidateFunc: InvokeValidator("ibm_is_virtual_endpoint_gateway", isVirtualEndpointGatewayTargetResourceType), + Description: "The target resource type", }, }, }, @@ -198,6 +199,13 @@ func resourceIBMISEndpointGatewayValidator() *ResourceValidator { Regexp: `^[A-Za-z0-9:_ .-]+$`, MinValueLength: 1, MaxValueLength: 128}) + validateSchema = append(validateSchema, + ValidateSchema{ + Identifier: isVirtualEndpointGatewayTargetResourceType, + ValidateFunctionIdentifier: ValidateAllowedStringValue, + Type: TypeString, + Required: true, + AllowedValues: "provider_cloud_service, provider_infrastructure_service"}) ibmEndpointGatewayResourceValidator := ResourceValidator{ResourceName: "ibm_is_virtual_endpoint_gateway", Schema: validateSchema} return &ibmEndpointGatewayResourceValidator diff --git a/website/docs/r/is_virtual_endpoint_gateway.html.markdown b/website/docs/r/is_virtual_endpoint_gateway.html.markdown index af850265e3..2cac36c160 100644 --- a/website/docs/r/is_virtual_endpoint_gateway.html.markdown +++ b/website/docs/r/is_virtual_endpoint_gateway.html.markdown @@ -51,6 +51,16 @@ resource "ibm_is_virtual_endpoint_gateway" "endpoint_gateway3" { } resource_group = data.ibm_resource_group.test_acc.id } + +resource "ibm_is_virtual_endpoint_gateway" "endpoint_gateway3" { + name = "my-endpoint-gateway-1" + target { + crn = "crn:v1:bluemix:public:cloud-object-storage:global:::endpoint:s3.direct.mil01.cloud-object-storage.appdomain.cloud" + resource_type = "provider_cloud_service" + } + vpc = ibm_is_vpc.testacc_vpc.id + resource_group = data.ibm_resource_group.test_acc.id +} ``` ## Argument reference @@ -71,9 +81,9 @@ Review the argument references that you can specify for your resource. - `target` - (Required, List) The endpoint gateway target. Nested scheme for `target`: - - `crn` - (Optional, Forces new resource, String) The endpoint gateway target `CRN`. If CRN not specified, `name` must be specified. + - `crn` - (Optional, Forces new resource, String) The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service.. If CRN not specified, `name` must be specified. - `name` - (Required, Forces new resource, String) The endpoint gateway target name. - - `resource_type` - (Required, String) The endpoint gateway target resource type. + - `resource_type` - (Required, String) The endpoint gateway target resource type. The possible values are `provider_cloud_service`, `provider_infrastructure_service`. - `vpc` - (Required, Forces new resource, String) The VPC ID. **NOTE**: `ips` configured inline in this resource are not modifiable. Prefer using `ibm_is_virtual_endpoint_gateway_ip` resource to bind/unbind new reserved IPs to endpoint gateways and use the resource `ibm_is_subnet_reserved_ip` to create new reserved IP.