You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 an 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 an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.
It should be able to attach and detach projects without impacting other projects mentioned in the service_project_ids list.
Actual Behavior
When we try to remove/detach a service project -:
Case 1. If we detach last service project in the list - It works fine
Case 2. If we detach service project from anywhere else on the list - it tries to detach then re-attach all the service projects mentioned after the service project which we detached/removed from the list.
For example:-
In the tfvars file above, we have two service projects in the list - 1) dev-prj 2) prod-prj . If we try to detach **dev-prj ** it will detach prod-prj as well then re-attach it.
Terraform Plan output - Plan: 1 to add, 0 to change, 2 to destroy.
Community Note
Affected Resource(s)
Terraform Configuration Files
main.tf
module "shared_vpc_access" {
source = "terraform-google-modules/network/google//modules/fabric-net-svpc-access"
version = "~> 3.4.0"
for_each = var.shared_vpc_access_list
host_project_id = each.value.host_project_id
service_project_num = length(each.value.service_project_ids)
service_project_ids = each.value.service_project_ids
}
variables.tf
variable "shared_vpc_access_list" {
description = "List of shared vpcs"
type = map(object({
host_project_id = string
service_project_ids = list(string)
}))
}
terraform.tfvars
shared_vpc_access_list = {
test = {
host_project_id = "test-host-prj"
service_project_ids = ["dev-prj","prod-prj"]
}
}
Expected Behavior
It should be able to attach and detach projects without impacting other projects mentioned in the service_project_ids list.
Actual Behavior
When we try to remove/detach a service project -:
Case 1. If we detach last service project in the list - It works fine
Case 2. If we detach service project from anywhere else on the list - it tries to detach then re-attach all the service projects mentioned after the service project which we detached/removed from the list.
For example:-
In the tfvars file above, we have two service projects in the list - 1) dev-prj 2) prod-prj . If we try to detach **dev-prj ** it will detach prod-prj as well then re-attach it.
Terraform Plan output - Plan: 1 to add, 0 to change, 2 to destroy.
Steps to Reproduce
Looping in team - @maitreya-source
The text was updated successfully, but these errors were encountered: