-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding an optional kubernetes permission object
This will be readonly/view. It was easiest to add here because the kube perms don't correctly get exposed by the eks module. Choose to keep this at the same level as other features to keep the code simple. This assumes we won't have that many rbac objects to create, it'll be a pain to manage if we get to 10 for example.=
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
resource "kubernetes_cluster_role_binding" "view-rolebinding" { | ||
count = local.cluster_features["k8s_rbac_view"] ? 1 : 0 | ||
|
||
metadata { | ||
name = "view-access-binding" | ||
} | ||
role_ref { | ||
api_group = "rbac.authorization.k8s.io" | ||
kind = "ClusterRole" | ||
name = "view" | ||
} | ||
subject { | ||
kind = "Group" | ||
name = "view-access-group" | ||
api_group = "rbac.authorization.k8s.io" | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters