Skip to content

Commit 002ff0c

Browse files
author
Yi Fan
committed
Support resource discovery for healthChecks resources
1 parent c75a9d4 commit 002ff0c

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Added
44
- Support resource discovery for `streaming` resources
5+
- Support resource discovery for `healthChecks` resources
56

67
### Fixed
78
- Fixed DNS outage causing problems for DNS records

oci/export_definitions.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,22 @@ var exportFunctionsFunctionHints = &TerraformResourceHints{
403403
},
404404
}
405405

406+
var exportHealthChecksHttpMonitorHints = &TerraformResourceHints{
407+
resourceClass: "oci_health_checks_http_monitor",
408+
datasourceClass: "oci_health_checks_http_monitors",
409+
datasourceItemsAttr: "http_monitors",
410+
resourceAbbreviation: "http_monitor",
411+
requireResourceRefresh: true,
412+
}
413+
414+
var exportHealthChecksPingMonitorHints = &TerraformResourceHints{
415+
resourceClass: "oci_health_checks_ping_monitor",
416+
datasourceClass: "oci_health_checks_ping_monitors",
417+
datasourceItemsAttr: "ping_monitors",
418+
resourceAbbreviation: "ping_monitor",
419+
requireResourceRefresh: true,
420+
}
421+
406422
var exportIdentityApiKeyHints = &TerraformResourceHints{
407423
resourceClass: "oci_identity_api_key",
408424
datasourceClass: "oci_identity_api_keys",

oci/export_graphs.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var compartmentResourceGraphs = map[string]TerraformResourceGraph{
2929
"core": coreResourceGraph,
3030
"database": databaseResourceGraph,
3131
"functions": functionsResourceGraph,
32+
"health_checks": healthChecksResourceGraph,
3233
"load_balancer": loadBalancerResourceGraph,
3334
"object_storage": objectStorageResourceGraph,
3435
"streaming": streamingResourceGraph,
@@ -185,6 +186,13 @@ var functionsResourceGraph = TerraformResourceGraph{
185186
},
186187
}
187188

189+
var healthChecksResourceGraph = TerraformResourceGraph{
190+
"oci_identity_compartment": {
191+
{TerraformResourceHints: exportHealthChecksHttpMonitorHints},
192+
{TerraformResourceHints: exportHealthChecksPingMonitorHints},
193+
},
194+
}
195+
188196
var identityResourceGraph = TerraformResourceGraph{
189197
"oci_identity_tenancy": {
190198
{TerraformResourceHints: exportIdentityAuthenticationPolicyHints},

website/docs/guides/resource_discovery.html.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ The generated `.tf` files contain the Terraform configuration with the resources
9797
* `core` - Discovers compute, block storage, and networking resources within the specified compartment
9898
* `database` - Discovers database resources within the specified compartment
9999
* `functions` - Discovers functions resources within the specified compartment
100+
* `health_checks` - Discovers health_checks resources within the specified compartment
100101
* `identity` - Discovers identity resources across the entire tenancy
101102
* `limits` - Discovers limits resources across the entire tenancy
102103
* `load_balancer` - Discovers load balancer resources within the specified compartment
@@ -235,6 +236,11 @@ functions
235236
* oci\_functions\_application
236237
* oci\_functions\_function
237238

239+
health_checks
240+
241+
* oci\_health\_checks\_http\_monitor
242+
* oci\_health\_checks\_ping\_monitor
243+
238244
identity
239245

240246
* oci\_identity\_api\_key

0 commit comments

Comments
 (0)