Skip to content

Commit f190af5

Browse files
authored
feat(sfs): onboard sfs resources and datasources (#1101)
relates to STACKITTPR-446
1 parent 459122c commit f190af5

File tree

38 files changed

+4973
-2
lines changed

38 files changed

+4973
-2
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_sfs_export_policy Data Source - stackit"
4+
subcategory: ""
5+
description: |-
6+
SFS export policy datasource schema. Must have a region specified in the provider configuration.
7+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
8+
---
9+
10+
# stackit_sfs_export_policy (Data Source)
11+
12+
SFS export policy datasource schema. Must have a `region` specified in the provider configuration.
13+
14+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15+
16+
## Example Usage
17+
18+
```terraform
19+
data "stackit_sfs_export_policy" "example" {
20+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
21+
policy_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
22+
}
23+
```
24+
25+
<!-- schema generated by tfplugindocs -->
26+
## Schema
27+
28+
### Required
29+
30+
- `policy_id` (String) Export policy ID
31+
- `project_id` (String) STACKIT project ID to which the export policy is associated.
32+
33+
### Optional
34+
35+
- `region` (String) The resource region. If not defined, the provider region is used.
36+
37+
### Read-Only
38+
39+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`policy_id`".
40+
- `name` (String) Name of the export policy.
41+
- `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules))
42+
43+
<a id="nestedatt--rules"></a>
44+
### Nested Schema for `rules`
45+
46+
Optional:
47+
48+
- `description` (String) Description of the Rule
49+
50+
Read-Only:
51+
52+
- `ip_acl` (List of String) IP access control list; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP).
53+
- `order` (Number) Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied
54+
- `read_only` (Boolean) Flag to indicate if client IPs matching this rule can only mount the share in read only mode
55+
- `set_uuid` (Boolean) Flag to honor set UUID
56+
- `super_user` (Boolean) Flag to indicate if client IPs matching this rule have root access on the Share
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_sfs_resource_pool Data Source - stackit"
4+
subcategory: ""
5+
description: |-
6+
Resource-pool datasource schema. Must have a region specified in the provider configuration.
7+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
8+
---
9+
10+
# stackit_sfs_resource_pool (Data Source)
11+
12+
Resource-pool datasource schema. Must have a `region` specified in the provider configuration.
13+
14+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15+
16+
## Example Usage
17+
18+
```terraform
19+
data "stackit_sfs_resource_pool" "resourcepool" {
20+
project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
21+
resource_pool_id = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
22+
}
23+
```
24+
25+
<!-- schema generated by tfplugindocs -->
26+
## Schema
27+
28+
### Required
29+
30+
- `project_id` (String) STACKIT project ID to which the resource pool is associated.
31+
- `resource_pool_id` (String) Resourcepool ID
32+
33+
### Optional
34+
35+
- `region` (String) The resource region. Read-only attribute that reflects the provider region.
36+
37+
### Read-Only
38+
39+
- `availability_zone` (String) Availability zone.
40+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`resource_pool_id`".
41+
- `ip_acl` (List of String) List of IPs that can mount the resource pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP).
42+
- `name` (String) Name of the resource pool.
43+
- `performance_class` (String) Name of the performance class.
44+
- `performance_class_downgradable_at` (String) Time when the performance class can be downgraded again.
45+
- `size_gigabytes` (Number) Size of the resource pool (unit: gigabytes)
46+
- `size_reducible_at` (String) Time when the size can be reduced again.
47+
- `snapshots_are_visible` (Boolean) If set to true, snapshots are visible and accessible to users. (default: false)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_sfs_resource_pool_snapshot Data Source - stackit"
4+
subcategory: ""
5+
description: |-
6+
Resource-pool datasource schema. Must have a region specified in the provider configuration.
7+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
8+
---
9+
10+
# stackit_sfs_resource_pool_snapshot (Data Source)
11+
12+
Resource-pool datasource schema. Must have a `region` specified in the provider configuration.
13+
14+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15+
16+
## Example Usage
17+
18+
```terraform
19+
data "stackit_sfs_resource_pool_snapshot" "example" {
20+
project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
21+
resource_pool_id = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
22+
}
23+
```
24+
25+
<!-- schema generated by tfplugindocs -->
26+
## Schema
27+
28+
### Required
29+
30+
- `project_id` (String) STACKIT project ID to which the resource pool snapshot is associated.
31+
- `resource_pool_id` (String) Resource pool ID
32+
33+
### Optional
34+
35+
- `region` (String) The resource region. Read-only attribute that reflects the provider region.
36+
37+
### Read-Only
38+
39+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`resource_pool_id`".
40+
- `snapshots` (Attributes List) Resource-pool datasource schema. Must have a `region` specified in the provider configuration. (see [below for nested schema](#nestedatt--snapshots))
41+
42+
<a id="nestedatt--snapshots"></a>
43+
### Nested Schema for `snapshots`
44+
45+
Read-Only:
46+
47+
- `comment` (String) (optional) A comment to add more information about a snapshot
48+
- `created_at` (String) creation date of the snapshot
49+
- `logical_size_gigabytes` (Number) Represents the user-visible data size at the time of the snapshot (e.g. what’s in the snapshot)
50+
- `resource_pool_id` (String) ID of the Resource Pool of the Snapshot
51+
- `size_gigabytes` (Number) Reflects the actual storage footprint in the backend at snapshot time (e.g. how much storage from the Resource Pool does it use)
52+
- `snapshot_name` (String) Name of the Resource Pool Snapshot

docs/data-sources/sfs_share.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_sfs_share Data Source - stackit"
4+
subcategory: ""
5+
description: |-
6+
SFS Share schema. Must have a region specified in the provider configuration.
7+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
8+
---
9+
10+
# stackit_sfs_share (Data Source)
11+
12+
SFS Share schema. Must have a `region` specified in the provider configuration.
13+
14+
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15+
16+
## Example Usage
17+
18+
```terraform
19+
data "stackit_sfs_share" "example" {
20+
project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
21+
resource_pool_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
22+
share_id = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
23+
}
24+
```
25+
26+
<!-- schema generated by tfplugindocs -->
27+
## Schema
28+
29+
### Required
30+
31+
- `project_id` (String) STACKIT project ID to which the share is associated.
32+
- `resource_pool_id` (String) The ID of the resource pool for the SFS share.
33+
- `share_id` (String) share ID
34+
35+
### Optional
36+
37+
- `region` (String) The resource region. Read-only attribute that reflects the provider region.
38+
39+
### Read-Only
40+
41+
- `export_policy` (String) Name of the Share Export Policy to use in the Share.
42+
Note that if this is not set, the Share can only be mounted in read only by
43+
clients with IPs matching the IP ACL of the Resource Pool hosting this Share.
44+
You can also assign a Share Export Policy after creating the Share
45+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`share_id`".
46+
- `mount_path` (String) Mount path of the Share, used to mount the Share
47+
- `name` (String) Name of the Share
48+
- `space_hard_limit_gigabytes` (Number) Space hard limit for the Share.
49+
If zero, the Share will have access to the full space of the Resource Pool it lives in.
50+
(unit: gigabytes)

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ Note: AWS specific checks must be skipped as they do not work on STACKIT. For de
188188
- `service_account_key_path` (String) Path for the service account key used for authentication. If set, the key flow will be used to authenticate all operations.
189189
- `service_account_token` (String, Deprecated) Token used for authentication. If set, the token flow will be used to authenticate all operations.
190190
- `service_enablement_custom_endpoint` (String) Custom endpoint for the Service Enablement API
191+
- `sfs_custom_endpoint` (String) Custom endpoint for the Stackit Filestorage API
191192
- `ske_custom_endpoint` (String) Custom endpoint for the Kubernetes Engine (SKE) service
192193
- `sqlserverflex_custom_endpoint` (String) Custom endpoint for the SQL Server Flex service
193194
- `token_custom_endpoint` (String) Custom endpoint for the token API, which is used to request access tokens when using the key flow
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_sfs_export_policy Resource - stackit"
4+
subcategory: ""
5+
description: |-
6+
SFS export policy resource schema. Must have a region specified in the provider configuration.
7+
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
8+
---
9+
10+
# stackit_sfs_export_policy (Resource)
11+
12+
SFS export policy resource schema. Must have a `region` specified in the provider configuration.
13+
14+
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "stackit_sfs_export_policy" "example" {
20+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
21+
name = "example"
22+
rules = [
23+
{
24+
ip_acl = ["172.16.0.0/24", "172.16.0.250/32"]
25+
order = 1
26+
}
27+
]
28+
}
29+
30+
# Only use the import statement, if you want to import an existing export policy
31+
import {
32+
to = stackit_sfs_export_policy.example
33+
id = "${var.project_id},${var.region},${var.policy_id}"
34+
}
35+
```
36+
37+
<!-- schema generated by tfplugindocs -->
38+
## Schema
39+
40+
### Required
41+
42+
- `name` (String) Name of the export policy.
43+
- `project_id` (String) STACKIT project ID to which the export policy is associated.
44+
45+
### Optional
46+
47+
- `region` (String) The resource region. If not defined, the provider region is used.
48+
- `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules))
49+
50+
### Read-Only
51+
52+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`policy_id`".
53+
- `policy_id` (String) Export policy ID
54+
55+
<a id="nestedatt--rules"></a>
56+
### Nested Schema for `rules`
57+
58+
Required:
59+
60+
- `ip_acl` (List of String) IP access control list; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP).
61+
- `order` (Number) Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied
62+
63+
Optional:
64+
65+
- `description` (String) Description of the Rule
66+
- `read_only` (Boolean) Flag to indicate if client IPs matching this rule can only mount the share in read only mode
67+
- `set_uuid` (Boolean) Flag to honor set UUID
68+
- `super_user` (Boolean) Flag to indicate if client IPs matching this rule have root access on the Share
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_sfs_resource_pool Resource - stackit"
4+
subcategory: ""
5+
description: |-
6+
Resource-pool resource schema. Must have a region specified in the provider configuration.
7+
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
8+
---
9+
10+
# stackit_sfs_resource_pool (Resource)
11+
12+
Resource-pool resource schema. Must have a `region` specified in the provider configuration.
13+
14+
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "stackit_sfs_resource_pool" "resourcepool" {
20+
project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
21+
name = "some-resourcepool"
22+
availability_zone = "eu01-m"
23+
performance_class = "Standard"
24+
size_gigabytes = 512
25+
ip_acl = [
26+
"192.168.42.1/32",
27+
"192.168.42.2/32"
28+
]
29+
snapshots_are_visible = true
30+
}
31+
32+
# Only use the import statement, if you want to import an existing resource pool
33+
import {
34+
to = stackit_sfs_resource_pool.resourcepool
35+
id = "${var.project_id},${var.region},${var.resource_pool_id}"
36+
}
37+
```
38+
39+
<!-- schema generated by tfplugindocs -->
40+
## Schema
41+
42+
### Required
43+
44+
- `availability_zone` (String) Availability zone.
45+
- `ip_acl` (List of String) List of IPs that can mount the resource pool in read-only; IPs must have a subnet mask (e.g. "172.16.0.0/24" for a range of IPs, or "172.16.0.250/32" for a specific IP).
46+
- `name` (String) Name of the resource pool.
47+
- `performance_class` (String) Name of the performance class.
48+
- `project_id` (String) STACKIT project ID to which the resource pool is associated.
49+
- `size_gigabytes` (Number) Size of the resource pool (unit: gigabytes)
50+
51+
### Optional
52+
53+
- `region` (String) The resource region. If not defined, the provider region is used.
54+
- `snapshots_are_visible` (Boolean) If set to true, snapshots are visible and accessible to users. (default: false)
55+
56+
### Read-Only
57+
58+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`resource_pool_id`".
59+
- `resource_pool_id` (String) Resource pool ID

0 commit comments

Comments
 (0)