diff --git a/CHANGELOG.md b/CHANGELOG.md index 887156bdd..33ba3a0ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/Makefile b/Makefile index 0eae4aa31..69b40af47 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 23fc6f73e..32067c7f0 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ terraform { required_providers { ec = { source = "elastic/ec" - version = "0.12.0" + version = "0.12.1" } } } diff --git a/docs/resources/organization.md b/docs/resources/organization.md index e4f7dfda1..19c3701dc 100644 --- a/docs/resources/organization.md +++ b/docs/resources/organization.md @@ -117,4 +117,87 @@ resource "ec_organization" "my_org" { "another.viewer@example.com" = local.deployment_viewer } } -``` \ No newline at end of file +``` + + +## 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 + + +### 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. + + +### 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. + + + +### 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. + + + +### 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. + + + +### 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. \ No newline at end of file diff --git a/ec/version.go b/ec/version.go index a2886cb76..08d9476cf 100644 --- a/ec/version.go +++ b/ec/version.go @@ -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" diff --git a/examples/deployment_ccs/deployment.tf b/examples/deployment_ccs/deployment.tf index f7ca444b2..84c65f43e 100644 --- a/examples/deployment_ccs/deployment.tf +++ b/examples/deployment_ccs/deployment.tf @@ -4,7 +4,7 @@ terraform { required_providers { ec = { source = "elastic/ec" - version = "0.12.0" + version = "0.12.1" } } } diff --git a/examples/deployment_ec2_instance/provider.tf b/examples/deployment_ec2_instance/provider.tf index 4f702931a..7e817f743 100644 --- a/examples/deployment_ec2_instance/provider.tf +++ b/examples/deployment_ec2_instance/provider.tf @@ -4,7 +4,7 @@ terraform { required_providers { ec = { source = "elastic/ec" - version = "0.12.0" + version = "0.12.1" } aws = { diff --git a/examples/deployment_with_init/provider.tf b/examples/deployment_with_init/provider.tf index a3608bdf6..8a208abc4 100644 --- a/examples/deployment_with_init/provider.tf +++ b/examples/deployment_with_init/provider.tf @@ -4,7 +4,7 @@ terraform { required_providers { ec = { source = "elastic/ec" - version = "0.12.0" + version = "0.12.1" } } } diff --git a/examples/extension_bundle/extension.tf b/examples/extension_bundle/extension.tf index 03e22fab3..88bbcdb42 100644 --- a/examples/extension_bundle/extension.tf +++ b/examples/extension_bundle/extension.tf @@ -4,7 +4,7 @@ terraform { required_providers { ec = { source = "elastic/ec" - version = "0.12.0" + version = "0.12.1" } } } diff --git a/templates/resources/organization.md.tmpl b/templates/resources/organization.md.tmpl index 876c4d9d5..6fb79c17c 100644 --- a/templates/resources/organization.md.tmpl +++ b/templates/resources/organization.md.tmpl @@ -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" }} \ No newline at end of file +{{ tffile "examples/resources/ec_organization/locals.tf" }} + +{{ .SchemaMarkdown | trimspace }} \ No newline at end of file