Closed gvilarino closed 4 years ago
I'm not much of a go
developer, but from what I think I can understand, it seems the crash happens in line 142 of resource_mongodbatlas_encryption_at_rest.go when trying to cast a non-existant value to string.
awsKms["access_key_id"].(string)
I never configured AWS credentials as I want to use only an Azure KeyVault. That code should never be executed, if I understand correctly
Ok, after trying with both the AWS and GCE settings, with empty strings as values and enabled = false
this did work.
However, it wasn't unless reading the code that I sort of figured out how to bypass it. I think the UX for this is not consistent for the core terraform modules; as a common user I didn't expect to have to specify unneeded settings, also my configuration shouldn't have passed terraform validate
Hello @gvilarino thanks for your reviews, we will attend them as son as posible 👍
I have these
mongodbatlas_project
and amongodbatlas_cluster
resources created properly and managed with terraform. I now want to add themongodbatlas_encryption_at_rest
resource so I can encrypt my clusters with my own keys in my Azure KeyVault.Here's my .tf (secrets edited) file:
Terraform crashes as soon as I type
yes
in theapply
confirmation dialogue (after the plan) with the following message:The error stack trace is:
Note that
terraform validate
andterraform plan
go through with no errors.I'm discarding wrong credentials in the resource parameters as the error cause because I'm using the same service principal for Atlas custom key encryption in another cluster.
I'm at a loss here. Please help?