Open quercusilvam opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
Workaround:
You can change value to explicit false
. This way it works, cluster will be updated.
client_authentication {
tls {
certificate_authority_arns = "arn:aws:acm-pca:eu-west-1:XXXXXX:certificate-authority/123456789"
}
sasl {
iam = false
}
unauthenticated = false
}
Unfortunately if you remove afterwards the sasl block you will get never-ending updates of a cluster at next terraform apply as described here: https://github.com/hashicorp/terraform-provider-aws/issues/24914#issuecomment-1509301036
I've also tested what will happen if I set false
for not used authentication methods (I've simulated default value described in provider documentation).
client_authentication {
tls {
certificate_authority_arns = local.pca_arn
}
sasl {
iam = false
scram = false
}
unauthenticated = false
}
And it is working correctly - I can create MSK cluster, in state file iam/scram methods are set to false. Terraform plan after creation report no changes.
In my opinion this could be valid fix - set false
values if blocks are missing (not null
as is this now).
Terraform Core Version
1.3.1
AWS Provider Version
4.63.0
Affected Resource(s)
aws_msk_cluster
Expected Behavior
After adding sasl or tls authentication for MSK cluster, removing them should also turn off those settings on AWS MSK. As described in documentation, defaults should be
false
which should turn off removed authentication method.Actual Behavior
Removing sasl or tls config in client_authentication block tries to set corresponding options from
true
tonull
but this is not working. As a result AWS MSK authentication options still includes removed method(s).Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Just remove sasl block
Debug Output
Terraform plan shows those changes (set to
nulls
instead offalse
). But this will not workPanic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None