Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate: optional root project_id attribute in mongdbatlas_project_api_key is deprecated #1665

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mongodbatlas/resource_project_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"go.mongodb.org/atlas-sdk/v20231115001/admin"
Expand All @@ -30,8 +31,9 @@ func ResourceProjectAPIKey() *schema.Resource {
},
Schema: map[string]*schema.Schema{
"project_id": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByVersion, "1.16.0"),
},
"api_key_id": {
Type: schema.TypeString,
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 @@ -46,7 +46,7 @@ resource "mongodbatlas_project_api_key" "test" {
## Argument Reference

* `description` - (Required) Description of this Project API key.
* `project_id` - Unique 24-hexadecimal digit string that identifies your project.
* `project_id` - Unique 24-hexadecimal digit string that identifies your project. **WARNING:** this parameter is deprecated as it no longer needs to be defined. It will be removed in version 1.16.0.
andreaangiolillo marked this conversation as resolved.
Show resolved Hide resolved

~> **NOTE:** Project created by API Keys must belong to an existing organization.

Expand Down
Loading