Skip to content

Conversation

@tobio
Copy link
Member

@tobio tobio commented Dec 6, 2022

Configuring provider connection configuration on a per-resource basis isn't supported during import operations, and duplicates the core Terraform aliases provider functionality.

Marking these attributes as deprecated as the first step to removing them in a future version of the provider.

Related to #203

@tobio tobio requested review from Kushmaro and webfella December 6, 2022 03:11
@tobio tobio self-assigned this Dec 6, 2022
Copy link

@webfella webfella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Big 👍👍 for adding the guide for multiple deployments too mate!

@tobio tobio merged commit 351ba9e into main Dec 14, 2022
@tobio tobio deleted the deprecate-elasticsearch-connection branch December 14, 2022 03:04
@orlandothoeny
Copy link

This change makes it impossible to create a new ec_deployment instance + resources like an Elasticsearch User inside a single module without ugly workarounds

@orlandothoeny
Copy link

Got it to work using

provider "elasticstack" {
  elasticsearch {
    endpoints = [ec_deployment.deployment.elasticsearch.https_endpoint]
    username  = google_secret_manager_secret_version.root_user.secret_data
    password  = google_secret_manager_secret_version.root_password.secret_data
  }
}

However, had to manually remove the existing user resource from the state, always got an authentication error before.

@mveroone
Copy link

mveroone commented Aug 3, 2025

Got it to work using

provider "elasticstack" {
  elasticsearch {
    endpoints = [ec_deployment.deployment.elasticsearch.https_endpoint]
    username  = google_secret_manager_secret_version.root_user.secret_data
    password  = google_secret_manager_secret_version.root_password.secret_data
  }
}

However, had to manually remove the existing user resource from the state, always got an authentication error before.

That won't work if you're creating an undetermined number of deployments in the code and create elasticstack resources over all of them, while elasticsearch_connection does.

I disagree on the initial premise of this PR that the behavior "Duplicates core terraform provider alias feature". It allows for more. Platform-engineering using both providers will be a nightmare without that per-resource block.

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

Successfully merging this pull request may close these issues.

5 participants