Skip to content

Commit

Permalink
Deprecate policy rule and fix broken links (#569)
Browse files Browse the repository at this point in the history
* Deprecate cyral_policy_rule

* Bump dependencies

* Fix broken links

* Fix broken links
  • Loading branch information
wcmjunior authored Sep 27, 2024
1 parent 0747afb commit 4dc6537
Show file tree
Hide file tree
Showing 54 changed files with 114 additions and 119 deletions.
2 changes: 1 addition & 1 deletion cyral/internal/datalabel/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func dataSourceSchema() *schema.Resource {
},
},
"classification_rule": {
Description: "Classification rules are used by the [Automatic Data Map](https://cyral.com/docs/policy/automatic-datamap) feature to automatically map data locations to labels. Currently, only `PREDEFINED` labels have classification rules.",
Description: "Classification rules are used by the [Automatic Data Map](https://cyral.com/docs/policy/repo-crawler/use-auto-mapping/) feature to automatically map data locations to labels. Currently, only `PREDEFINED` labels have classification rules.",
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Resource{
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/datalabel/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func resourceSchema() *schema.Resource {
},
"classification_rule": {
Description: "Classification rules are used by the " +
"[Automatic Data Map](https://cyral.com/docs/policy/automatic-datamap) feature to automatically map " +
"[Automatic Data Map](https://cyral.com/docs/policy/repo-crawler/use-auto-mapping/) feature to automatically map " +
"data locations to labels.",
Optional: true,
Type: schema.TypeSet,
Expand Down
6 changes: 3 additions & 3 deletions cyral/internal/deprecated/policy/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
DeprecationMessage: "For control planes `>= v4.15`, please use resource `cyral_policy_v2` instead.",
Description: "Manages [policies](https://cyral.com/docs/reference/policy). See also: " +
DeprecationMessage: "For control planes `>= v4.15`, use resource `cyral_policy_v2` instead.",
Description: "Manages [policies](https://cyral.com/docs/policy). See also: " +
"[Policy Rule](./policy_rule.md). For more information, see the " +
"[Policy Guide](https://cyral.com/docs/policy/overview).",
"[Policy Guide](https://cyral.com/docs/policy).",
CreateContext: resourceContextHandler.CreateContext(),
ReadContext: resourceContextHandler.ReadContextCustomErrorHandling(&core.IgnoreNotFoundByMessage{
ResName: resourceName,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [policy rules](https://cyral.com/docs/reference/policy/#rules). " +
DeprecationMessage: "For control planes `>= v4.15`, use resource `cyral_policy_v2` instead.",
Description: "Manages [policy rules](https://cyral.com/docs/policy/#rules). " +
"See also the [`cyral_policy`](https://registry.terraform.io/providers/cyralinc/cyral/latest/docs/resources/policy) " +
"resource and the [Policy Guide](https://cyral.com/docs/policy#the-rules-block-of-a-policy)." +
"\n\n-> 1. Unless you create a default rule, users and groups only have the rights you explicitly grant them." +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/cyralinc/terraform-provider-cyral/cyral/internal/policy/rule"
"github.com/cyralinc/terraform-provider-cyral/cyral/internal/deprecated/policy/rule"
"github.com/cyralinc/terraform-provider-cyral/cyral/provider"
"github.com/cyralinc/terraform-provider-cyral/cyral/utils"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func ResourceIntegrationDatadog() *schema.Resource {
}
return &schema.Resource{
DeprecationMessage: "If configuring Datadog for logging purposes, use resource `cyral_integration_logging` instead.",
Description: "Manages [integration with DataDog](https://cyral.com/docs/integrations/apm/datadog/) " +
Description: "Manages [integration with DataDog](https://cyral.com/docs/integrations/siem/datadog-logs) " +
"to push sidecar logs and/or metrics.",
CreateContext: contextHandler.CreateContext(),
ReadContext: contextHandler.ReadContext(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ResourceIntegrationELK() *schema.Resource {
}
return &schema.Resource{
DeprecationMessage: "Use resource `cyral_integration_logging` instead.",
Description: "Manages [integration with ELK](https://cyral.com/docs/integrations/siem/elk/) to push sidecar metrics.",
Description: "Manages [integration with ELK](https://cyral.com/docs/integrations/siem/custom#elk) to push sidecar metrics.",
CreateContext: contextHandler.CreateContext(),
ReadContext: contextHandler.ReadContext(),
UpdateContext: contextHandler.UpdateContext(),
Expand Down
10 changes: 5 additions & 5 deletions cyral/internal/deprecated/resource_cyral_integration_idp.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,28 +406,28 @@ var (
"saml_xml_key_name_tranformer": "CERT_SUBJECT",
"single_logout_service_url": "",
"xml_sig_key_info_key_name_transformer": "CERT_SUBJECT",
"resource_description": "Manages [integration with Active Directory Federation Services](https://cyral.com/docs/sso/sso-adfs#add-your-adfs-as-an-idp-in-cyral) identity provider to allow single-sign on to Cyral.",
"resource_description": "Manages [integration with Active Directory Federation Services](https://cyral.com/docs/integrations/authentication/idp/adfs) identity provider to allow single-sign on to Cyral.",
}
aadDefaultValuesMap = map[string]interface{}{
"display_name": "Azure Active Directory",
"resource_description": "Manages [integration with Azure Active Directory](https://cyral.com/docs/sso/sso-azure-ad#add-azure-ad-integration-to-cyral) identity provider to allow single-sign on to Cyral.",
"resource_description": "Manages [integration with Azure Active Directory](https://cyral.com/docs/integrations/authentication/idp/azure-ad) identity provider to allow single-sign on to Cyral.",
}
forgerockDefaultValuesMap = map[string]interface{}{
"display_name": "Forgerock",
"ldap_group_attribute": "cn",
"resource_description": "Manages [integration with Forgerock](https://cyral.com/docs/sso/sso-forgerock#add-forgerock-idp-to-cyral) identity provider to allow single-sign on to Cyral.",
"resource_description": "Manages [integration with Forgerock](https://cyral.com/docs/integrations/authentication/idp/forgerock) identity provider to allow single-sign on to Cyral.",
}
gsuiteDefaultValuesMap = map[string]interface{}{
"display_name": "GSuite",
"resource_description": "Manages integration with GSuite identity provider to allow single-sign on to Cyral.",
}
oktaDefaultValuesMap = map[string]interface{}{
"display_name": "Okta",
"resource_description": "Manages [integration with Okta](https://cyral.com/docs/sso/sso-okta#in-cyral-management-console-create-okta-integration) identity provider to allow single-sign on to Cyral.",
"resource_description": "Manages [integration with Okta](https://cyral.com/docs/integrations/authentication/idp/okta) identity provider to allow single-sign on to Cyral.",
}
pingoneDefaultValuesMap = map[string]interface{}{
"display_name": "PingOne",
"resource_description": "Manages integration with PingOne identity provider to allow single-sign on to Cyral.",
"resource_description": "Manages [integration with PingOne](https://cyral.com/docs/integrations/authentication/idp/pingone) identity provider to allow single-sign on to Cyral.",
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [integration with Duo MFA](https://cyral.com/docs/mfa/duo).",
Description: "Manages [integration with Duo MFA](https://cyral.com/docs/integrations/authentication/mfa/duo).",
CreateContext: ce.CreateResource(resourceName, ce.DuoMFATemplateType),
ReadContext: ce.ReadResource(resourceName, ce.DuoMFATemplateType),
UpdateContext: ce.UpdateResource(resourceName, ce.DuoMFATemplateType),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [integration with PagerDuty](https://cyral.com/docs/integrations/incident-response/pagerduty/#in-cyral).",
Description: "Manages [integration with PagerDuty](https://cyral.com/docs/integrations/incident-response/pagerduty).",
CreateContext: ce.CreateResource(resourceName, ce.PagerDutyTemplateType),
ReadContext: ce.ReadResource(resourceName, ce.PagerDutyTemplateType),
UpdateContext: ce.UpdateResource(resourceName, ce.PagerDutyTemplateType),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/integration/idpsaml/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func DeleteGenericSAMLConfig() core.ResourceOperationConfig {
func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages identity provider (IdP) integrations using SAML to allow " +
"[Single Sing-On](https://cyral.com/docs/sso/overview) to Cyral.\n\nSee also " +
"[Single Sing-On](https://cyral.com/docs/integrations/authentication/idp/) to Cyral.\n\nSee also " +
"the remaining SAML-related resources and data sources.",
CreateContext: core.CRUDResources(
[]core.ResourceOperationConfig{
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/integration/slack/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [integration with Slack to push alerts](https://cyral.com/docs/integrations/messaging/slack).",
Description: "Manages [integration with Slack to push alerts](https://cyral.com/docs/integrations/alerting/slack).",
CreateContext: resourceContextHandler.CreateContext(),
ReadContext: resourceContextHandler.ReadContext(),
UpdateContext: resourceContextHandler.UpdateContext(),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/integration/teams/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [integration with Microsoft Teams](https://cyral.com/docs/integrations/messaging/microsoft-teams/).",
Description: "Manages [integration with Microsoft Teams](https://cyral.com/docs/integrations/alerting/microsoft-teams).",
CreateContext: resourceContextHandler.CreateContext(),
ReadContext: resourceContextHandler.ReadContext(),
UpdateContext: resourceContextHandler.UpdateContext(),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/regopolicy/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var (

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages a [Rego Policy](https://cyral.com/docs/policy/rego-policy/overview#) instance." +
Description: "Manages a Rego Policy instance." +
"\n\n-> **Note** This resource can be used to create repo-level policies by specifying the repo IDs " +
"associated to the policy `scope`. For more information, see the [scope](#nestedblock--scope) field.",
CreateContext: resourceContextHandler.CreateContext(),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/repository/binding/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [cyral repository to sidecar bindings](https://cyral.com/docs/sidecars/sidecar-assign-repo).",
Description: "Manages [cyral repository to sidecar bindings](https://cyral.com/docs/sidecars/manage/bind-repo/).",
CreateContext: resourceContextHandler.CreateContext(),
ReadContext: resourceContextHandler.ReadContext(),
UpdateContext: resourceContextHandler.UpdateContext(),
Expand Down
7 changes: 3 additions & 4 deletions cyral/internal/repository/confauth/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages Repository Analysis Configuration. This resource allows configuring both " +
"[Log Settings](https://cyral.com/docs/manage-repositories/repo-log-volume) " +
"and [Advanced settings](https://cyral.com/docs/manage-repositories/repo-advanced-settings) " +
"(Logs, Alerts, Analysis and Enforcement) configurations for Data Repositories.",
Description: "Manages Repository Analysis Configuration. This resource allows configuring " +
"Logs, Alerts, Analysis and Enforcement configurations for Data Repositories." +
"[See also](https://cyral.com/docs/data-repos/config).",
CreateContext: resourceRepositoryConfAuthCreate,
ReadContext: resourceContextHandler.ReadContextCustomErrorHandling(&core.IgnoreNotFoundByMessage{
ResName: resourceName,
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/repository/datamap/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func resourceSchema() *schema.Resource {
"location in `attributes`, separating spaces by dots. For example, an attribute " +
"`my_attr` from table `my_tbl` within space `inner_space` within space `outer_space` " +
"would be referenced as `outer_space.inner_space.my_tbl.my_attr`. For more information, " +
"please see the [Policy Guide](https://cyral.com/docs/reference/policy/).",
"please see the [Policy Guide](https://cyral.com/docs/policy/).",
Type: schema.TypeList,
Required: true,
// TODO: this ForceNew propagates to the parent attribute `mapping`. Therefore, any
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/repository/network/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var resourceContextHandler = core.DefaultContextHandler{
func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages the network access policy of a repository. Network access policies are" +
" also known as the [Network Shield](https://cyral.com/docs/manage-repositories/network-shield/)." +
" also known as the [Network Shield](https://cyral.com/docs/data-repos/network-shield/)." +
" This feature is supported for the following repository types:" +
utils.SupportedValuesAsMarkdown(repositoryTypesNetworkShield()) +
"\n\n-> **Note** If you also use the resource `cyral_repository_conf_auth` for the same repository," +
Expand Down
4 changes: 1 addition & 3 deletions cyral/internal/repository/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [repositories](https://cyral.com/docs/manage-repositories/repo-track)." +
"\n\nSee also [Cyral Repository Configuration Module](https://github.com/cyralinc/terraform-cyral-repository-config)." +
"\nThis module provides the repository configuration options as shown in Cyral UI.",
Description: "Manages [repositories](https://cyral.com/docs/how-to/track-repos/).",
CreateContext: resourceContextHandler.CreateContext(),
ReadContext: resourceContextHandler.ReadContext(),
UpdateContext: resourceContextHandler.UpdateContext(),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/role/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func dataSourceRoleReadConfig() core.ResourceOperationConfig {

func dataSourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Retrieve and filter [roles](https://cyral.com/docs/account-administration/acct-manage-cyral-roles/) that exist in the Cyral Control Plane.",
Description: "Retrieve and filter [roles](https://cyral.com/docs/user-administration/manage-cyral-roles/) that exist in the Cyral Control Plane.",
ReadContext: core.ReadResource(dataSourceRoleReadConfig()),
Schema: map[string]*schema.Schema{
"name": {
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/role/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var urlFactory = func(d *schema.ResourceData, c *client.Client) string {

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [roles for Cyral control plane users](https://cyral.com/docs/account-administration/acct-manage-cyral-roles/#create-and-manage-administrator-roles-for-cyral-control-plane-users). See also: [Role SSO Groups](./role_sso_groups.md).",
Description: "Manages [roles for Cyral control plane users](https://cyral.com/docs/user-administration/manage-cyral-roles/#create-and-manage-administrator-roles-for-cyral-control-plane-users). See also: [Role SSO Groups](./role_sso_groups.md).",

CreateContext: resourceRoleCreate,
ReadContext: resourceRoleRead,
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/role/ssogroups/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [mapping SSO groups to specific roles](https://cyral.com/docs/account-administration/acct-manage-cyral-roles/#map-an-sso-group-to-a-cyral-administrator-role) on Cyral control plane. See also: [Role](./role.md).",
Description: "Manages [mapping SSO groups to specific roles](https://cyral.com/docs/user-administration/manage-cyral-roles/#map-an-sso-group-to-a-cyral-administrator-role) on Cyral control plane. See also: [Role](./role.md).",
CreateContext: core.CreateResource(createRoleSSOGroupsConfig, readRoleSSOGroupsConfig),
ReadContext: core.ReadResource(readRoleSSOGroupsConfig),
DeleteContext: core.DeleteResource(deleteRoleSSOGroupsConfig),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/sidecar/credentials/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var resourceContextHandler = core.DefaultContextHandler{

func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Create new [credentials for Cyral sidecar](https://cyral.com/docs/sidecars/sidecar-manage/#rotate-the-client-secret-for-a-sidecar).",
Description: "Create new [credentials for Cyral sidecar](https://cyral.com/docs/sidecars/manage/#rotate-the-client-secret-for-a-sidecar).",
CreateContext: resourceContextHandler.CreateContext(),
ReadContext: resourceContextHandler.ReadContext(),
DeleteContext: resourceContextHandler.DeleteContext(),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/sidecar/health/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func dataSourceSchema() *schema.Resource {
utils.StatusKey: {
Description: "Sidecar health status. Possible values are: `HEALTHY`, `DEGRADED`, `UNHEALTHY` " +
"and `UNKNOWN`. For more information, see " +
"[Sidecar Status](https://cyral.com/docs/sidecars/sidecar-manage/#check-sidecar-cluster-status).",
"[Sidecar Status](https://cyral.com/docs/sidecars/manage/#check-sidecar-cluster-status).",
Type: schema.TypeString,
Computed: true,
},
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/sidecar/listener/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var resourceContextHandler = core.DefaultContextHandler{
// DELETE {{baseURL}}/sidecars/:sidecarID/listeners/:listenerID (Delete a listener)
func resourceSchema() *schema.Resource {
return &schema.Resource{
Description: "Manages [sidecar listeners](https://cyral.com/docs/sidecars/sidecar-listeners)." +
Description: "Manages sidecar listeners." +
"\n~> **Warning** Multiple listeners can be associated to a single sidecar as long as " +
"`host` and `port` are unique. If `host` is omitted, then `port` must be unique.",
CreateContext: resourceContextHandler.CreateContext(),
Expand Down
2 changes: 1 addition & 1 deletion cyral/internal/sidecar/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func resourceSchema() *schema.Resource {
Optional: true,
},
"bypass_mode": {
Description: "This argument lets you specify how to handle the connection in the event of an error in the sidecar during a user’s session. Valid modes are: `always`, `failover` or `never`. Defaults to `failover`. If `always` is specified, the sidecar will run in [passthrough mode](https://cyral.com/docs/sidecars/sidecar-manage#passthrough-mode). If `failover` is specified, the sidecar will run in [resiliency mode](https://cyral.com/docs/sidecars/sidecar-manage#resilient-mode-of-sidecar-operation). If `never` is specified and there is an error in the sidecar, connections to bound repositories will fail.",
Description: "This argument lets you specify how to handle the connection in the event of an error in the sidecar during a user’s session. Valid modes are: `always`, `failover` or `never`. Defaults to `failover`. If `always` is specified, the sidecar will run in [passthrough mode](https://cyral.com/docs/sidecars/manage#passthrough-mode). If `failover` is specified, the sidecar will run in [resiliency mode](https://cyral.com/docs/sidecars/manage#resilient-mode-of-sidecar-operation). If `never` is specified and there is an error in the sidecar, connections to bound repositories will fail.",
Type: schema.TypeString,
Optional: true,
Default: "failover",
Expand Down
Loading

0 comments on commit 4dc6537

Please sign in to comment.