DopplerHQ / terraform-provider-doppler

Apache License 2.0
23 stars 9 forks source link

BUG: Assigning members to an environment errors out with Project does not have access to this environment. #107

Closed kiranbaddi closed 4 days ago

kiranbaddi commented 3 weeks ago

Issue:

doppler_project_member_group resource creation fails with the following error. The error occurs quite sporadically.

 Error: Doppler Error: Project does not have access to this environment.
│ 
│   with module.delete-asap-61-repository.doppler_project_member_group.doppler_developer_group_assignment,
│   on modules/repositories/main.tf line 98, in resource "doppler_project_member_group" "doppler_developer_group_assignment":
│   98: resource "doppler_project_member_group" "doppler_developer_group_assignment" {

This is the resource definition in our module

resource "doppler_project_member_group" "doppler_devops_group_assignment" {
  project      = var.name
  group_slug   = "<group_slug>"
  role         = "collaborator"
  environments = ["development", "testing", "staging", "production"]
  depends_on   = [doppler_project.project, doppler_environment.production, doppler_environment.staging, doppler_environment.testing, doppler_environment.development]
}
watsonian commented 3 weeks ago

@kiranbaddi When you encounter this – are any changes happening to the projects and environments being referenced (i.e., are they being created/deleted/modified during the TF run)? Or does it happen in situations where just the doppler_project_member_group is being applied?

watsonian commented 4 days ago

Closing this out due to lack of response. Feel free to post again if you're still having problems and we can re-open it!