Skip to content

Add ability to skip detach on destroy for google_compute_shared_vpc_service_project #13699

Open
@steffencircle

Description

@steffencircle

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

It would be extremely helpful for us, if the resource google_compute_shared_vpc_service_project would support a boolean switch which allows to control the behavior on destroy.

A similar switch (disable_on_destroy) already exists for the resource google_project_service.

The scenario is as follows:
We are running a Shared VPC setup and use a module for the deployment of a subnet.
The module includes everything that's required starting from enabling the compute API, attachment to host-project, subnet itself etc. etc.

For multiple subnets, multiple instances of the module are called.

The issue occurs, when one subnet shall be removed and we remove the module call, which then attempts the remove the Host-Project attachment, which fails, since other subnets require it.
For the compute API the disable_on_destroy switch works nicely, so a similar solution for the Host Project attachment would help a lot.

New or Affected Resource(s)

  • google_compute_shared_vpc_service_project

Potential Terraform Configuration

resource "google_compute_shared_vpc_service_project" "service1" {
  host_project    = "host-project-id"
  service_project = "service-project-id-1"
  detach_on_destroy = false
}

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions