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

context deadline exceeded for creating elasticsearch_opensearch_role #356

Open
synfinatic opened this issue Jul 11, 2023 · 2 comments
Open

Comments

@synfinatic
Copy link

error:

elasticsearch_opensearch_role.event-trace: Creating...
╷
│ Error: context deadline exceeded
│
│   with elasticsearch_opensearch_role.event-trace,
│   on kibana.tf line 30, in resource "elasticsearch_opensearch_role" "event-trace":
│   30: resource "elasticsearch_opensearch_role" "event-trace" {

Note the line numbers above don't match the code below...

provider "elasticsearch" {
  url        = "https://${aws_opensearch_domain.fbl_event_trace.endpoint}"
  kibana_url = "https://${aws_opensearch_domain.fbl_event_trace.kibana_endpoint}"

  elasticsearch_version = var.opensearch_version
  username              = local.admin_username
  password              = random_password.terraform_admin.result
  aws_region            = local.region

  sniff             = true
  sign_aws_requests = false
  healthcheck       = true
}

# Create an ES role and map it to the IAM role
resource "elasticsearch_opensearch_role" "event-trace" {
  role_name   = "event_trace"
  description = "Event Trace Container Role"

  index_permissions {
    index_patterns = [
      "events*",
      "transitions*",
      "event-log*",
    ]

    allowed_actions = [
      "data_access",
      "delete",
      "index",
      "get",
      "search",
    ]
  }
}

I should mention this is the first resource I'm trying to create via the elasticsearch provider.

@synfinatic
Copy link
Author

I should mention if I change the password to "foobar" in the provider, I get an authentication error, so I know it's not some firewall dropping the connection on the floor.

@synfinatic
Copy link
Author

oh, apparently this is because of sniff = true? I'm not sure why that is, but definitely would be great if the error message provided some clue about what is going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant