-
Notifications
You must be signed in to change notification settings - Fork 167
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
INTMDB-243: Fixes a bug for encryption at rest with new parameters #522
Conversation
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.
Just some nitpicks
azure_environment = "AZURE" | ||
subscription_id = var.subscription_id | ||
resource_group_name = var.resource_group_name | ||
key_vault_name = var.key_vault_name |
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.
can we properly format this?
key_identifier = var.key_identifier | ||
secret = var.client_secret | ||
tenant_id = var.tenant_id | ||
} |
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.
this also needs formatting
resource "mongodbatlas_encryption_at_rest" "test" { | ||
project_id = mongodbatlas_project.test.id | ||
|
||
google_cloud_kms = { |
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.
format this too
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.
Left a couple of questions, let's also format those examples as has been requested, I'm merging #529 soon to make sure they are always
@@ -1,12 +1,12 @@ | |||
// +build integration |
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.
[q] I've been setting up the repo thru the day and going with docs code, is the plan to stop taging integration tests? it seems some are using it and some are not, can we decide on this and updates docs accordingly (some of the docs on how to test reference the use of tags)?
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.
Ok, forgot to un comment that part, I have to make another PR with fork because I cannot make changes and push
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.
@coderGo93 can you address this now?
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.
I'm not sure why was added this line but it seems better to delete this line because in GNUMakefile it's already separating from normal tests with make test
, the other similar line is in the resource_mongodbatlas_cloud_provider_access_test.go
from integrationtesting
folder, should I remove the line as well in this PR? @themantissa
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.
I'm not entirely sure, if you feel it should be removed please do.
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.
understood and removed, thank you melissa
@@ -323,19 +322,22 @@ func resourceMongoDBAtlasEncryptionAtRestRead(ctx context.Context, d *schema.Res | |||
if len(values2) != 0 { | |||
value := values2[0].(map[string]interface{}) | |||
if !counterEmptyValues(value) { | |||
aws, awsOk := d.GetOk("aws_kms") | |||
aws, awsOk := d.GetOk("aws_kms_config") |
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.
line 280 says aws_kms
are both different things? what's the difference?
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.
The difference between aws_kms
and aws_kms_config
is the schema, I have to changed that because in new tf it fails to pass the make test
because using TypeMap as object is not allowed, it should be used as TypeList with Max items 1
@@ -177,7 +177,7 @@ func resourceMongoDBAtlasEncryptionAtRest() *schema.Resource { | |||
Schema: map[string]*schema.Schema{ | |||
"enabled": { | |||
Type: schema.TypeBool, | |||
Optional: true, | |||
Required: true, |
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.
[q] would this be a breaking change if I did not set it?
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.
I changed to Required because I re read the docs and the parameter enabled is required
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.
it's probably a silly question from me just making sure if people where not setting it on their files (as it was optional) will start having errors now that's required
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, will rollback to optional then, thank you gustavo
Will close this PR to create another PR |
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, will merge.
Description
enabled
setting with the default when it shouldn'tTested manually with Aws, GCP and Azure credentials and it worked without appearing changes after terraform plan
Results of Terratest
Upgrades for AWS/GCP/Azure
Create for AWS/GCP/Azure
Link to any related issue(s):
Type of change:
Required Checklist:
Further comments