Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions docs/data-sources/access_products.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,45 @@ description: |-

```terraform
data "autonomi_access_products" "access" {
location = "EQUINIX LD5"
bandwidth = 100
filters = [
{
name = "location"
operator = "IN"
values = ["EQUINIX FR5", "EQUINIX LD5"]
},
{
name = "bandwidth"
operator = "TO"
values = ["100", "500"]
},
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `bandwidth` (Number) Name of the Provider: expected values are [50, 100, 110, 500, 1000, 5000, 10000]
- `location` (String) Name of the Location: expected values are [...]
- `filters` (Attributes List) List of filters: [location, bandwidth] (see [below for nested schema](#nestedatt--filters))

### Read-Only

- `facet_distribution` (Attributes) The **facet_distribution** attribute provides an overview of the distribution of
various facets within the access products returned by the Meilisearch query.
facets within the access products returned by the Meilisearch query.
This attribute allows you to analyze the frequency of different categories or attributes in the search results.
(see [below for nested schema](#nestedatt--facet_distribution))
- `hits` (Attributes List) The **hits** attribute contains the list of cloud products returned by the Meilisearch query.
Each hit represents an access product that matches the specified search criteria.
(see [below for nested schema](#nestedatt--hits))
Each hit represents an access product that matches the specified search criteria. (see [below for nested schema](#nestedatt--hits))

<a id="nestedatt--filters"></a>
### Nested Schema for `filters`

Optional:

- `name` (String)
- `operator` (String)
- `values` (List of String)

<a id="nestedatt--facet_distribution"></a>
### Nested Schema for `facet_distribution`
Expand Down
58 changes: 40 additions & 18 deletions docs/data-sources/cloud_products.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,58 @@ description: |-

```terraform
data "autonomi_cloud_products" "clouds" {
csp_name = "AWS"
csp_region = "eu-west-1"
csp_city = "London"
underlay_provider = "EQUINIX"
location = "EQUINIX LD5"
bandwidth = 100
filters = [
{
name = "cspName"
operator = "="
values = ["AWS"]
},
{
name = "cspRegion"
operator = "="
values = ["eu-central-1"]
},
{
name = "cspCity"
operator = "="
values = ["Frankfurt"]
}, {
name = "provider"
operator = "="
values = ["EQUINIX"]
}, {
name = "bandwidth"
operator = "TO"
values = ["100", "500"]
},
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `bandwidth` (Number) Name of the Provider: expected values are [50, 100, 110, 500, 1000, 5000, 10000]
- `csp_city` (String) Name of the CSP city
- `csp_name` (String) Name of the CSP expected values are [AWS, Azure, GCP]
- `csp_region` (String) Name of the CSP region
- `location` (String) Name of the Location: expected values are [...]
- `underlay_provider` (String) Name of the Provider: expected values are [Equinix, Megaport]
- `filters` (Attributes List) List of filters:
[cspName, cspRegion, cspCity, location, bandwidth, provider] (see [below for nested schema](#nestedatt--filters))

### Read-Only

- `facet_distribution` (Attributes) The **facet_distribution** attribute provides an overview of the distribution of
various facets within the cloud products returned by the Meilisearch query.
- `facet_distribution` (Attributes) The **facet_distribution** attribute provides an overview of
the distribution of various facets within the cloud products returned by the Meilisearch query.
This attribute allows you to analyze the frequency of different categories or attributes in the search results.
(see [below for nested schema](#nestedatt--facet_distribution))
- `hits` (Attributes List) The **hits** attribute contains the list of cloud products returned by the Meilisearch
query. Each hit represents a cloud product that matches the specified search criteria.
(see [below for nested schema](#nestedatt--hits))
- `hits` (Attributes List) The **hits** attribute contains the list of cloud products returned by the Meilisearch query.
Each hit represents a cloud product that matches the specified search criteria. (see [below for nested schema](#nestedatt--hits))

<a id="nestedatt--filters"></a>
### Nested Schema for `filters`

Optional:

- `name` (String)
- `operator` (String)
- `values` (List of String)

<a id="nestedatt--facet_distribution"></a>
### Nested Schema for `facet_distribution`
Expand Down
58 changes: 41 additions & 17 deletions docs/data-sources/transport_products.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,56 @@ description: |-
# autonomi_transport_products (Data Source)

```terraform
data "autonomi_cloud_products" "clouds" {
underlay_provider = "EQUINIX"
location = "EQUINIX AM2"
location_to = "EQUINIX DC2"
bandwidth = 100
}
data "autonomi_transport_products" "transports" {
filters = [
{
name = "provider"
operator = "="
values = ["EQUINIX"]
},
{
name = "locationTo"
operator = "IN"
values = ["EQUINIX FR5", "EQUINIX LD5"]
},
{
name = "location"
operator = "IN"
values = ["EQUINIX FR5", "EQUINIX LD5"]
},
{
name = "bandwidth"
operator = "TO"
values = ["100", "500"]
},
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `bandwidth` (Number) Name of the Provider: expected values are [50, 100, 110, 500, 1000, 5000, 10000]
- `location` (String) Name of the first Location: expected values are [...]
- `location_to` (String) Name of the second Location: expected values are [...]
- `underlay_provider` (String) Name of the Provider: expected values are [Equinix, Megaport]
- `filters` (Attributes List) List of filters:
[location, locationTo, bandwidth, provider] (see [below for nested schema](#nestedatt--filters))

### Read-Only

- `facet_distribution` (Attributes) The **facet_distribution** attribute provides an overview of the distribution of
various facets within the transport products returned by the Meilisearch query. This attribute allows you to analyze
the frequency of different categories or attributes in the search results. (see [below for nested schema](#nestedatt--facet_distribution))
- `hits` (Attributes List) The **hits** attribute contains the list of transport products returned by the Meilisearch
query. Each hit represents a transport product that matches the specified search criteria.
(see [below for nested schema](#nestedatt--hits))
- `facet_distribution` (Attributes) The **facet_distribution** attribute provides an overview of
the distribution of various facets within the transport products returned by the Meilisearch query.
This attribute allows you to analyze the frequency of different categories or attributes in the search results.
(see [below for nested schema](#nestedatt--facet_distribution))
- `hits` (Attributes List) The **hits** attribute contains the list of transport products returned by the Meilisearch query.
Each hit represents a transport product that matches the specified search criteria. (see [below for nested schema](#nestedatt--hits))

<a id="nestedatt--filters"></a>
### Nested Schema for `filters`

Optional:

- `name` (String)
- `operator` (String)
- `values` (List of String)

<a id="nestedatt--facet_distribution"></a>
### Nested Schema for `facet_distribution`
Expand Down
7 changes: 0 additions & 7 deletions examples/autonomi/terraform.auto.tfvars
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
csp_name = "AWS"
csp_city = "pa"
csp_region = "eu-west-3"
underlay_provider = "EQUINIX"
bandwidth = 50
location = "EQUINIX AM2"
location_to = "EQUINIX LD5"
host_url = "https://api.autonomi.io"
catalog_url = "https://catalog.autonomi.io"
39 changes: 0 additions & 39 deletions examples/autonomi/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,3 @@ variable "aws_account_id" {
default = null
}

variable "csp_name" {
description = "The Cloud Service Provider Name"
type = string
default = null
}

variable "csp_city" {
description = "The Cloud Service Provider City"
type = string
default = null
}

variable "csp_region" {
description = "The Cloud Service Provider Region"
type = string
default = null
}

variable "underlay_provider" {
description = "The Underlay Service Provider Name"
type = string
default = null
}
variable "bandwidth" {
description = "The bandwidth in Mbps"
type = number
default = null
}

variable "location" {
description = "The Location"
type = string
default = null
}
variable "location_to" {
description = "The Location"
type = string
default = null
}
66 changes: 54 additions & 12 deletions examples/data-sources/autonomi_data_source/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,62 @@
data "autonomi_cloud_products" "clouds" {
csp_name = var.csp_name
csp_region = var.csp_region
csp_city = var.csp_city
underlay_provider = var.underlay_provider
location = var.location
bandwidth = var.bandwidth
filters = [
{
name = "cspName"
operator = "="
values = ["AWS"]
},
{
name = "cspRegion"
operator = "="
values = ["eu-central-1"]
},
{
name = "cspCity"
operator = "="
values = ["Frankfurt"]
}, {
name = "provider"
operator = "="
values = ["EQUINIX"]
}, {
name = "bandwidth"
operator = "TO"
values = ["100", "500"]
},
]
}

data "autonomi_transport_products" "transports" {
underlay_provider = var.underlay_provider
location = var.location
location_to = var.location_to
bandwidth = var.bandwidth
filters = [
{
name = "locationTo"
operator = "IN"
values = ["EQUINIX FR5", "EQUINIX LD5"]
},
{
name = "location"
operator = "IN"
values = ["EQUINIX FR5", "EQUINIX LD5"]
},
{
name = "bandwidth"
operator = "TO"
values = ["100", "500"]
},
]
}

data "autonomi_access_products" "access" {
location = var.location
bandwidth = var.bandwidth
filters = [
{
name = "location"
operator = "IN"
values = ["EQUINIX FR5", "EQUINIX LD5"]
},
{
name = "bandwidth"
operator = "TO"
values = ["100", "500"]
},
]
}
7 changes: 0 additions & 7 deletions external/products/models/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ const (
VIRTUAL AccessType = "VIRTUAL"
)

type AccessFilters struct {
Provider ProviderType
Location string
Bandwidth int
Type AccessType
}

func (at AccessType) String() string {
return string(at)
}
Expand Down
23 changes: 12 additions & 11 deletions external/products/models/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ func (pt ProviderType) String() string {
}

type Product struct {
ID int `json:"id"`
Provider string `json:"provider"`
Duration int `json:"duration"`
Location string `json:"location"`
Bandwidth int `json:"bandwidth"`
Date string `json:"date"`
PriceNRC int `json:"priceNrc"`
PriceMRC int `json:"priceMrc"`
CostNRC int `json:"costNrc"`
CostMRC int `json:"costMrc"`
SKU string `json:"sku"`
ID int `json:"id"`
Provider string `json:"provider"`
Duration int `json:"duration"`
Location string `json:"location"`
LocationUnderlay string `json:"locationUnderlay"`
Bandwidth int `json:"bandwidth"`
Date string `json:"date"`
PriceNRC int `json:"priceNrc"`
PriceMRC int `json:"priceMrc"`
CostNRC int `json:"costNrc"`
CostMRC int `json:"costMrc"`
SKU string `json:"sku"`
}
3 changes: 2 additions & 1 deletion external/products/models/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ type TransportFilters struct {

type TransportProduct struct {
Product
LocationTo string `json:"locationTo"`
LocationTo string `json:"locationTo"`
LocationToUnderlay string `json:"locationToUnderlay"`
}

type TransportFacetDistribution struct {
Expand Down
Loading