Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RBAC resources #39

Merged
merged 5 commits into from
Aug 6, 2018
Merged

Add RBAC resources #39

merged 5 commits into from
Aug 6, 2018

Conversation

sl1pm4t
Copy link
Owner

@sl1pm4t sl1pm4t commented Aug 6, 2018

  • kubernetes_cluster_role
  • kubernetes_cluster_role_binding
  • kubernetes_role
  • kubernetes_role_binding

Fixes #9 and #35

@stigok
Copy link

stigok commented Aug 6, 2018

Great work!

@sl1pm4t
Copy link
Owner Author

sl1pm4t commented Aug 6, 2018

Examples:

Role

resource "kubernetes_role" "test" {
	metadata {
		name = "test"
	}
	rule {
		api_groups = [""]
		resources  = ["pods", "pods/log"]
		verbs = ["get", "list"]
	}
}

Role Binding

resource "kubernetes_role_binding" "test" {
	metadata {
		name = "test"
	}
	role_ref {
		name  = "test"
		kind  = "Role"
	}
	subject {
		kind = "Group"
		name = "monitoring"
	}
	subject {
		kind = "User"
		name = "gary"
	}
}

@bassrock
Copy link

bassrock commented Aug 6, 2018

Worked perfectly! Just upgraded my terraform to use these today!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants