terraform-provider-cloudfoundry icon indicating copy to clipboard operation
terraform-provider-cloudfoundry copied to clipboard

upgrade lifecycle management for particular space on cloudfoundry_sec_group function

Open jyriok opened this issue 6 years ago • 1 comments

Hi,

Sometime , we need to use different security groups during running or staging for same Org/Space. but this feature is not currently available with this provider.

this functionnality is already available on cloudfoundry via this api call :

PUT /v2/security_groups/:guid/staging_spaces/:space_guid

https://apidocs.cloudfoundry.org/263/security_groups/associate_space_with_the_security_group_for_staging.html

CF cli use thie method GetSecurityGroupStagingSpacesRequest for this kind of call

( Line 105 : https://github.com/cloudfoundry/cli/blob/v6.32.0/api/cloudcontroller/ccv2/internal/api_routes.go )

called by function AssociateSpaceWithStagingSecurityGroup ( line 93 : https://github.com/cloudfoundry/cli/blob/v6.32.0/api/cloudcontroller/ccv2/security_group.go )

So, idea here is to integrate/adapt this code to the terraform provider for be able to use this on a space. Remain to define where this param need to be set : on "space" or "securityGroup" parts

thanks

jyriok avatar Jun 13 '18 16:06 jyriok