orange-cloudfoundry / terraform-provider-cloudfoundry

A terraform provider to manage a Cloud Foundry instance.
Apache License 2.0
31 stars 8 forks source link

upgrade lifecycle management for particular space on cloudfoundry_sec_group function #38

Open jyriok opened 6 years ago

jyriok commented 6 years ago

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

janosbinder commented 6 years ago

This plugin has been deprecated in favour of https://github.com/mevansam/terraform-provider-cf/