Skip to content

Commit

Permalink
Documentation for endpoint gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
SunithaGudisagarIBM1 authored and hkantare committed Sep 2, 2021
1 parent 93f02c1 commit 31d4d80
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
14 changes: 11 additions & 3 deletions ibm/resource_ibm_is_virtual_endpoint_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
},
Expand Down Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions website/docs/r/is_virtual_endpoint_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 31d4d80

Please sign in to comment.