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

Docs: define import example for resources #113

Merged
merged 5 commits into from
Jan 25, 2024

Conversation

andreas-unleash
Copy link
Contributor

What it says on the tin. Shows how to use the resource with import

Closes # SR-251

Copy link
Collaborator

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few changes I believe are needed

Comment on lines 16 to 19
import {
id = 5
to = unleash_role.custom_root_role
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 is the id of the predefined Project Member role, maybe we should add it as a resource that is imported rather than a custom_root_role which could be misleading

Comment on lines 16 to 19
import {
project = "sample"
to = unleash_project_access.sample_project_access
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this will work, because the resource is being created in line 50. What you can import maybe is the default project access

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it thanks. Importing the default project access and overriding the owner (I think)

name = "DELETE_PROJECT"
}]
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intention here is to import the project member role and override the permissions

}

resource "unleash_project_access" "default_project_access" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intention is to import the default project access and override the owner

Copy link
Collaborator

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to merge this with #114

Copy link
Collaborator

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's roll

@andreas-unleash andreas-unleash merged commit 8639f03 into main Jan 25, 2024
12 checks passed
@andreas-unleash andreas-unleash deleted the docs/define_import_docs branch January 25, 2024 09:14
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.

2 participants