Skip to content

Commit cacb830

Browse files
authored
doc: Updates Cedar action names and namespaces for Public Preview. (#3017)
* doc: Updates Cedar action names and namespaces for Public Preview. * Revises per tech review. * Revises per tech review. * Updates Private to Public.
1 parent c7c782c commit cacb830

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

docs/data-sources/resource_policies.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`mongodbatlas_resource_policies` returns all resource policies in an organization.
44

5-
-> **NOTE**: Resource Policies are currently in Private Preview. To use this feature, you must take the following actions:
5+
-> **NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
66
1. Enable the `Atlas Resource Policies` Preview Feature in your organization (contact [MongoDB Support](https://www.mongodb.com/services/support)).
77
2. Enable the [Preview Features](https://github.com/mongodb/terraform-provider-mongodbatlas?tab=readme-ov-file#preview-features) when running `terraform` commands.
88

@@ -17,7 +17,7 @@ resource "mongodbatlas_resource_policy" "project_ip_access_list" {
1717
body = <<EOF
1818
forbid (
1919
principal,
20-
action == cloud::Action::"project.edit",
20+
action == ResourcePolicy::Action::"project.ipAccessList.modify",
2121
resource
2222
)
2323
when {
@@ -50,12 +50,12 @@ data "cedar_policyset" "cloud_region" {
5050
any_principal = true
5151
effect = "forbid"
5252
action = {
53-
type = " cloud::Action"
54-
id = "cluster.createEdit"
53+
type = " ResourcePolicy::Action"
54+
id = "cluster.modify"
5555
}
5656
any_resource = true
5757
when {
58-
text = "context.cluster.regions.contains(cloud::region::\"gcp:us-east1\")"
58+
text = "context.cluster.regions.contains(ResourcePolicy::Region::\"gcp:us-east1\")"
5959
}
6060
}
6161
}

docs/data-sources/resource_policy.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`mongodbatlas_resource_policy` describes a resource policy in an organization.
44

5-
-> **NOTE**: Resource Policies are currently in Private Preview. To use this feature, you must take the following actions:
5+
-> **NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
66
1. Enable the `Atlas Resource Policies` Preview Feature in your organization (contact [MongoDB Support](https://www.mongodb.com/services/support)).
77
2. Enable the [Preview Features](https://github.com/mongodb/terraform-provider-mongodbatlas?tab=readme-ov-file#preview-features) when running `terraform` commands.
88

@@ -17,7 +17,7 @@ resource "mongodbatlas_resource_policy" "project_ip_access_list" {
1717
body = <<EOF
1818
forbid (
1919
principal,
20-
action == cloud::Action::"project.edit",
20+
action == ResourcePolicy::Action::"project.ipAccessList.modify",
2121
resource
2222
)
2323
when {
@@ -50,12 +50,12 @@ data "cedar_policyset" "cloud_region" {
5050
any_principal = true
5151
effect = "forbid"
5252
action = {
53-
type = " cloud::Action"
54-
id = "cluster.createEdit"
53+
type = " ResourcePolicy::Action"
54+
id = "cluster.modify"
5555
}
5656
any_resource = true
5757
when {
58-
text = "context.cluster.regions.contains(cloud::region::\"gcp:us-east1\")"
58+
text = "context.cluster.regions.contains(ResourcePolicy::Region::\"gcp:us-east1\")"
5959
}
6060
}
6161
}

docs/resources/resource_policy.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`mongodbatlas_resource_policy` provides a Resource Policy resource. The resource lets you create, edit and delete resource policies to prevent misconfigurations and reduce the need for corrective interventions in your organization.
44

5-
-> **NOTE**: Resource Policies are currently in Private Preview. To use this feature, you must take the following actions:
5+
-> **NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
66
1. Enable the `Atlas Resource Policies` Preview Feature in your organization (contact [MongoDB Support](https://www.mongodb.com/services/support)).
77
2. Enable the [Preview Features](https://github.com/mongodb/terraform-provider-mongodbatlas?tab=readme-ov-file#preview-features) when running `terraform` commands.
88

@@ -19,7 +19,7 @@ resource "mongodbatlas_resource_policy" "project_ip_access_list" {
1919
body = <<EOF
2020
forbid (
2121
principal,
22-
action == cloud::Action::"project.edit",
22+
action == ResourcePolicy::Action::"project.ipAccessList.modify",
2323
resource
2424
)
2525
when {
@@ -52,12 +52,12 @@ data "cedar_policyset" "cloud_region" {
5252
any_principal = true
5353
effect = "forbid"
5454
action = {
55-
type = " cloud::Action"
56-
id = "cluster.createEdit"
55+
type = " ResourcePolicy::Action"
56+
id = "cluster.modify"
5757
}
5858
any_resource = true
5959
when {
60-
text = "context.cluster.regions.contains(cloud::region::\"gcp:us-east1\")"
60+
text = "context.cluster.regions.contains(ResourcePolicy::Region::\"gcp:us-east1\")"
6161
}
6262
}
6363
}

examples/mongodbatlas_resource_policy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MongoDB Atlas Provider -- Atlas Resource Policy
22
This example creates three different resource policies in an organization.
33

4-
**NOTE**: Resource Policies are currently in Private Preview. To use this feature, you must take the following actions:
4+
**NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
55
1. Enable the `Atlas Resource Policies` Preview Feature in your organization (contact [MongoDB Support](https://www.mongodb.com/services/support)).
66
2. Enable the [Preview Features](../../README.md#preview-features) when running `terraform` commands.
77

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
forbid (
22
principal,
3-
action == cloud::Action::"cluster.createEdit",
3+
action == ResourcePolicy::Action::"cluster.modify",
44
resource
55
)
66
when
7-
{ context.cluster.cloudProviders.containsAny([cloud::cloudProvider::"${CLOUD_PROVIDER}"]) };
7+
{ context.cluster.cloudProviders.containsAny([ResourcePolicy::CloudProvider::"${CLOUD_PROVIDER}"]) };

examples/mongodbatlas_resource_policy/main.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resource "mongodbatlas_resource_policy" "project_ip_access_list" {
77
body = <<EOF
88
forbid (
99
principal,
10-
action == cloud::Action::"project.edit",
10+
action == ResourcePolicy::Action::"project.ipAccessList.modify",
1111
resource
1212
)
1313
when {
@@ -40,12 +40,12 @@ data "cedar_policyset" "cloud_region" {
4040
any_principal = true
4141
effect = "forbid"
4242
action = {
43-
type = " cloud::Action"
44-
id = "cluster.createEdit"
43+
type = " ResourcePolicy::Action"
44+
id = "cluster.modify"
4545
}
4646
any_resource = true
4747
when {
48-
text = "context.cluster.regions.contains(cloud::region::\"gcp:us-east1\")"
48+
text = "context.cluster.regions.contains(ResourcePolicy::Region::\"gcp:us-east1\")"
4949
}
5050
}
5151
}

templates/data-sources/resource_policies.md.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`{{.Name}}` returns all resource policies in an organization.
44

5-
-> **NOTE**: Resource Policies are currently in Private Preview. To use this feature, you must take the following actions:
5+
-> **NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
66
1. Enable the `Atlas Resource Policies` Preview Feature in your organization (contact [MongoDB Support](https://www.mongodb.com/services/support)).
77
2. Enable the [Preview Features](https://github.com/mongodb/terraform-provider-mongodbatlas?tab=readme-ov-file#preview-features) when running `terraform` commands.
88

templates/data-sources/resource_policy.md.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`{{.Name}}` describes a resource policy in an organization.
44

5-
-> **NOTE**: Resource Policies are currently in Private Preview. To use this feature, you must take the following actions:
5+
-> **NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
66
1. Enable the `Atlas Resource Policies` Preview Feature in your organization (contact [MongoDB Support](https://www.mongodb.com/services/support)).
77
2. Enable the [Preview Features](https://github.com/mongodb/terraform-provider-mongodbatlas?tab=readme-ov-file#preview-features) when running `terraform` commands.
88

templates/resources/resource_policy.md.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`{{.Name}}` provides a Resource Policy resource. The resource lets you create, edit and delete resource policies to prevent misconfigurations and reduce the need for corrective interventions in your organization.
44

5-
-> **NOTE**: Resource Policies are currently in Private Preview. To use this feature, you must take the following actions:
5+
-> **NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
66
1. Enable the `Atlas Resource Policies` Preview Feature in your organization (contact [MongoDB Support](https://www.mongodb.com/services/support)).
77
2. Enable the [Preview Features](https://github.com/mongodb/terraform-provider-mongodbatlas?tab=readme-ov-file#preview-features) when running `terraform` commands.
88

0 commit comments

Comments
 (0)