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

feature request: import resource #170

Open
edwinsalazar opened this issue Jun 14, 2024 · 3 comments
Open

feature request: import resource #170

edwinsalazar opened this issue Jun 14, 2024 · 3 comments

Comments

@edwinsalazar
Copy link

if there is any plan to develop import resource from existing TE configurations as TE TF resources
https://developer.hashicorp.com/terraform/language/import

@ncat-epic
Copy link

Hello - is there a way to add in the "import" feature for the ThousandEyes Terraform Provider? This is critical to not only import current Tests, but also for recovery of the Terraform State.

Thank you.

@ncat-epic
Copy link

OK - after some testing, even though it is not documented, and these issues exist for it, import does work with the Test ID:

  1. Get the Test ID from the API with curl
  2. create the Test Resource in the Terraform file
  3. import the Test

Example:

curl https://api.thousandeyes.com/v7/tests --header "Authorization: Bearer "

resource "thousandeyes_http_server" "example_test" {
...[required options]
}

terraform import thousandeyes_http_server.example_test <test_id>

terraform plan #to update the Test with any changes made to the Test in the Terraform .tf file

@joaomper-TE
Copy link
Contributor

Hi @ncat-epic,

Thank you for identifying this and providing such a detailed explanation. We will incorporate this into the documentation and plan to resolve these issues shortly.

Much appreciated!

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

3 participants