Skip to content

Commit

Permalink
fix: adjust block in project_api_key as required to avoid plugin crash (
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinBettati committed Nov 24, 2023
1 parent 9b114cf commit 86df112
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mongodbatlas/resource_mongodbatlas_project_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func resourceMongoDBAtlasProjectAPIKey() *schema.Resource {
},
"project_assignment": {
Type: schema.TypeSet,
Optional: true,
Required: true,
MinItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"project_id": {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/project_api_key.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ resource "mongodbatlas_project_api_key" "test" {
~> **NOTE:** Project created by API Keys must belong to an existing organization.

### project_assignment
List of Project roles that the Programmatic API key needs to have. `project_assignment` attribute is optional.
List of Project roles that the Programmatic API key needs to have. At least one `project_assignment` block must be defined.

* `project_id` - (Required) Project ID to assign to Access Key
* `role_names` - (Required) List of Project roles that the Programmatic API key needs to have. Ensure you provide: at least one role and ensure all roles are valid for the Project. You must specify an array even if you are only associating a single role with the Programmatic API key. The [MongoDB Documentation](https://www.mongodb.com/docs/atlas/reference/user-roles/#project-roles) describes the valid roles that can be assigned.
Expand Down

0 comments on commit 86df112

Please sign in to comment.