terraform-provider-infoblox icon indicating copy to clipboard operation
terraform-provider-infoblox copied to clipboard

get a reference for the resource you want to import (ex. by using curl tool): What does this mean?

Open grimm26 opened this issue 2 years ago • 3 comments

Seen at https://github.com/infobloxopen/terraform-provider-infoblox/blob/master/docs/index.md?plain=1#L77

What does "get a reference for the resource you want to import (ex. by using curl tool)" mean? Please provide an example curl command or something that is descriptive besides "use something like curl to get a reference."

grimm26 avatar Dec 13 '22 22:12 grimm26

I have a feeling this is to describe the ID of the resource you want to import. The ID is a guid resource in the infoblox grid, the easiest way to get it is to query the infoblox WAPI for the object you are looking for.

slabastie avatar Dec 15 '22 22:12 slabastie

I have a feeling this is to describe the ID of the resource you want to import. The ID is a guid resource in the infoblox grid, the easiest way to get it is to query the infoblox WAPI for the object you are looking for.

query how?

grimm26 avatar Mar 10 '23 13:03 grimm26

there are two types of reference you can use to import your object

  1. call by reference that we use in our .tf files to call a object we created in the same .tf file read more blog
  2. other by obtaining a reference via a wapi call you can fetch objects via a simple curl command wapi documentation you will always get a reference id in the response with ref:xx***********xx format you can use this reference ID as well for importing your resource
  3. you can also obtain this similar reference ID in your terminal when you create a object via your terraform configuration file

mgupta8 avatar Jun 12 '24 10:06 mgupta8