Skip to content

Commit

Permalink
[datadog_ip_ranges] Adds orchestrator to the resource (#1781)
Browse files Browse the repository at this point in the history
* Adds orchestrator to the datadog_ip_ranges resource

* Bumps Go client to v2.9.0

* Updates doc to add orchestrator

* Update the test and cassettes
  • Loading branch information
tbavelier authored Feb 17, 2023
1 parent 88bfdf9 commit 95d8bf1
Show file tree
Hide file tree
Showing 7 changed files with 438 additions and 1,184 deletions.
15 changes: 15 additions & 0 deletions datadog/data_source_datadog_ip_ranges.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ func dataSourceDatadogIPRanges() *schema.Resource {
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"orchestrator_ipv4": {
Description: "An Array of IPv4 addresses in CIDR format specifying the A records for the Orchestrator endpoint.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"process_ipv4": {
Description: "An Array of IPv4 addresses in CIDR format specifying the A records for the Process endpoint.",
Type: schema.TypeList,
Expand Down Expand Up @@ -91,6 +97,12 @@ func dataSourceDatadogIPRanges() *schema.Resource {
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"orchestrator_ipv6": {
Description: "An Array of IPv6 addresses in CIDR format specifying the A records for the Orchestrator endpoint.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"process_ipv6": {
Description: "An Array of IPv6 addresses in CIDR format specifying the A records for the Process endpoint.",
Type: schema.TypeList,
Expand Down Expand Up @@ -137,6 +149,7 @@ func dataSourceDatadogIPRangesRead(ctx context.Context, d *schema.ResourceData,
api := ipAddressesPtr.GetApi()
apm := ipAddressesPtr.GetApm()
logs := ipAddressesPtr.GetLogs()
orchestrator := ipAddressesPtr.GetOrchestrator()
process := ipAddressesPtr.GetProcess()
synthetics := ipAddressesPtr.GetSynthetics()
webhook := ipAddressesPtr.GetWebhooks()
Expand All @@ -158,6 +171,7 @@ func dataSourceDatadogIPRangesRead(ctx context.Context, d *schema.ResourceData,
d.Set("api_ipv4", api.GetPrefixesIpv4())
d.Set("apm_ipv4", apm.GetPrefixesIpv4())
d.Set("logs_ipv4", logs.GetPrefixesIpv4())
d.Set("orchestrator_ipv4", orchestrator.GetPrefixesIpv4())
d.Set("process_ipv4", process.GetPrefixesIpv4())
d.Set("synthetics_ipv4", synthetics.GetPrefixesIpv4())
d.Set("webhooks_ipv4", webhook.GetPrefixesIpv4())
Expand All @@ -167,6 +181,7 @@ func dataSourceDatadogIPRangesRead(ctx context.Context, d *schema.ResourceData,
d.Set("api_ipv6", api.GetPrefixesIpv6())
d.Set("apm_ipv6", apm.GetPrefixesIpv6())
d.Set("logs_ipv6", logs.GetPrefixesIpv6())
d.Set("orchestrator_ipv6", orchestrator.GetPrefixesIpv6())
d.Set("process_ipv6", process.GetPrefixesIpv6())
d.Set("synthetics_ipv6", synthetics.GetPrefixesIpv6())
d.Set("webhooks_ipv6", webhook.GetPrefixesIpv6())
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021-03-12T17:13:58.458357-05:00
2023-02-16T17:24:18.99814+01:00
Loading

0 comments on commit 95d8bf1

Please sign in to comment.