diff --git a/docs/resources/user_environment_assignment.md b/docs/resources/user_environment_assignment.md new file mode 100644 index 00000000..88813119 --- /dev/null +++ b/docs/resources/user_environment_assignment.md @@ -0,0 +1,63 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "env0_user_environment_assignment Resource - terraform-provider-env0" +subcategory: "" +description: |- + +--- + +# env0_user_environment_assignment (Resource) + + + +## Example Usage + +```terraform +data "env0_template" "template" { + name = "Template Name" +} + +data "env0_project" "project" { + name = "Default Organization Project" +} + +resource "env0_environment" "environment" { + name = "environment" + project_id = data.env0_project.project.id + template_id = data.env0_template.template.id +} + +resource "env0_api_key" "api_key" { + name = "user-api-key-sample" + organization_role = "User" +} + +resource "env0_custom_role" "custom_role" { + name = "custom-role-sample" + permissions = [ + "VIEW_PROJECT", + "EDIT_PROJECT_SETTINGS" + ] +} + +resource "env0_user_environment_assignment" "assignment" { + user_id = env0_api_key.api_key.id + environment_id = env0_environment.environment.id + role_id = env0_custom_role.custom_role.id +} +``` + + +## Schema + +### Required + +- `environment_id` (String) id of the environment +- `role_id` (String) id of the assigned role +- `user_id` (String) id of the user + +### Read-Only + +- `id` (String) The ID of this resource. + +