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

Group membership gone missing after reapply #748

Open
spralexx opened this issue Jan 24, 2025 · 1 comment
Open

Group membership gone missing after reapply #748

spralexx opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@spralexx
Copy link

spralexx commented Jan 24, 2025

Description

I created a user and group using Tofu. The user got added to the group according to my configuration. After changing a permission flag inside the group and running tofu apply again my user is not a member of the group anymore.

Group when running tofu applyinitially

resource "ionoscloud_group" "clusteraccess" {
  name                           = "k8s cluster access to ${ ionoscloud_k8s_cluster.devops_k8s_cluster.name }"
  create_datacenter              = false
  create_snapshot                = false
  reserve_ip                     = false
  access_activity_log            = false
  create_pcc                     = false
  s3_privilege                   = false
  create_backup_unit             = false
  create_internet_access         = false
  create_k8s_cluster             = false
  create_flow_log                = false
  access_and_manage_monitoring   = false
  access_and_manage_certificates = false
  manage_dbaas                   = false
  user_ids                = [ ionoscloud_user.patrick.id ] 
}

Group when running tofu applyagain

resource "ionoscloud_group" "clusteraccess" {
  name                           = "k8s cluster access to ${ ionoscloud_k8s_cluster.devops_k8s_cluster.name }"
  create_datacenter              = false
  create_snapshot                = false
  reserve_ip                     = false
  access_activity_log            = false
  create_pcc                     = false
  s3_privilege                   = false
  create_backup_unit             = false
  create_internet_access         = false
  create_k8s_cluster             = true
  create_flow_log                = false
  access_and_manage_monitoring   = false
  access_and_manage_certificates = false
  manage_dbaas                   = false
  user_ids                = [ ionoscloud_user.patrick.id ] 
}

Nothing else changed in my code. No manual changes has been done.

Expected behavior

I would expect the user not to be deleted from the group.

Environment

Terraform version:

OpenTofu 1.8.8

Provider version:

6.6.9
@spralexx spralexx added the bug Something isn't working label Jan 24, 2025
@cristiGuranIonos
Copy link
Collaborator

We'll fix it soon, meanwhile: try adding the group to the user instead, it should have the same result:

resource "ionoscloud_user" "patrick" {
  group_ids = [ionoscloud_group.clusteraccess.id]
}

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants