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

Schema: JAAS role data source #654

Open
SimoneDutto opened this issue Jan 20, 2025 · 2 comments
Open

Schema: JAAS role data source #654

SimoneDutto opened this issue Jan 20, 2025 · 2 comments
Labels
area/schema Review schema changes before work begins kind/feature suggests new feature or enhancement state/untriaged untriaged bug report

Comments

@SimoneDutto
Copy link
Contributor

Type of change

Adding new schema

Description

Requesting schema change to add a role resource that will be used as part of permission management.

Role are entities that can be given permission to Juju resources. Users can be assigned to roles. 
In a follow-up we will ask to change some schema to add the ability to assign roles.

This schema change is part of work to allow the Juju Terraform provider to use JAAS-specific APIs. See more about JAAS [here](https://canonical-jaas-documentation.readthedocs-hosted.com/en/latest/).

Details

"name": schema.StringAttribute{
	Description: "The name of the role.",
	Required:    true,
},
"uuid": schema.StringAttribute{
	Description: "The UUID of the role.",
	Computed:    true,
},

Example terraform plan

resource "juju_jaas_role" "test" {
  name = "role-0"
}

// --------------- Second plan that uses the data source to use the role from plan #1

data "juju_jaas_role" "test" {
  name = "role-0"
}

Notes & References

No response

@SimoneDutto SimoneDutto added area/schema Review schema changes before work begins kind/feature suggests new feature or enhancement state/untriaged untriaged bug report labels Jan 20, 2025
@hmlanigan
Copy link
Member

This schema looks good to me.

@alesstimec
Copy link
Member

Agreed with the schema proposal. However we still need to have a conversation about access resources for JAAS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema Review schema changes before work begins kind/feature suggests new feature or enhancement state/untriaged untriaged bug report
Projects
None yet
Development

No branches or pull requests

3 participants