main.tf 941 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ### IAM
  2. module "iam" {
  3. source = "../.."
  4. folder_id = "XXXXXXXXXXXXXXXXXXX"
  5. folder_binding_authoritative = false
  6. sa_role_mapping = [
  7. {
  8. name = "sa-cluster"
  9. roles = ["editor"]
  10. },
  11. {
  12. name = "sa-noroles"
  13. roles = []
  14. },
  15. {
  16. name = "sa-nodes"
  17. roles = ["container-registry.images.puller"]
  18. },
  19. ]
  20. ## Edit with real IAM users ID
  21. folder_user_role_mapping = [
  22. {
  23. name = "devops"
  24. users = ["serviceAccount:aje0k467i3bs3tst9d97", ]
  25. roles = ["iam.serviceAccounts.user", "k8s.admin", "k8s.cluster-api.cluster-admin", "container-registry.admin"]
  26. },
  27. {
  28. name = "secops"
  29. users = ["serviceAccount:ajeg2qiqkhnkq3vms1eg", ]
  30. roles = []
  31. },
  32. {
  33. name = "developers"
  34. users = ["serviceAccount:ajevak8egbjo8v9ddl85", ]
  35. roles = ["k8s.viewer", "k8s.cluster-api.editor"]
  36. },
  37. ]
  38. }