Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileSystem Datasource #8

Merged
merged 1 commit into from
Aug 1, 2023
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
173 changes: 173 additions & 0 deletions docs/data-sources/filesystem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
---
# Copyright (c) 2023 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Mozilla Public License Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://mozilla.org/MPL/2.0/
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

title: "powerscale_filesystem data source"
linkTitle: "powerscale_filesystem"
page_title: "powerscale_filesystem Data Source - terraform-provider-powerscale"
subcategory: ""
description: |-
FileSystem data source
---

# powerscale_filesystem (Data Source)

FileSystem data source



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

### Required

- `directory_path` (String) FileSystem identifier

### Optional

- `file_systems_details` (Attributes) Details of the Filesystem (see [below for nested schema](#nestedatt--file_systems_details))
- `id` (String) FileSystem identifier

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

Optional:

- `file_system_attributes` (Attributes List) FileSystems Attributes (see [below for nested schema](#nestedatt--file_systems_details--file_system_attributes))
- `file_system_namespace_acl` (Attributes) Filesystem acl (see [below for nested schema](#nestedatt--file_systems_details--file_system_namespace_acl))
- `file_system_quotas` (Attributes List) Filesystem quotas (see [below for nested schema](#nestedatt--file_systems_details--file_system_quotas))
- `file_system_snapshots` (Attributes List) Filesystem shots (see [below for nested schema](#nestedatt--file_systems_details--file_system_snapshots))

<a id="nestedatt--file_systems_details--file_system_attributes"></a>
### Nested Schema for `file_systems_details.file_system_attributes`

Optional:

- `name` (String) Attribute name
- `namespace` (String) Attribute namespace
- `value` (String) Attribute value


<a id="nestedatt--file_systems_details--file_system_namespace_acl"></a>
### Nested Schema for `file_systems_details.file_system_namespace_acl`

Optional:

- `acl` (Attributes List) Filesystem Access Control List (see [below for nested schema](#nestedatt--file_systems_details--file_system_namespace_acl--acl))
- `action` (String) Acl action
- `authoritative` (String) Acl authoritative
- `group` (Attributes) ACL group (see [below for nested schema](#nestedatt--file_systems_details--file_system_namespace_acl--group))
- `mode` (String) Acl mode
- `owner` (Attributes) ACL owner (see [below for nested schema](#nestedatt--file_systems_details--file_system_namespace_acl--owner))

<a id="nestedatt--file_systems_details--file_system_namespace_acl--acl"></a>
### Nested Schema for `file_systems_details.file_system_namespace_acl.acl`

Optional:

- `accessrights` (List of String) Access rights
- `accesstype` (String) Access type
- `inherit_flags` (List of String) Inherit flags
- `op` (String) Op
- `trustee` (Attributes) Trustee (see [below for nested schema](#nestedatt--file_systems_details--file_system_namespace_acl--acl--trustee))

<a id="nestedatt--file_systems_details--file_system_namespace_acl--acl--trustee"></a>
### Nested Schema for `file_systems_details.file_system_namespace_acl.acl.trustee`

Optional:

- `id` (String) Trustee identifier
- `name` (String) Trustee name
- `type` (String) Trustee type



<a id="nestedatt--file_systems_details--file_system_namespace_acl--group"></a>
### Nested Schema for `file_systems_details.file_system_namespace_acl.group`

Optional:

- `id` (String) Group identifier
- `name` (String) Group name
- `type` (String) Group type


<a id="nestedatt--file_systems_details--file_system_namespace_acl--owner"></a>
### Nested Schema for `file_systems_details.file_system_namespace_acl.owner`

Optional:

- `id` (String) Owner identifier
- `name` (String) Owner name
- `type` (String) Owner type



<a id="nestedatt--file_systems_details--file_system_quotas"></a>
### Nested Schema for `file_systems_details.file_system_quotas`

Optional:

- `container` (Boolean) If true, SMB shares using the quota directory see the quota thresholds as share size.
- `enforced` (Boolean) True if the quota provides enforcement, otherwise a accounting quota.
- `id` (String) Quota Id
- `path` (String) The path of quota.
- `type` (String) The type of quota.
- `usage` (Attributes) Usage (see [below for nested schema](#nestedatt--file_systems_details--file_system_quotas--usage))

<a id="nestedatt--file_systems_details--file_system_quotas--usage"></a>
### Nested Schema for `file_systems_details.file_system_quotas.usage`

Optional:

- `applogical` (Number) Bytes used by governed data apparent to application
- `applogical_ready` (Boolean) True if applogical resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.
- `fslogical` (Number) Bytes used by governed data apparent to filesystem.
- `fslogical_ready` (Boolean) True if fslogical resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.
- `fsphysical` (Number) Bytes used by governed data apparent to filesystem.
- `fsphysical_ready` (Boolean) True if fsphysical resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.
- `inodes` (Number) Number of inodes (filesystem entities) used by governed data.
- `inodes_ready` (Boolean) True if inodes resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.
- `physical` (Number) Bytes used for governed data and filesystem overhead.
- `physical_data` (Number) Number of physical blocks for file data
- `physical_data_ready` (Boolean) True if physical_data resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.
- `physical_protection` (Number) Number of physical blocks for file protection
- `physical_protection_ready` (Boolean) True if physical_protection resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.
- `physical_ready` (Boolean) True if physical resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.
- `shadow_refs` (Number) Number of shadow references (cloned, deduplicated or packed filesystem blocks) used by governed data.
- `shadow_refs_ready` (Boolean) True if shadow_refs resource accounting is accurate on the quota. If false, this quota is waiting on completion of a QuotaScan job.



<a id="nestedatt--file_systems_details--file_system_snapshots"></a>
### Nested Schema for `file_systems_details.file_system_snapshots`

Optional:

- `alias` (String) The name of the alias, none for real snapshots.
- `created` (Number) The Unix Epoch time the snapshot was created.
- `expires` (Number) The Unix Epoch time the snapshot will expire and be eligible for automatic deletion.
- `has_locks` (Boolean) True if the snapshot has one or more locks present see, see the locks subresource of a snapshot for a list of locks.
- `id` (Number) The system ID given to the snapshot. This is useful for tracking the status of delete pending snapshots.
- `name` (String) The user or system supplied snapshot name. This will be null for snapshots pending delete.
- `path` (String) The /ifs path snapshotted.
- `pct_filesystem` (Number) Percentage of /ifs used for storing this snapshot.
- `pct_reserve` (Number) Percentage of configured snapshot reserved used for storing this snapshot.
- `schedule` (String) The name of the schedule used to create this snapshot, if applicable.
- `shadow_bytes` (Number) The amount of shadow bytes referred to by this snapshot.
- `size` (Number) The amount of storage in bytes used to store this snapshot.
- `state` (String) Snapshot state.
- `target_id` (Number) The ID of the snapshot pointed to if this is an alias. 18446744073709551615 (max uint64) is returned for an alias to the live filesystem.
- `target_name` (String) The name of the snapshot pointed to if this is an alias.
25 changes: 25 additions & 0 deletions examples/data-sources/powerscale_file_system/datasource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright (c) 2023 Dell Inc., or its subsidiaries. All Rights Reserved.

Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://mozilla.org/MPL/2.0/


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

data "powerscale_filesystem" "system" {
# Required parameter, path of the directory filesystem you would like to create a datasource out of
directory_path = "/ifs/tfacc_file_system_test"
}

output "powerscale_filesystem_1" {
value = data.powerscale_filesystem.system
}
36 changes: 36 additions & 0 deletions examples/data-sources/powerscale_file_system/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Copyright (c) 2023 Dell Inc., or its subsidiaries. All Rights Reserved.

Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://mozilla.org/MPL/2.0/


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
terraform {
required_providers {
powerscale = {
source = "registry.terraform.io/dell/powerscale"
}
}
}

provider "powerscale" {
username = var.username
password = var.password
endpoint = var.endpoint
insecure = var.insecure
group = var.group
volumes_path = var.volumes_path
volumes_path_permissions = var.volumes_path_permissions
ignore_unresolvable_hosts = var.ignore_unresolvable_hosts
auth_type = var.auth_type
verbose_logging = var.verbose_logging
}
4 changes: 2 additions & 2 deletions goClientZip/PowerScale_API_9.4.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -100836,7 +100836,7 @@
]
}
},
"/namespace/DirectoryMetadataPath={DirectoryMetadataPath}": {
"/namespace/{DirectoryMetadataPath}": {
"get": {
"description": "Retrieves the attribute information for a specified directory with the metadata query argument.",
"operationId": "getDirectoryMetadata",
Expand Down Expand Up @@ -101457,7 +101457,7 @@
]
}
},
"/namespace/NamespacePath={NamespacePath}": {
"/namespace/{NamespacePath}": {
"get": {
"description": "Retrieves the access control list for a namespace object.",
"operationId": "getAcl",
Expand Down
Binary file modified goClientZip/powerscale-go-client.zip
Binary file not shown.
12 changes: 12 additions & 0 deletions powerscale/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,16 @@ const (

// DeleteAccessZoneErrorMsg specifies error details occurred while deleting an Access Zones.
DeleteAccessZoneErrorMsg = "Could not delete access zones "

// ReadFileSystemErrorMsg specifies error details occurred while reading File Systems.
ReadFileSystemErrorMsg = "Could not read file systems "

// CreateFileSystemErrorMsg specifies error details occurred while creating an File Systems.
CreateFileSystemErrorMsg = "Could not create file systems "

// UpdateFileSystemErrorMsg specifies error details occurred while updating an File Systems.
UpdateFileSystemErrorMsg = "Could not update file systems "

// DeleteFileSystemErrorMsg specifies error details occurred while deleting an File Systems.
DeleteFileSystemErrorMsg = "Could not delete file systems "
)
Loading