-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
MSK Configuration ConflictException #8898
Comments
Hi @navinsnn53 👋
In MSK, Clusters and Configurations are two separate pieces of functionality. The same Configuration can be assigned to multiple Clusters. The MSK Configuration API does not currently have a method to delete MSK Configurations. If you would like this functionality, please create a feature request through an AWS Support Case or contact your AWS account managers if you have any.
The AWS CLI supports listing configurations on the latest version: $ aws kafka list-configurations
{
"Configurations": [
{
"Arn": "arn:aws:kafka:us-west-2:--OMITTED--:configuration/kk7h810o7o7wqb67xbljacjs90yfdpx4xdh3ujc44zld4ywdtl17qjlho96gdgm3u/764ca18b-72f2-40a9-be58-40c702dad622-3",
"CreationTime": "2019-05-22T17:30:16.49Z",
"KafkaVersions": [
"2.1.0"
],
"LatestRevision": {
"CreationTime": "2019-05-22T17:30:16.49Z",
"Revision": 1
},
"Name": "kk7h810o7o7wqb67xbljacjs90yfdpx4xdh3ujc44zld4ywdtl17qjlho96gdgm3u"
},
... To get this functionality added within the AWS console, you will also need to reach out to AWS Support.
No, you must configure this in the resource "aws_msk_configuration" "example" {
# ... other configuration ...
}
resource "aws_msk_cluster" "example" {
# ... other configuration ..
configuration_info {
arn = "${aws_msk_configuration.example.arn}"
revision = "${aws_msk_configuration.example.latest_revision}"
}
} Hope this helps. If you're looking for general assistance, please note that we use GitHub issues in this repository for tracking bugs and enhancements with the Terraform AWS Provider codebase rather than for questions. While we may be able to help with certain simple problems here it's generally better to use one of the community forums where there are far more people ready to help, whereas the GitHub issues here are generally monitored only by a few maintainers and dedicated community members interested in code development of the Terraform AWS Provider itself. |
Thanks soo much. Also can you please suggest some open Community forum for terraform so that I can stop posting to GitHub for any of my support related queries. |
The HashiCorp Discuss site was recently released which will likely supersede some of the forums listed on the current Terraform community page. |
Thanks |
@bflad since there is no way to delete the configuration. After doing a
I will be raising the
|
@bflad tried to manually import in order for
|
@bflad looks like import would require another parameter in this case in order to describe a revision... so would either need to specify a revision or default to latest. So something like Pretty sure that's what the bad paramater is about since in order to get the actual config you need to get the ARN and then get the revision itself. |
In case anyone is interested here is my workaround for this issue. I have a yaml file like this
I then pass this into my msk module
in my module I reference the yaml like this:
and then configure the configuration resource like this
If for some reason md5 hash creates situation where name is too long, you could also use a manual version bump to trigger the new configuration. Seems like given the limitations of the AWS msk API, terraform should only support name prefix for msk configuration and then if there is a change update the name suffix which triggers a new configuration to use for updating the cluster. Yes you could end up with a ton of configurations in AWS, but that is not a limitation of terraform, so not much you can do about it. |
Interesting approach @braunreyes. But won't it still fail in the case in question i.e. if you try to re-create the environment with the same configuration properties? |
This was more in response to @cdenneen comment on Jun 13. I ran into issue where updating the configuration was not working because of the behavior of configuration name. My workaround was the only way it could create a fully idempotent process for updating the msk configuration and applying to cluster. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Hi all,
I have created MSK_cluster with custom configuration. I have destroyed the already launched MSK_cluster but still, it shows below error. Can you guys guide me where I am wrong? From AWS end there is no option to see existing configuration without the creation of the cluster.
"Error: error creating MSK Configuration: ConflictException: A resource with this name already exists.
status code: 409, request id: 4165917f-88ee-11e9-b19e-7f35f422cc65
on msk.tf line 29, in resource "aws_msk_configuration" "sample":
29: resource "aws_msk_configuration" "sample" { . "
Also just by using the resource "aws_msk_configuration" will it be linked to resource "aws_msk_cluster" ?? here is my below code for reference:
MSK_Cluster Creation
resource "aws_msk_cluster" "msk" {
cluster_name = "TestingCluster"
kafka_version = "2.1.0"
number_of_broker_nodes = 3
broker_node_group_info {
instance_type = "kafka.m5.large"
client_subnets = [
"${var.subnet_c}",
"${var.subnet_b}",
"${var.subnet_a}",
]
ebs_volume_size = 5
security_groups = ["${var.msk_sg}"]
}
tags = {
Name = "TestingCluster"
}
}
MSK Configuration
resource "aws_msk_configuration" "msk" {
kafka_versions = ["2.1.0"]
name = "sample"
server_properties = <<PROPERTIES
auto.create.topics.enable = true
delete.topic.enable = true
PROPERTIES
}
~
The text was updated successfully, but these errors were encountered: