Skip to content
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

Make MSK Cluster create timeouts configurable #17726

Closed
Stratouklos opened this issue Feb 19, 2021 · 4 comments · Fixed by #14627
Closed

Make MSK Cluster create timeouts configurable #17726

Stratouklos opened this issue Feb 19, 2021 · 4 comments · Fixed by #14627
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/kafka Issues and PRs that pertain to the kafka service.
Milestone

Comments

@Stratouklos
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

New AWS MSK Clusters can routinely take close to 60 minutes or more to be created. This causes timeouts and in subsequent runs the resource shows as tainted requiring manual untainting.

New or Affected Resource(s)

  • aws_msk_cluster

Potential Terraform Configuration

resource "aws_msk_cluster" "kafka" {
  cluster_name           = local.service
  kafka_version          = var.kafka_version
  number_of_broker_nodes = var.number_of_broker_nodes

  broker_node_group_info {
    instance_type   = var.instance_type
    ebs_volume_size = var.ebs_volume_size
    client_subnets  = flatten([for s in data.aws_subnet_ids.private : s.ids])
    security_groups = [aws_security_group.kafka.id]
  }

  configuration_info {
    arn      = aws_msk_configuration.kafka.arn
    revision = aws_msk_configuration.kafka.latest_revision
  }

  encryption_info {
    encryption_at_rest_kms_key_arn = aws_kms_key.kafka_key.arn

    encryption_in_transit {
      client_broker = "TLS"
      in_cluster    = true
    }
  }

  client_authentication {
    sasl {
      scram = true
    }
  }

  open_monitoring {
    prometheus {
      jmx_exporter {
        enabled_in_broker = true
      }
      node_exporter {
        enabled_in_broker = true
      }
    }
  }

  logging_info {
    broker_logs {
      cloudwatch_logs {
        enabled   = true
        log_group = aws_cloudwatch_log_group.broker_logs.name
      }
    }
  }

  timeouts {
    create = "2h" # As of Feb 2021 MSK clusters can take 1h or more to be created 
  }
}

References

  • NA
@Stratouklos Stratouklos added the enhancement Requests to existing resources that expand the functionality or scope. label Feb 19, 2021
@ghost ghost added the service/kafka Issues and PRs that pertain to the kafka service. label Feb 19, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 19, 2021
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Feb 20, 2021
@ewbankkit
Copy link
Contributor

For creation (1h):

func waitForMskClusterCreation(conn *kafka.Kafka, arn string) error {
input := &kafka.DescribeClusterInput{
ClusterArn: aws.String(arn),
}
err := resource.Retry(60*time.Minute, func() *resource.RetryError {

but for other cluster operations (2h):

func waitForMskClusterOperation(conn *kafka.Kafka, clusterOperationARN string) error {
stateConf := &resource.StateChangeConf{
Pending: []string{"PENDING", "UPDATE_IN_PROGRESS"},
Target: []string{"UPDATE_COMPLETE"},
Refresh: mskClusterOperationRefreshFunc(conn, clusterOperationARN),
Timeout: 2 * time.Hour,
}

@mgusiew-guide
Copy link
Contributor

FTR there is another issue describing this problem: #11736

@github-actions
Copy link

This functionality has been released in v3.60.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/kafka Issues and PRs that pertain to the kafka service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants