generated from hashicorp/terraform-provider-scaffolding-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
05ba3e7
chore: define import examples for resources
andreas-unleash 762c054
chore: define import examples for resources
andreas-unleash 7927bdd
chore: define import examples for resources
andreas-unleash fddcbca
chore: define import examples for resources
andreas-unleash 1ff3aee
Fix build examples (#114)
gastonfournier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
|
@@ -13,6 +13,18 @@ User schema | |
## Example Usage | ||
|
||
```terraform | ||
import { | ||
id = 1 | ||
to = unleash_user.admin | ||
} | ||
|
||
resource "unleash_user" "admin" { | ||
email = "[email protected]" | ||
name = "Chuck Norris" | ||
root_role = 1 | ||
send_email = false | ||
} | ||
|
||
resource "unleash_user" "chuck" { | ||
email = "[email protected]" | ||
name = "Chuck Norris" | ||
|
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
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 |
---|---|---|
@@ -1,3 +1,18 @@ | ||
import { | ||
id = 5 | ||
to = unleash_role.project_member_role | ||
} | ||
|
||
resource "unleash_role" "project_member_role" { | ||
permissions = [{ | ||
name = "CREATE_PROJECT" | ||
}, { | ||
name = "UPDATE_PROJECT" | ||
}, { | ||
name = "DELETE_PROJECT" | ||
}] | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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_role" "custom_root_role" { | ||
name = "A custom role" | ||
type = "root-custom" | ||
|
@@ -33,4 +48,4 @@ resource "unleash_role" "project_role" { | |
name = "UPDATE_FEATURE_ENVIRONMENT" | ||
environment = "development" | ||
}] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
import { | ||
id = 1 | ||
to = unleash_user.admin | ||
} | ||
|
||
resource "unleash_user" "admin" { | ||
email = "[email protected]" | ||
name = "Chuck Norris" | ||
root_role = 1 | ||
send_email = false | ||
} | ||
|
||
resource "unleash_user" "chuck" { | ||
email = "[email protected]" | ||
name = "Chuck Norris" | ||
|
@@ -11,4 +23,4 @@ resource "unleash_user" "with_password" { | |
root_role = 1 | ||
send_email = false | ||
password = "youcanseeme" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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