As an end user of IBM Cloud provider, I should be able to create Cloud Foundry Route resource
ashishth09 opened this issue · 5 comments
ashishth09 commented
This would be useful for assigning routes to applications
hkantare commented
The schema for route
Schema: map[string]*schema.Schema{
"host": {
Type: schema.TypeString,
Optional: true,
Description: "The host portion of the route.Required for shared-domains.",
},
"space_guid": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: "The guid of the associated space",
},
"domain_guid": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: "The guid of the associated domain",
},
"port": {
Description: "The port of the route. Supported for domains of TCP router groups only.",
Optional: true,
Type: schema.TypeInt,
},
"path": {
Description: "The path for a route as raw text.Paths must be between 2 and 128 characters.Paths must start with a forward slash '/'.Paths must not contain a '?'",
Optional: true,
Type: schema.TypeString,
},
},
hkantare commented
Here is the sample tf configuration example of route
data "ibmcloud_cf_org" "org" {
org = "someexample.com"
}
data "ibmcloud_cf_space" "spacedata" {
space = "space"
org = "someexample.com"
}
data "ibmcloud_cf_domain" "domain" {
name = "mybluemix.net"
org_guid = "${data.ibmcloud_cf_org.org.id}"
type = "shared"
}
resource "ibmcloud_cf_route" "route" {
domain_guid = "${data.ibmcloud_cf_domain.domain.id}"
space_guid = "${data.ibmcloud_cf_space.spacedata.id}"
host = "somehost172"
path = "/app"
}
hkantare commented
We are facing an issue with optional fields
1)When we declare omitempty in bluemix-go for parameters then user is not able to update the parameter to empty.
2)If we don't declare omitempty and perform update then the parametes for which the values has not been changed is passing as empty in body of API request .
ashishth09 commented
@hkantare , please pick the latest bluemix-go client
ashishth09 commented
PR #114