diff --git a/examples/resources/change_request_policy.tf b/examples/resources/change_request_policy.tf new file mode 100644 index 0000000..6810efa --- /dev/null +++ b/examples/resources/change_request_policy.tf @@ -0,0 +1,69 @@ +data "doppler_user" "nic" { + email = "nic@doppler.com" +} + +data "doppler_user" "emily" { + email = "emily@doppler.com" +} + +resource "doppler_project" "test_proj" { + name = "my-test-project" + description = "This is a test project" +} + +resource "doppler_environment" "prd" { + project = doppler_project.test_proj.name + slug = "prd" + name = "prd" +} + +resource "doppler_environment" "ci" { + project = doppler_project.test_proj.name + slug = "ci" + name = "CI-CD" +} + +resource "doppler_config" "ci_github" { + project = doppler_project.test_proj.name + environment = doppler_environment.ci.slug + name = "ci_github" +} + +resource "doppler_group" "prod_reviewers" { + name = "Prod Reviewers" +} + +resource "doppler_group_member" "prod_reviewers" { + for_each = toset([data.doppler_user.nic.slug]) + group_slug = doppler_group.prod_reviewers.slug + user_slug = each.value +} + +resource "doppler_change_request_policy" "prd_review" { + name = "Prod Review" + description = < +```