Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maastha committed Sep 4, 2024
1 parent af022c3 commit 23ca1d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
4 changes: 1 addition & 3 deletions docs/data-sources/encryption_at_rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ output "is_gcp_encryption_at_rest_valid" {

### Required

- `project_id` (String) Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.

**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
- `project_id` (String) Unique 24-hexadecimal digit string that identifies your project.

### Read-Only

Expand Down
4 changes: 1 addition & 3 deletions docs/resources/encryption_at_rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ resource "mongodbatlas_encryption_at_rest" "test" {

### Required

- `project_id` (String) Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.

**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
- `project_id` (String) Unique 24-hexadecimal digit string that identifies your project.

### Optional

Expand Down
4 changes: 2 additions & 2 deletions internal/service/encryptionatrest/data_source_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
},
"project_id": schema.StringAttribute{
Required: true,
Description: "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.",
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.",
Description: "Unique 24-hexadecimal digit string that identifies your project.",
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies your project.",
},
"id": schema.StringAttribute{
Computed: true,
Expand Down
7 changes: 4 additions & 3 deletions internal/service/encryptionatrest/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"reflect"
"time"

"go.mongodb.org/atlas-sdk/v20240805003/admin"

"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
Expand All @@ -25,7 +27,6 @@ import (
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/validate"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/project"
"go.mongodb.org/atlas-sdk/v20240805003/admin"
)

const (
Expand Down Expand Up @@ -102,8 +103,8 @@ func (r *encryptionAtRestRS) Schema(ctx context.Context, req resource.SchemaRequ
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
},
Description: "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.",
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.",
Description: "Unique 24-hexadecimal digit string that identifies your project.",
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies your project.",
},
},
Blocks: map[string]schema.Block{
Expand Down
2 changes: 2 additions & 0 deletions templates/resources/encryption_at_rest.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[Azure Key Vault](https://docs.atlas.mongodb.com/security-azure-kms/#security-azure-kms)
[Google Cloud KMS](https://docs.atlas.mongodb.com/security-gcp-kms/#security-gcp-kms)

The [encryption at rest Terraform module](https://registry.terraform.io/modules/terraform-mongodbatlas-modules/encryption-at-rest/mongodbatlas/latest) makes use of this resource and simplifies its use.

After configuring at least one Encryption at Rest provider for the Atlas project, Project Owners can enable Encryption at Rest for each Atlas cluster for which they require encryption. The Encryption at Rest provider does not have to match the cluster cloud service provider.

Atlas does not automatically rotate user-managed encryption keys. Defer to your preferred Encryption at Rest provider’s documentation and guidance for best practices on key rotation. Atlas automatically creates a 90-day key rotation alert when you configure Encryption at Rest using your Key Management in an Atlas project.
Expand Down

0 comments on commit 23ca1d4

Please sign in to comment.