-
Notifications
You must be signed in to change notification settings - Fork 189
feat: Adds encryption_at_rest_provider
to mongodbatlas_search_deployment
resource and data source
#3152
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
Conversation
test failures are not related to these changes and are because of the usage of the preview sdk. Will be fixed in CLOUDP-306803 |
APIx bot: a message has been sent to Docs Slack channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
) | ||
mig.SkipIfVersionBelow(t, "1.13.0") | ||
mig.SkipIfVersionBelow(t, "1.30.0") // encryption_at_rest_provider was added in 1.30.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure this feat will be released in 1.30?
It helps to capture all things to do before merge to master in the ticket. Would ensure this version is correct before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, added a comment in CLOUDP-296693 specifying what needs to be done before we merge the dev branch to master and included TODO in b83f556 so that it's harder to miss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice refactors on the file name convention
"github.com/hashicorp/terraform-plugin-framework/types" | ||
) | ||
|
||
type TFSearchDeploymentDSModel struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You can consider refactoring to use DataSourceSchemaFromResource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But DataSourceSchemaFromResource
is for the resource schema, not the TF models? I tried to use TFSearchDeploymentRSModel
everywhere, but the resource model has the timeout attribute, and it should not be in the data source
} | ||
} | ||
|
||
func configBasic(orgID, projectName, clusterName, instanceSize string, searchNodeCount int) string { | ||
clusterConfig := advancedClusterConfig(orgID, projectName, clusterName) | ||
func configBasic(projectID, clusterName, instanceSize string, searchNodeCount int) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Does encryption_at_rest resource need to be defined? At which point is this computes attribute returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to define it, encryption_at_rest_provider attribute already exists in adv_cluster and is Optional/Computed, we want to add it in search_deployment only as Computed, this value can't be changed in search deployments, only in adv_cluster, and search nodes will get the same encryption as the cluster. Attribute is always returned by search deployments API.
* feat: Supports configuring BYOK encryption on search nodes (#3142) * use SDK preview in encryption_at_rest * changelog * Revert "use SDK preview in encryption_at_rest" This reverts commit 609c9dc. * trigger change in EAR * Revert "trigger change in EAR" This reverts commit 15794dd. * Reapply "use SDK preview in encryption_at_rest" This reverts commit 1c2db30. * TEMPORARY: send enabled_for_search_nodes = true * finish resource implementation and tests * data source implementation and test * doc update * default and refactor test * remove old migration test * default value in resource * unit test --------- Co-authored-by: Oriol Arbusi <[email protected]> * feat: Adds `encryption_at_rest_provider` to `mongodbatlas_search_deployment` resource and data source (#3152) * use preview * add encryption_at_rest_provider computed attribute * remove check * dosc * rename files * move adv_cluster config out of resources * fix config * project id * add TODO to version * doc: Updates examples with newly added attributes to `mongodbatlas_search_deployment` and `mongodbatlas_encryption_at_rest` (#3174) * add new attribute to the example * examples updates * nit: end with new line * fix tf validate * todos * PR suggestions + test failure --------- Co-authored-by: Leo Antoli <[email protected]>
Description
Adds computed attribute
encryption_at_rest_provider
tomongodbatlas_search_deployment
resource and data source.It takes 10-15 minutes to apply the encryption, so the API does not return the attribute until encryption is applied
Link to any related issue(s): CLOUDP-296693
Type of change:
Required Checklist:
Further comments