SUSE Support

Here When You Need Us

How to set multiple rules in the Rancher2 Terraform Provider Role Template resource

This document (000020672) is provided subject to the disclaimer at the end of this document.

Situation

Defining multiple rules within a single role template. 

Resolution

To define multiple rules for a single role template, set multiple rule blocks as per the following example:
resource "rancher2_role_template" "foo" {
  name = "foo"
  context = "project"
  default_role = false
  description = "Terraform role template acceptance test"
  rules {
    api_groups = ["*"]
    resources = ["secrets"]
    verbs = ["create"]
  }
  rules {
    api_groups = ["*"]
    resources = ["namespaces"]
    verbs = ["create"]
  }
}

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020672
  • Creation Date: 14-Jun-2022
  • Modified Date:19-Sep-2022
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.