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

Trouble configuring this provider The argument "url" is required, but was not set #17

Open
matthowardcohere opened this issue Nov 2, 2022 · 0 comments

Comments

@matthowardcohere
Copy link

I keep getting an error that

│ Error: Missing required argument
│ 
│ The argument "url" is required, but was not set.

I have tried adding url = "..." in main.tf, providers.tf and s3_snapshot_repository.tf with no change in error
I have deleted all of the .terraform repo and re initialized

This repo was previously working with the philbaker provider being used. I am trying to use this provider because I want to use the elasticsearch_snapshot_lifecycle_policy resource

main.tf

  urls = "~~~Elasticsearch URL~~~"
  insecure = true
}

providers.tf

  backend "s3" {
    bucket = "~~~bucket~~~"
    region = "us-east-2"
    key    = "~~~key~~~"
  }
  required_providers {
    elasticsearch = {
      source = "disaster37/elasticsearch"
      version = "7.16.1"
    }
  }
}

providers.tf

resource elasticsearch_snapshot_repository "repo" {
  name = "es-index-backups"
  type = "s3"
  settings = {
    "bucket" = "~~~snapshot bucket~~~"
    "region" = "us-east-2"
  }
}

resource "elasticsearch_snapshot_lifecycle_policy" "policy" {
  name            = "terraform-policy-test"
  snapshot_name = "<daily-snap-{now/d}>"
  schedule         = "0 30 1 * * ?"
  repository    = "es-index-backups"
  configs        = <<EOF
{
    "indices": ["test-*"],
    "ignore_unavailable": false,
    "include_global_state": false
}
EOF

}
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