From 84eef89d445c93715927d077877ae02d62068f39 Mon Sep 17 00:00:00 2001 From: Bartosz Blizniak Date: Wed, 14 Jun 2023 10:33:47 +0100 Subject: [PATCH] Update package documentation Update package documentation --- docs/data-sources/package.md | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/data-sources/package.md b/docs/data-sources/package.md index 8462833..6611151 100644 --- a/docs/data-sources/package.md +++ b/docs/data-sources/package.md @@ -18,9 +18,9 @@ data "cloudsmith_package_list" "test" { repository = cloudsmith_repository.test.name namespace = cloudsmith_repository.test.namespace filters = [ - "name:dummy-package", - "version:1.0.48", - ] + "name:dummy-package", + "version:1.0.48", + ] } data "cloudsmith_package" "test" { @@ -28,15 +28,30 @@ data "cloudsmith_package" "test" { namespace = cloudsmith_repository.test.namespace identifier = data.cloudsmith_package_list.test.packages[0].slug_perm download = true - output_path = "/path/to/save/package" + download_dir = "/path/to/your/directory" } ``` ## Argument Reference -* `namespace` (Required): The namespace of the package. -* `repository` (Required): The repository of the package. -* `identifier` (Required): The identifier for the package. -* `download` (Optional): If set to true, the package will be downloaded. Defaults to false. If set to false, the CDN url will be available in the `output_path`. -* `output_path` (Optional): The local file system path where the downloaded package will be stored. Defaults to OS's temp direcotry if no `output_path` is provided and `download` set to true. - +- `namespace` (Required): The namespace of the package. +- `repository` (Required): The repository of the package. +- `identifier` (Required): The identifier for the package. +- `download` (Optional): If set to true, the package will be downloaded. Defaults to false. If set to false, the CDN URL will be available in the `output_path`. +- `download_dir` (Optional): The directory where the file will be downloaded to. If not set and `download` is set to `true`, it will default to the operating system's default temporary directory and save the file there. + +## Attribute Reference + +- `cdn_url`: The URL of the package to download. This attribute is computed and available only when the `download` argument is set to `false`. +- `format`: The format of the package. +- `is_sync_awaiting`: Indicates whether the package is awaiting synchronization. +- `is_sync_completed`: Indicates whether the package synchronization has completed. +- `is_sync_failed`: Indicates whether the package synchronization has failed. +- `is_sync_in_flight`: Indicates whether the package synchronization is currently in-flight. +- `is_sync_in_progress`: Indicates whether the package synchronization is currently in-progress. +- `name`: The name of the package. +- `output_path`: The location of the package. If the `download` argument is set to `true`, this will provide the path where the package is downloaded. +- `output_directory`: The directory where the package is downloaded. +- `slug`: The public unique identifier for the package. +- `slug_perm`: The slug_perm that immutably identifies the package. +- `version`: The version of the package. \ No newline at end of file