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

[FEATURE] Assign existing security groups to a space #81

Closed
rahearn opened this issue Nov 20, 2024 · 5 comments · Fixed by #82
Closed

[FEATURE] Assign existing security groups to a space #81

rahearn opened this issue Nov 20, 2024 · 5 comments · Fixed by #82
Assignees
Labels
enhancement New feature or request

Comments

@rahearn
Copy link

rahearn commented Nov 20, 2024

What area do you want to see improved?

terraform provider

Is your feature request related to a problem? Please describe.

There doesn't appear to be a way to assign an existing named security group to a space, either on space creation or as a separate resource.

Describe the solution you would like

I'd like to be able to do something like the following:

data "cloudfoundry_security_group" "trusted_egress" {
  name = "existing_egress_security_group"
}

resource "cloudfoundry_space" "app_space" {
  org = local.org_id
  name = local.space_name
}

resource "cloudfoundry_bound_security_group" "space_egress" {
  security_group = data.cloudfoundry_security_group.trusted_egress.id
  type = "running"
  spaces = [cloudfoundry_space.app_space.id]
}

Describe alternatives you have considered

The existing cloudfoundry_security_group resource is not accessible at the level of permission that I have, which can call both cf create-space and cf bind-security-group if I were using the CLI, so there do not appear to be any alternatives within this provider.

Additional context

No response

@rahearn rahearn added the enhancement New feature or request label Nov 20, 2024
Copy link

Thanks for the feature request. We evaluate it and update the issue accordingly.

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@vipinvkmenon
Copy link
Contributor

Considering the API is designed, we will need to create a new resource for managing bindings.

@rahearn
Copy link
Author

rahearn commented Nov 21, 2024

Considering the API is designed, we will need to create a new resource for managing bindings.

Agreed, I updated my described solution to take into account the shape of the API. I'd be happy to work on this in a couple weeks when I have time if it hasn't been picked up by then. If I do so, does the community have any thoughts on the best name for the new resource?

I see it's assigned already though, is that to do the work, or just to triage further?

@vipinvkmenon
Copy link
Contributor

Its been assigned for immediate pickup @rahearn
considering the API documentation and the cf-cli and intuitive name for the resource would be security_group_binding and lifecycle = running/staging etc..

@Dray56
Copy link
Contributor

Dray56 commented Nov 27, 2024

It would be better to have attributes running_spaces and staging_spaces similar to that of security_group resource instead.
I think security_group_space_bindings would be more apt as a name. This makes it specific and obvious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants