You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* use SDK dev-preview
* chore: Creates schema for the new `mongodbatlas_resource_policy` (#2548)
* chore: Creates TF models & interfaces for new
* fix: attribute computed-optional-required types
* only include schema changes in PR
* chore: copy solution for making build test from `CLOUDP-246459-ear-kms-dev` branch
* fix: add missing OrgID to model
* chore: add non_compliant and remove comment from generator_config.yml
* fix: add plan modifier to `version`
* chore: add markdown descriptions
* chore: Creates schema for the new mongodbatlas_resource_policy data sources (#2563)
* chore: data-source schemas for resource_policy
* chore: copy solution for making build test from `CLOUDP-246459-ear-kms-dev` branch
* chore: add markdown descriptions
* chore: Adds `resource_policy` model conversions (#2575)
* feat: sdk -> tf conversion test
* chore: add add check for policy too
* refactor: use stringPointerValue and avoid types.ObjectValueMust
* refactor: use auto-generated version
* chore: rename apiResp to input
* test: add more test cases and support NewTFPoliciesModelToSDK
* chore: nil check
* fix: nil object pointers
* refactor: use `diags *diag.Diagnostics` as argument instead of return value
* refactor: continued simplifications to avoid *types.Object|List
* refactor: return variable directly
* refactor: another round
* test: refactor test to create the TF model
* test: add utility function for creating TF objects/lists for framework types
* chore: remove leftover comment
* refactor: use a []TFPolicy directly in the schema
* chore: remove accidental AttributeTypes function
* feat: Implements `resource_policy` (#2585)
* feat: initial resource implementation
* test: minor fixes
* test: add a new client for RP organization
* chore: add variables for dev to CI
* test: use new variables in resource policy test
* test: add the default main_test.go file
* chore: fix accidental indentation
* chore: add changelog file
* test: fix use explicit provider config in the resource test
* test: add test case for NewTFPoliciesModelToSDK
* ci: remove rp_base_url and support qa environment
* chore: remove base url from RP
* fix: avoid using MONGODB_ATLAS_BASE_URL
* test: remember to set the BaseURL
* test: remove additional provider, instead map the inut/secret variables in GH action
* fix: address PR comments
* feat: Implements and tests resource_policy data-source (#2598)
* feat: resource_policy data-source implementation and test
* chore: remove unused data_source test
* feat: resource_policies data-source implementation and test
* doc: include changelog file
* chore: minor fixes
* perform review suggestions
* chore: Merges master and use `name` as required (#2620)
* chore: Supports detecting policy errors during terraform plan (#2621)
* chore: support validating during plan
* refactor: move AddJSONErrDiagnostics to separate function
* chore: avoid POLICY_CANNOT_CONTAIN_A_DUPLICATE_NAME by using a random name when validating
* address PR comments
* test: Adds migration tests and more acceptance tests (#2622)
* test: Adds migration test
* refactor: includes name in error message
* test: Add case for multiple nested policies
* test: cleanup assertions and run sequentially to avoid assertion errors
* chore: address PR comment
* fix: link to correct upstream issue
* doc: Adds example and registry docs for resource_policy (#2623)
* doc: Adds initial example
* doc: Adds registry documentation for resource_policy
* doc: Apply doc review suggestions
* chore: Uses name of resource policy instead of random value when validating (#2644)
* fix resource policy sdk api change
* Update .changelog/2585.txt
Co-authored-by: Leo Antoli <[email protected]>
* revert change
---------
Co-authored-by: EspenAlbert <[email protected]>
Co-authored-by: Espen Albert <[email protected]>
Co-authored-by: Leo Antoli <[email protected]>
`mongodbatlas_resource_policies` returns all resource policies in an organization.
4
+
5
+
-> **NOTE**: Resource Policies are currently in Public Preview. To use this feature, you must take the following actions:
6
+
1. Enable the `Atlas Resource Policies` Beta Feature in your organization (contact MongoDB Support).
7
+
2. Enable the [Preview Features](https://github.com/mongodb/terraform-provider-mongodbatlas?tab=readme-ov-file#preview-features) when running `terraform` commands.
value = { for policy in data.mongodbatlas_resource_policies.this.resource_policies : policy.name => policy.id }
88
+
}
89
+
```
90
+
91
+
<!-- schema generated by tfplugindocs -->
92
+
## Schema
93
+
94
+
### Required
95
+
96
+
-`org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access.
97
+
98
+
### Read-Only
99
+
100
+
-`resource_policies` (Attributes List) (see [below for nested schema](#nestedatt--resource_policies))
101
+
102
+
<aid="nestedatt--resource_policies"></a>
103
+
### Nested Schema for `resource_policies`
104
+
105
+
Read-Only:
106
+
107
+
-`created_by_user` (Attributes) The user that last updated the Atlas resource policy. (see [below for nested schema](#nestedatt--resource_policies--created_by_user))
108
+
-`created_date` (String) Date and time in UTC when the Atlas resource policy was created.
109
+
-`id` (String) Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
110
+
-`last_updated_by_user` (Attributes) The user that last updated the Atlas resource policy. (see [below for nested schema](#nestedatt--resource_policies--last_updated_by_user))
111
+
-`last_updated_date` (String) Date and time in UTC when the Atlas resource policy was last updated.
112
+
-`name` (String) Human-readable label that describes the Atlas resource policy.
113
+
-`org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access.
114
+
-`policies` (Attributes List) List of policies that make up the Atlas resource policy. (see [below for nested schema](#nestedatt--resource_policies--policies))
115
+
-`version` (String) A string that identifies the version of the Atlas resource policy.
0 commit comments