Skip to content

Commit

Permalink
fix: formatting for deprecation callouts (#2050)
Browse files Browse the repository at this point in the history
  • Loading branch information
staceysalamon-aiven authored Feb 17, 2025
1 parent b331713 commit 5d0c18a
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 76 deletions.
5 changes: 2 additions & 3 deletions docs/data-sources/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ page_title: "aiven_account Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The Account data source provides information about the existing Aiven Account.
~> This resource is deprecated.
~> This resource is deprecated
This resource will be removed in v5.0.0. Use aiven_organization instead.
---

# aiven_account (Data Source)

The Account data source provides information about the existing Aiven Account.

~> **This resource is deprecated**.

~> **This resource is deprecated**
This resource will be removed in v5.0.0. Use `aiven_organization` instead.

## Example Usage
Expand Down
5 changes: 2 additions & 3 deletions docs/data-sources/account_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ page_title: "aiven_account_authentication Data Source - terraform-provider-aiven
subcategory: ""
description: |-
The Account Authentication data source provides information about the existing Aiven Account Authentication.
~> This resource is deprecated.
~> This resource is deprecated
This resource is deprecated
---

# aiven_account_authentication (Data Source)

The Account Authentication data source provides information about the existing Aiven Account Authentication.

~> **This resource is deprecated**.

~> **This resource is deprecated**
This resource is deprecated

## Example Usage
Expand Down
13 changes: 6 additions & 7 deletions docs/data-sources/organization_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ page_title: "aiven_organization_user Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The Organization User data source provides information about the existing Aiven Organization User.
~> This resource is deprecated.
~> This resource is deprecated
Users cannot be invited to an organization using Terraform.
Use the Aiven Console to invite users to your organization. After the user accepts the invite
you can get their information using the aiven_organization_user data source. You can manage
Use the Aiven Console to invite users to your organization https://aiven.io/docs/platform/howto/manage-org-users.
After the user accepts the invite you can get their information using the aiven_organization_user data source. You can manage
user access to projects with the aiven_organization_user_group, aiven_organization_user_group_member,
and aiven_organization_permission resources.
---
Expand All @@ -16,11 +16,10 @@ description: |-

The Organization User data source provides information about the existing Aiven Organization User.

~> **This resource is deprecated**.

~> **This resource is deprecated**
Users cannot be invited to an organization using Terraform.
Use the Aiven Console to invite users to your organization. After the user accepts the invite
you can get their information using the `aiven_organization_user` data source. You can manage
Use the Aiven Console to [invite users to your organization](https://aiven.io/docs/platform/howto/manage-org-users).
After the user accepts the invite you can get their information using the `aiven_organization_user` data source. You can manage
user access to projects with the `aiven_organization_user_group`, `aiven_organization_user_group_member`,
and `aiven_organization_permission` resources.

Expand Down
13 changes: 8 additions & 5 deletions docs/data-sources/project_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ page_title: "aiven_project_user Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The Project User data source provides information about the existing Aiven Project User.
~> This resource is deprecated.
Use aiven_organization_permission instead.
~> 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.
---

# aiven_project_user (Data Source)

The Project User data source provides information about the existing Aiven Project User.

~> **This resource is deprecated**.

Use `aiven_organization_permission` instead.
~> **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.

## Example Usage

Expand Down
5 changes: 2 additions & 3 deletions docs/resources/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ page_title: "aiven_account Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an Aiven account.
~> This resource is deprecated.
~> This resource is deprecated
This resource will be removed in v5.0.0. Use aiven_organization instead.
---

# aiven_account (Resource)

Creates and manages an Aiven account.

~> **This resource is deprecated**.

~> **This resource is deprecated**
This resource will be removed in v5.0.0. Use `aiven_organization` instead.

## Example Usage
Expand Down
5 changes: 2 additions & 3 deletions docs/resources/account_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ page_title: "aiven_account_authentication Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an authentication method.
~> This resource is deprecated.
~> This resource is deprecated
To set up an identity provider as an authentication method for your organization,
use the Aiven Console https://aiven.io/docs/platform/howto/saml/add-identity-providers.
It guides you through the steps and explains the settings.
Expand All @@ -14,8 +14,7 @@ description: |-

Creates and manages an authentication method.

~> **This resource is deprecated**.

~> **This resource is deprecated**
To set up an identity provider as an authentication method for your organization,
[use the Aiven Console](https://aiven.io/docs/platform/howto/saml/add-identity-providers).
It guides you through the steps and explains the settings.
Expand Down
30 changes: 8 additions & 22 deletions docs/resources/organization_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,23 @@
page_title: "aiven_organization_user Resource - terraform-provider-aiven"
subcategory: ""
description: |-
**This resource is deprecated**. Users cannot be invited to an organization using Terraform.
Use the [Aiven Console](https://console.aiven.io/) to [invite users](https://aiven.io/docs/platform/howto/manage-org-users)
to your organization.
After the user accepts the invite you can get their information using the aiven_organization_user
data source. You can manage user access to projects with the aiven_organization_user_group,
aiven_organization_user_group_member, and aiven_organization_permission resources.
~> This resource is deprecated.
Creates and manages an Aiven Organization user.
~> This resource is deprecated
Users cannot be invited to an organization using Terraform.
Use the Aiven Console to invite users to your organization. After the user accepts the invite
you can get their information using the aiven_organization_user data source. You can manage
Use the Aiven Console to invite users to your organization https://aiven.io/docs/platform/howto/manage-org-users.
After the user accepts the invite you can get their information using the aiven_organization_user data source. You can manage
user access to projects with the aiven_organization_user_group, aiven_organization_user_group_member,
and aiven_organization_permission resources.
---

# aiven_organization_user (Resource)

**This resource is deprecated**. Users cannot be invited to an organization using Terraform.
Use the [Aiven Console](https://console.aiven.io/) to [invite users](https://aiven.io/docs/platform/howto/manage-org-users)
to your organization.

After the user accepts the invite you can get their information using the `aiven_organization_user`
data source. You can manage user access to projects with the `aiven_organization_user_group`,
`aiven_organization_user_group_member`, and `aiven_organization_permission` resources.


~> **This resource is deprecated**.
Creates and manages an Aiven Organization user.

~> **This resource is deprecated**
Users cannot be invited to an organization using Terraform.
Use the Aiven Console to invite users to your organization. After the user accepts the invite
you can get their information using the `aiven_organization_user` data source. You can manage
Use the Aiven Console to [invite users to your organization](https://aiven.io/docs/platform/howto/manage-org-users).
After the user accepts the invite you can get their information using the `aiven_organization_user` data source. You can manage
user access to projects with the `aiven_organization_user_group`, `aiven_organization_user_group_member`,
and `aiven_organization_permission` resources.

Expand Down
15 changes: 5 additions & 10 deletions docs/resources/project_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,20 @@ page_title: "aiven_project_user Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an Aiven project member.
This resource is deprecated. Use aiven_organization_permission and
~> 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.
~> This resource is deprecated.
Use aiven_organization_permission instead.
---

# aiven_project_user (Resource)

Creates and manages an Aiven project member.

**This resource is deprecated.** Use `aiven_organization_permission` and
[migrate existing aiven_project_user resources](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources)
~> **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.


~> **This resource is deprecated**.

Use `aiven_organization_permission` instead.

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion internal/sdkprovider/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,5 +446,5 @@ func formatDeprecation(s string) string {
// Doesn't turn the deprecation into a callout if it already is one
return msg
}
return "~> **This resource is deprecated**.\n\n" + msg
return "~> **This resource is deprecated**\n" + msg
}
14 changes: 3 additions & 11 deletions internal/sdkprovider/service/organization/organization_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,7 @@ var aivenOrganizationUserSchema = map[string]*schema.Schema{

func ResourceOrganizationUser() *schema.Resource {
return &schema.Resource{
Description: `
**This resource is deprecated**. Users cannot be invited to an organization using Terraform.
Use the [Aiven Console](https://console.aiven.io/) to [invite users](https://aiven.io/docs/platform/howto/manage-org-users)
to your organization.
After the user accepts the invite you can get their information using the ` + "`aiven_organization_user`" + `
data source. You can manage user access to projects with the ` + "`aiven_organization_user_group`" + `,
` + "`aiven_organization_user_group_member`" + `, and ` + "`aiven_organization_permission`" + ` resources.
`,
Description: "Creates and manages an Aiven Organization user. ",
CreateContext: resourceOrganizationUserCreate,
ReadContext: common.WithGenClient(resourceOrganizationUserRead),
DeleteContext: common.WithGenClient(resourceOrganizationUserDelete),
Expand All @@ -76,8 +68,8 @@ data source. You can manage user access to projects with the ` + "`aiven_organiz
Schema: aivenOrganizationUserSchema,
DeprecationMessage: `
Users cannot be invited to an organization using Terraform.
Use the Aiven Console to invite users to your organization. After the user accepts the invite
you can get their information using the aiven_organization_user data source. You can manage
Use the Aiven Console to [invite users to your organization](https://aiven.io/docs/platform/howto/manage-org-users).
After the user accepts the invite you can get their information using the aiven_organization_user data source. You can manage
user access to projects with the aiven_organization_user_group, aiven_organization_user_group_member,
and aiven_organization_permission resources.
`,
Expand Down
13 changes: 5 additions & 8 deletions internal/sdkprovider/service/project/project_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ var aivenProjectUserSchema = map[string]*schema.Schema{

func ResourceProjectUser() *schema.Resource {
return &schema.Resource{
Description: `Creates and manages an Aiven project member.
**This resource is deprecated.** Use ` + "`aiven_organization_permission`" + ` and
[migrate existing aiven_project_user resources](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources)
to the new resource.
`,
Description: "Creates and manages an Aiven project member.",
CreateContext: common.WithGenClient(resourceProjectUserCreate),
ReadContext: common.WithGenClient(resourceProjectUserRead),
UpdateContext: common.WithGenClient(resourceProjectUserUpdate),
Expand All @@ -53,8 +48,10 @@ to the new resource.
},
Timeouts: schemautil.DefaultResourceTimeouts(),

Schema: aivenProjectUserSchema,
DeprecationMessage: "Use aiven_organization_permission instead.",
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.`,
}
}

Expand Down

0 comments on commit 5d0c18a

Please sign in to comment.