Skip to content
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

Documentation for endpoint gateway #3034

Merged
merged 1 commit into from
Sep 2, 2021
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
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