You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/guides/resource_discovery.html.markdown
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,9 @@ terraform-provider-oci -command=export -compartment_id=<OCID of compartment to e
102
102
This command will discover resources within your compartment and generates Terraform configuration files in the given `output_path`.
103
103
The generated `.tf` files contain the Terraform configuration with the resources that the command has discovered.
104
104
105
+
> **Note:**
106
+
Make sure the `output_path` is empty before running resource discovery
107
+
105
108
**Parameter Description**
106
109
107
110
*`command` - Command to run. Supported commands include:
@@ -110,10 +113,13 @@ The generated `.tf` files contain the Terraform configuration with the resources
110
113
*`list_export_services` - Lists the allowed values for services arguments along with scope in json format
111
114
*`compartment_id` - OCID of a compartment to export. If `compartment_id` or `compartment_name` is not specified, the root compartment will be used
112
115
*`compartment_name` - The name of a compartment to export. Use this instead of `compartment_id` to provide a compartment name
116
+
*`exclude_services` - Comma-separated list of service resources to exclude from export. If a service is present in both 'services' and 'exclude_services' argument, it will be excluded
113
117
*`generate_state` - Provide this flag to import the discovered resources into a state file along with the Terraform configuration
114
-
*`ids` - Comma-separated list of resource IDs to export. The ID could either be an OCID or a Terraform import ID. By default, all resources are exported
118
+
*`ids` - Comma-separated list of tuples <resourceType:resourceID> e.g. `oci_core_instance:ocid.....`for resources to export. The ID could either be an OCID or a Terraform import ID. By default, all resources are exported
115
119
*`list_export_services_path` - Path to output list of supported services in json format, must include json file name
116
120
*`output_path` - Absolute path to output generated configurations and state files of the exported compartment
121
+
*`parallelism` - The number of threads to use for resource discovery. By default the value is 1
122
+
*`retry_timeout` - The time duration for which API calls will wait and retry operation in case of API errors. By default, the retry timeout duration is 15s
117
123
*`services` - Comma-separated list of service resources to export. If not specified, all resources within the given compartment (which excludes identity resources) are exported. The following values can be specified:
118
124
*`adm` - Discovers adm resources within the specified compartment
119
125
*`ai_anomaly_detection` - Discovers ai_anomaly_detection resources within the specified compartment
0 commit comments