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
during the first apply, the resource is created and added to the state but in later runs, during the plan the user_id or the username or the id change which cause a drift and it removes the resource from the state but not in the provider portal...this causes an error which says resource already exist which requires manual action to be imported
tfe_organization_membership.tfc_mycompany_sso_members["firstname.lastname@mycompany.com"]: Drift detected (delete)
Terraform will perform the following actions:
# tfe_organization_membership.tfc_mycompany_sso_members["firstname.lastname@mycompany.com"] will be created
+ resource "tfe_organization_membership" "tfc_mycompany_sso_members" {
+ email = "firstname.lastname@mycompany.com"
+ id = (known after apply)
+ organization = "mycompany"
+ user_id = (known after apply)
+ username = (known after apply)
}
tfe_organization_membership.tfc_mycompany_sso_members["firstname.lastname@mycompany.com"]: Creating...
╷
│ Error: Error creating membership firstname.lastname@mycompany.com for organization mycompany: invalid attribute
│
│ User is already an organization member
│
│ with tfe_organization_membership.tfc_mycompany_sso_members["firstname.lastname@mycompany.com"],
│ on main.tf line 59, in resource "tfe_organization_membership" "tfc_mycompany_sso_members":
│ 59: resource "tfe_organization_membership" "tfc_mycompany_sso_members" {
Expected Behavior
resource should be update in place instead of deleted, i'm not sure why the Id change but i guess this force a new resource to be created. in this case the unique key should be the email not the id
Actual Behavior
resource is deleted because of drift detection
Additional Context
we don't have control over computed value for the id, user_id, username that change outside of our terraform configuration which makes it difficult to provision terraform cloud.
The text was updated successfully, but these errors were encountered:
Terraform Cloud/Enterprise version
tfe v0.44.1
Terraform version
Terraform Configuration Files
Debug Output
during the first apply, the resource is created and added to the state but in later runs, during the plan the
user_id
or theusername
or theid
change which cause a drift and it removes the resource from the state but not in the provider portal...this causes an error which saysresource already exist
which requires manual action to be importedExpected Behavior
resource should be update in place instead of deleted, i'm not sure why the
Id
change but i guess this force a new resource to be created. in this case the unique key should be theemail
not the idActual Behavior
resource is deleted because of drift detection
Additional Context
we don't have control over computed value for the
id
,user_id
,username
that change outside of our terraform configuration which makes it difficult to provision terraform cloud.The text was updated successfully, but these errors were encountered: