Skip to content

Commit

Permalink
Merge branch 'main' into feat-refactor-project-team-#817
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber authored Apr 7, 2024
2 parents 9538b03 + fc3f9a5 commit b4e84e8
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
10 changes: 8 additions & 2 deletions docs/resources/team_environment_assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ resource "env0_custom_role" "custom_role" {
]
}
resource "env0_team_environment_assignment" "assignment" {
resource "env0_team_environment_assignment" "custom_role_assignment" {
team_id = env0_team.team.id
environment_id = env0_environment.environment.id
role_id = env0_custom_role.custom_role.id
}
resource "env0_team_environment_assignment" "builtin_role_assignment" {
team_id = env0_team.team.id
environment_id = env0_environment.environment.id
role_id = "Viewer"
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -51,7 +57,7 @@ resource "env0_team_environment_assignment" "assignment" {
### Required

- `environment_id` (String) id of the environment
- `role_id` (String) id of the assigned role
- `role_id` (String) id of the assigned custom role. The following built-in roles can be passed as well: `Viewer`, `Planner`, `Deployer`, `Admin`
- `team_id` (String) id of the team

### Read-Only
Expand Down
9 changes: 7 additions & 2 deletions docs/resources/team_organization_assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,23 @@ resource "env0_custom_role" "custom_role" {
]
}
resource "env0_team_organization_assignment" "assignment" {
resource "env0_team_organization_assignment" "custom_role_assignment" {
team_id = env0_team.team.id
role_id = env0_custom_role.custom_role.id
}
resource "env0_team_organization_assignment" "builtin_role_assignment" {
team_id = env0_team.team.id
role_id = "Admin"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `role_id` (String) id of the assigned role
- `role_id` (String) id of the assigned custom role. The following built-in roles can be passed as well: `User`, `Admin`
- `team_id` (String) id of the team

### Read-Only
Expand Down
2 changes: 1 addition & 1 deletion env0/resource_team_environment_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func resourceTeamEnvironmentAssignment() *schema.Resource {
},
"role_id": {
Type: schema.TypeString,
Description: "id of the assigned role",
Description: "id of the assigned custom role. The following built-in roles can be passed as well: `Viewer`, `Planner`, `Deployer`, `Admin`",
Required: true,
ValidateDiagFunc: ValidateNotEmptyString,
},
Expand Down
2 changes: 1 addition & 1 deletion env0/resource_team_organization_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func resourceTeamOrganizationAssignment() *schema.Resource {
},
"role_id": {
Type: schema.TypeString,
Description: "id of the assigned role",
Description: "id of the assigned custom role. The following built-in roles can be passed as well: `User`, `Admin`",
Required: true,
ValidateDiagFunc: ValidateNotEmptyString,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ resource "env0_custom_role" "custom_role" {
]
}

resource "env0_team_environment_assignment" "assignment" {
resource "env0_team_environment_assignment" "custom_role_assignment" {
team_id = env0_team.team.id
environment_id = env0_environment.environment.id
role_id = env0_custom_role.custom_role.id
}

resource "env0_team_environment_assignment" "builtin_role_assignment" {
team_id = env0_team.team.id
environment_id = env0_environment.environment.id
role_id = "Viewer"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ resource "env0_custom_role" "custom_role" {
]
}

resource "env0_team_organization_assignment" "assignment" {
resource "env0_team_organization_assignment" "custom_role_assignment" {
team_id = env0_team.team.id
role_id = env0_custom_role.custom_role.id
}

resource "env0_team_organization_assignment" "builtin_role_assignment" {
team_id = env0_team.team.id
role_id = "Admin"
}

0 comments on commit b4e84e8

Please sign in to comment.