-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added data-source: user, role, project; resource: team (#44)
* Added data-source: user, role, project; resource: team * Adding tags * tag changes * adding tags in examples * few minor chnages
- Loading branch information
1 parent
6dd356b
commit f6a8d80
Showing
39 changed files
with
946 additions
and
17 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
page_title: "spectrocloud_project Data Source - terraform-provider-spectrocloud" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# Data Source `spectrocloud_project` | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "spectrocloud_project" "project1" { | ||
name = "Default" | ||
# (alternatively) | ||
# id = "5fd0ca727c411c71b55a359c" | ||
} | ||
``` | ||
|
||
## Schema | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
- **name** (String) | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
page_title: "spectrocloud_role Data Source - terraform-provider-spectrocloud" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# Data Source `spectrocloud_role` | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "spectrocloud_role" "role1" { | ||
name = "Project Editor" | ||
# (alternatively) | ||
# id = "5fd0ca727c411c71b55a359c" | ||
} | ||
``` | ||
|
||
## Schema | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
- **name** (String) | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
page_title: "spectrocloud_user Data Source - terraform-provider-spectrocloud" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# Data Source `spectrocloud_user` | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "spectrocloud_user" "user1" { | ||
name = "Foo Bar" | ||
# (alternatively) | ||
# id = "5fd0ca727c411c71b55a359c" | ||
} | ||
``` | ||
|
||
## Schema | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
- **name** (String) | ||
|
||
|
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
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
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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
page_title: "spectrocloud_team Resource - terraform-provider-spectrocloud" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# Resource `spectrocloud_team` | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
# user | ||
data "spectrocloud_user" "user1" { | ||
name = "Foo Bar" | ||
} | ||
# role | ||
data "spectrocloud_role" "role1" { | ||
name = "Project Editor" | ||
} | ||
data "spectrocloud_role" "role2" { | ||
name = "Cluster Admin" | ||
} | ||
data "spectrocloud_role" "role3" { | ||
name = "Project Admin" | ||
} | ||
# project | ||
data "spectrocloud_project" "project1" { | ||
name = "Default" | ||
} | ||
data "spectrocloud_project" "project2" { | ||
name = "Prod" | ||
} | ||
resource "spectrocloud_team" "t1" { | ||
name = "team1" | ||
users = [data.spectrocloud_user.user1.id] | ||
project_role_mapping { | ||
id = data.spectrocloud_project.project1.id | ||
roles = [data.spectrocloud_role.role1.id, data.spectrocloud_role.role2.id] | ||
} | ||
project_role_mapping { | ||
id = data.spectrocloud_project.project2.id | ||
roles = [data.spectrocloud_role.role3.id] | ||
} | ||
} | ||
``` | ||
|
||
## Schema | ||
|
||
### Required | ||
|
||
- **name** (String) | ||
- **users** (Set of String) | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
- **project_role_mapping** (Block List) (see [below for nested schema](#nestedblock--project_role_mapping)) | ||
- **timeouts** (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
<a id="nestedblock--project_role_mapping"></a> | ||
### Nested Schema for `project_role_mapping` | ||
|
||
Required: | ||
|
||
- **id** (String) The ID of this resource. | ||
- **roles** (Set of String) | ||
|
||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- **create** (String) | ||
- **delete** (String) | ||
- **update** (String) | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
data "spectrocloud_project" "project1" { | ||
name = "Default" | ||
|
||
# (alternatively) | ||
# id = "5fd0ca727c411c71b55a359c" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
terraform { | ||
required_providers { | ||
spectrocloud = { | ||
version = ">= 0.1" | ||
source = "spectrocloud/spectrocloud" | ||
} | ||
} | ||
} | ||
|
||
variable "sc_host" {} | ||
variable "sc_username" {} | ||
variable "sc_password" {} | ||
variable "sc_project_name" {} | ||
|
||
provider "spectrocloud" { | ||
host = var.sc_host | ||
username = var.sc_username | ||
password = var.sc_password | ||
project_name = var.sc_project_name | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
data "spectrocloud_role" "role1" { | ||
name = "Project Editor" | ||
|
||
# (alternatively) | ||
# id = "5fd0ca727c411c71b55a359c" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
terraform { | ||
required_providers { | ||
spectrocloud = { | ||
version = ">= 0.1" | ||
source = "spectrocloud/spectrocloud" | ||
} | ||
} | ||
} | ||
|
||
variable "sc_host" {} | ||
variable "sc_username" {} | ||
variable "sc_password" {} | ||
variable "sc_project_name" {} | ||
|
||
provider "spectrocloud" { | ||
host = var.sc_host | ||
username = var.sc_username | ||
password = var.sc_password | ||
project_name = var.sc_project_name | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
data "spectrocloud_user" "user1" { | ||
name = "Foo Bar" | ||
|
||
# (alternatively) | ||
# id = "5fd0ca727c411c71b55a359c" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
terraform { | ||
required_providers { | ||
spectrocloud = { | ||
version = ">= 0.1" | ||
source = "spectrocloud/spectrocloud" | ||
} | ||
} | ||
} | ||
|
||
variable "sc_host" {} | ||
variable "sc_username" {} | ||
variable "sc_password" {} | ||
variable "sc_project_name" {} | ||
|
||
provider "spectrocloud" { | ||
host = var.sc_host | ||
username = var.sc_username | ||
password = var.sc_password | ||
project_name = var.sc_project_name | ||
} |
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
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
Oops, something went wrong.