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

Add schema documentation for ec_organization resource. #864

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.12.1 (September 27, 2024)

This release adds the schema documentation for the `ec_organization` resource. There are no changes to the provider itself.

# 0.12.0 (September 26, 2024)

FEATURES:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL := /bin/bash
export GO111MODULE ?= on
export VERSION := 0.12.0-dev
export VERSION := 0.12.1-dev
export BINARY := terraform-provider-ec
export GOBIN = $(shell pwd)/bin

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ terraform {
required_providers {
ec = {
source = "elastic/ec"
version = "0.12.0"
version = "0.12.1"
}
}
}
Expand Down
85 changes: 84 additions & 1 deletion docs/resources/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,87 @@ resource "ec_organization" "my_org" {
"[email protected]" = local.deployment_viewer
}
}
```
```

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

### Optional

- `members` (Attributes Map) Manages the members of an Elastic Cloud organization. The key of each entry should be the email of the member. (see [below for nested schema](#nestedatt--members))

### Read-Only

- `id` (String) Organization ID

<a id="nestedatt--members"></a>
### Nested Schema for `members`

Optional:

- `deployment_roles` (Attributes Set) Grant access to one or more deployments. For more info see: [Deployment instance roles](https://www.elastic.co/guide/en/cloud/current/ec-user-privileges.html#ec_instance_access_roles). (see [below for nested schema](#nestedatt--members--deployment_roles))
- `organization_role` (String) The optional organization role for the member. Can be one of `organization-admin`, `billing-admin`. For more info see: [Organization roles](https://www.elastic.co/guide/en/cloud/current/ec-user-privileges.html#ec_organization_level_roles)
- `project_elasticsearch_roles` (Attributes Set) Roles assigned for elasticsearch projects. For more info see: [Serverless elasticsearch roles](https://www.elastic.co/docs/current/serverless/general/assign-user-roles#es) (see [below for nested schema](#nestedatt--members--project_elasticsearch_roles))
- `project_observability_roles` (Attributes Set) Roles assigned for observability projects. For more info see: [Serverless observability roles](https://www.elastic.co/docs/current/serverless/general/assign-user-roles#observability) (see [below for nested schema](#nestedatt--members--project_observability_roles))
- `project_security_roles` (Attributes Set) Roles assigned for security projects. For more info see: [Serverless security roles](https://www.elastic.co/docs/current/serverless/general/assign-user-roles#security) (see [below for nested schema](#nestedatt--members--project_security_roles))

Read-Only:

- `email` (String) Email address of the user.
- `invitation_pending` (Boolean) Set to true while the user has not yet accepted their invitation to the organization.
- `user_id` (String) User ID.

<a id="nestedatt--members--deployment_roles"></a>
### Nested Schema for `members.deployment_roles`

Required:

- `role` (String) Assigned role. Must be on of `viewer`, `editor` or `admin`.

Optional:

- `all_deployments` (Boolean) Role applies to all deployments in the organization.
- `application_roles` (Set of String) If provided, the user assigned this role assignment will be granted this application role when signing in to the deployment(s) specified in the role assignment.
- `deployment_ids` (Set of String) Role applies to deployments listed here.


<a id="nestedatt--members--project_elasticsearch_roles"></a>
### Nested Schema for `members.project_elasticsearch_roles`

Required:

- `role` (String) Assigned role. (Allowed values: `admin`, `developer`, `viewer`)

Optional:

- `all_projects` (Boolean) Role applies to all projects in the organization.
- `application_roles` (Set of String) If provided, the user assigned this role assignment will be granted this application role when signing in to the project(s) specified in the role assignment.
- `project_ids` (Set of String) Role applies to projects listed here.


<a id="nestedatt--members--project_observability_roles"></a>
### Nested Schema for `members.project_observability_roles`

Required:

- `role` (String) Assigned role. (Allowed values: `admin`, `editor`, `viewer`)

Optional:

- `all_projects` (Boolean) Role applies to all projects in the organization.
- `application_roles` (Set of String) If provided, the user assigned this role assignment will be granted this application role when signing in to the project(s) specified in the role assignment.
- `project_ids` (Set of String) Role applies to projects listed here.


<a id="nestedatt--members--project_security_roles"></a>
### Nested Schema for `members.project_security_roles`

Required:

- `role` (String) Assigned role. (Allowed values: `admin`, `editor`, `viewer`, `t1-analyst`, `t2-analyst`, `t3-analyst`, `threat-intel-analyst`, `rule-author`, `soc-manager`, `endpoint-operations-analyst`, `platform-engineer`, `detections-admin`, `endpoint-policy-manager`)

Optional:

- `all_projects` (Boolean) Role applies to all projects in the organization.
- `application_roles` (Set of String) If provided, the user assigned this role assignment will be granted this application role when signing in to the project(s) specified in the role assignment.
- `project_ids` (Set of String) Role applies to projects listed here.
2 changes: 1 addition & 1 deletion ec/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
package ec

// Version contains the current terraform provider version.
const Version = "0.12.0-dev"
const Version = "0.12.1-dev"
2 changes: 1 addition & 1 deletion examples/deployment_ccs/deployment.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
ec = {
source = "elastic/ec"
version = "0.12.0"
version = "0.12.1"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment_ec2_instance/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
ec = {
source = "elastic/ec"
version = "0.12.0"
version = "0.12.1"
}

aws = {
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment_with_init/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
ec = {
source = "elastic/ec"
version = "0.12.0"
version = "0.12.1"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/extension_bundle/extension.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
ec = {
source = "elastic/ec"
version = "0.12.0"
version = "0.12.1"
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion templates/resources/organization.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ Now you can run `terraform plan` to see if there are any diffs between your conf

### Use variables to give the same roles to multiple users

{{ tffile "examples/resources/ec_organization/locals.tf" }}
{{ tffile "examples/resources/ec_organization/locals.tf" }}

{{ .SchemaMarkdown | trimspace }}
Loading