-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Enhancement]: Extend 'aws_msk_cluster' by adding flag for turning on AWS PrivateLink feature (msk multi-vpc) #34419
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Hey @malamin 👋 Thank you for taking the time to raise this! I found #31062, which seems to reference the relatively new |
Hi :) This resource allows to create connection to existing msk cluster from another VPC in another account. To use this resource though, multi-vpc needs to be first enabled on the msk cluster itself (and would be great to
be able to do it with terraform).
|
@justinretzolk Should we consider automating manual steps, such as enabling multi-VPC, by using Terraform? |
Definitely want to be able to do it from terraform myself. Any interface in AWS that involves a long UPDATING wait (which this does) really needs to be automated. Also, the
It appears the correct API is documented at https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn-security.html (we want to update the VpcConnectivityInfo). |
That problem with setting the MSK Cluster Policy appears to me to be a red herring. I saw it also with MSK Serverless, which does not have the multi-VPC requirement (it does it by default). I think the problem in our case is that we were starting deployment of two MSK replicators while the policy was still being set up. If we make the replicators depend on the policies (instead of just the clusters), we reliably set the policies. (We don't reliably set up working replicators, but that'll be another issue when AWS support and I can finally figure out why.) |
The aws_msk_vpc_connection resource appears to be for creating a Managed VPC Connection. As I understand it, a Managed VPC Connection is different than enabling multi-VPC connectivity on a single cluster's network configuration. |
It is terrible that this cannot be enabled by terraform, it is precisely as indicated that there is no option to enable this and it would have to be in the resource "aws_msk_cluster" "multi-vpc = true or false" "multi-vpc = enabled or disabled" |
I found this thread while attempting to use MSK as a source for Opensearch Ingestion, which requires multi-vpc be enabled. You can turn it on with Terraform like so:
|
Based on the testing I have seen, this is not a complete solution and is still dependent on manual configuration in the aws console. |
All of my resources were created via Terraform with no manual intervention and OSIS was able to create the vpc connection to the MSK cluster. |
I did try the above configuration. Yes, it worked but terraform took almost 1hr 15min. to update the private link/ multi-vpc. settings. |
I will try this out again with a new cluster, to see if this actually might
align with our use case
…On Fri, Jun 14, 2024, 2:30 AM Sagar Jadhav ***@***.***> wrote:
I found this thread while attempting to use MSK as a source for Opensearch
Ingestion, which requires multi-vpc be enabled. You can turn it on with
Terraform like so:
resource "aws_msk_cluster" "msk_cluster" {
...
broker_node_group_info {
connectivity_info {
vpc_connectivity {
client_authentication {
sasl {
iam = "true"
}
}
}
}
}
...
}
Based on the testing I have seen, this is not a complete solution and is
still dependent on manual configuration in the aws console.
All of my resources were created via Terraform with no manual intervention
and OSIS was able to create the vpc connection to the MSK cluster.
I did try the above configuration. Yes, it worked but terraform took
almost 1hr 15min. to update the private link/ multi-vpc. settings.
—
Reply to this email directly, view it on GitHub
<#34419 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE54WQPECSONHYL75ZCI54DZHKS3VAVCNFSM6AAAAAA7MW7RJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGUZDONJWGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
After creating MSK provisioned cluster with 'aws_msk_cluster' resource, it is not possible to apply cluster policy with terraform, because option for enabling AWS PrivateLink (MSK multi-VPC) is missing and by default this option is turned off (needs to be turned on manually before applying cluster policy and there is no drift afterwards in 'aws_msk_cluster' resource)
Affected Resource(s) and/or Data Source(s)
aws_msk_cluster, aws_msk_cluster_policy
Potential Terraform Configuration
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: