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

docs: add warning to project user and group project resources #2082

Merged
merged 1 commit into from
Mar 10, 2025
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: 2 additions & 2 deletions docs/data-sources/project_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |-
~> This resource is deprecated
Use aiven_organization_permission instead and
migrate existing aiven_project_user resources https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources
to the new resource.
to the new resource. Do not use the aiven_project_user and aiven_organization_permission resources together.
---

# aiven_project_user (Data Source)
Expand All @@ -17,7 +17,7 @@ The Project User data source provides information about the existing Aiven Proje
~> **This resource is deprecated**
Use `aiven_organization_permission` instead and
[migrate existing `aiven_project_user` resources](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources)
to the new resource.
to the new resource. **Do not use the `aiven_project_user` and `aiven_organization_permission` resources together**.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/organization_group_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: |-
Adds and manages a group of users as members of a project.
This resource is deprecated. Use aiven_organization_permission and
migrate existing aiven_organization_group_project resources https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources
to the new resource.
to the new resource. Do not use the aiven_organization_group_project and aiven_organization_permission resources together.
---

# aiven_organization_group_project (Resource)
Expand All @@ -15,7 +15,7 @@ Adds and manages a group of users as members of a project.

**This resource is deprecated.** Use `aiven_organization_permission` and
[migrate existing aiven_organization_group_project resources](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources)
to the new resource.
to the new resource. **Do not use the aiven_organization_group_project and aiven_organization_permission resources together**.

## Example Usage

Expand Down
11 changes: 9 additions & 2 deletions docs/resources/organization_permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
page_title: "aiven_organization_permission Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Grants roles and permissions https://aiven.io/docs/platform/concepts/permissions to a principal for a resource. Permissions can be granted at the organization, organizational unit, and project level. Unit-level permissions aren't shown in the Aiven Console.
Grants roles and permissions https://aiven.io/docs/platform/concepts/permissions
to a principal for a resource. Permissions can be granted at the organization, organizational unit, and project level.
Unit-level permissions aren't shown in the Aiven Console.
Do not use the aiven_project_user or aiven_organization_group_project resources with this resource.
---

# aiven_organization_permission (Resource)

Grants [roles and permissions](https://aiven.io/docs/platform/concepts/permissions) to a principal for a resource. Permissions can be granted at the organization, organizational unit, and project level. Unit-level permissions aren't shown in the Aiven Console.
Grants [roles and permissions](https://aiven.io/docs/platform/concepts/permissions)
to a principal for a resource. Permissions can be granted at the organization, organizational unit, and project level.
Unit-level permissions aren't shown in the Aiven Console.

**Do not use the `aiven_project_user` or `aiven_organization_group_project` resources with this resource**.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/project_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |-
~> This resource is deprecated
Use aiven_organization_permission instead and
migrate existing aiven_project_user resources https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources
to the new resource.
to the new resource. Do not use the aiven_project_user and aiven_organization_permission resources together.
---

# aiven_project_user (Resource)
Expand All @@ -17,7 +17,7 @@ Creates and manages an Aiven project member.
~> **This resource is deprecated**
Use `aiven_organization_permission` instead and
[migrate existing `aiven_project_user` resources](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources)
to the new resource.
to the new resource. **Do not use the `aiven_project_user` and `aiven_organization_permission` resources together**.

## Example Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (r *organizationGroupProjectResource) Schema(

**This resource is deprecated.** Use ` + "`aiven_organization_permission`" + ` and
[migrate existing aiven_organization_group_project resources](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources)
to the new resource.
to the new resource. **Do not use the aiven_organization_group_project and aiven_organization_permission resources together**.
`,
DeprecationMessage: "This resource is deprecated. Use aiven_organization_permission instead.",
Attributes: map[string]schema.Attribute{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ var permissionFields = map[string]*schema.Schema{

func ResourceOrganizationalPermission() *schema.Resource {
return &schema.Resource{
Description: "Grants [roles and permissions](https://aiven.io/docs/platform/concepts/permissions) to a principal for a resource. Permissions can be granted at the organization, organizational unit, and project level. Unit-level permissions aren't shown in the Aiven Console.",
Description: `Grants [roles and permissions](https://aiven.io/docs/platform/concepts/permissions)
to a principal for a resource. Permissions can be granted at the organization, organizational unit, and project level.
Unit-level permissions aren't shown in the Aiven Console.

**Do not use the ` + "`aiven_project_user`" + ` or ` + "`aiven_organization_group_project`" + ` resources with this resource**.
`,
CreateContext: common.WithGenClient(resourceOrganizationalPermissionUpsert),
ReadContext: common.WithGenClient(resourceOrganizationalPermissionRead),
UpdateContext: common.WithGenClient(resourceOrganizationalPermissionUpsert),
Expand Down
2 changes: 1 addition & 1 deletion internal/sdkprovider/service/project/project_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ResourceProjectUser() *schema.Resource {
Schema: aivenProjectUserSchema,
DeprecationMessage: `Use aiven_organization_permission instead and
[migrate existing aiven_project_user resources](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources)
to the new resource.`,
to the new resource. **Do not use the aiven_project_user and aiven_organization_permission resources together**.`,
}
}

Expand Down
Loading