-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: DOC-1208 updated the documentation for the pack data resources (#…
…464) * docs: DOC-1208 updated the documentation for the pack data resources * chore: fixed resource name in example * docs: added types definition
- Loading branch information
1 parent
a9d784a
commit dc2ec98
Showing
6 changed files
with
113 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" | ||
subcategory: "" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Name}} ({{.Type}}) | ||
|
||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
|
||
|
||
|
||
~> Starting with version 0.21.0 the attribute `registry_uid` is required. | ||
|
||
## Example Usage | ||
|
||
|
||
An example of how to use this data source to retrieve a specific pack from the community registry. | ||
|
||
```hcl | ||
data "spectrocloud_registry" "community_registry" { | ||
name = "Palette Community Registry" | ||
} | ||
|
||
|
||
data "spectrocloud_pack" "hellouniverse" { | ||
name = "hello-universe" | ||
version = "1.1.2" | ||
registry_uid = data.spectrocloud_registry.community_registry.id | ||
} | ||
``` | ||
|
||
|
||
In this example, a filter is applied to retrieve a Calico CNI pack from the Palette OCI registry that is compatible with Edge clusters and has a version greater than 3.26.9. | ||
|
||
-> The filter attribute is a string that can contain multiple filters separated by the `AND`, `OR` operator. You can filter for a pack by using the attributes retured in the `spec` object of the payload provided by the `v1/packs/search` endpoint. | ||
Refer to the Palette Pack Search API endpoint [documentation](https://docs.spectrocloud.com/api/v1/v-1-packs-search/) for more information on the available filters. | ||
|
||
|
||
|
||
```hcl | ||
data "spectrocloud_registry" "palette_registry_oci" { | ||
name = "Palette Registry" | ||
} | ||
|
||
|
||
data "spectrocloud_pack" "cni" { | ||
filters = "spec.cloudTypes=edge-nativeANDspec.layer=cniANDspec.displayName=CalicoANDspec.version>3.26.9ANDspec.registryUid=${data.spectrocloud_registry.palette_registry_oci.id}" | ||
} | ||
``` | ||
|
||
{{ .SchemaMarkdown | trimspace }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters