Skip to content

Commit 9851b3b

Browse files
committed
feat(sfs): onboard sfs resources and datasources
1 parent 459122c commit 9851b3b

File tree

38 files changed

+4919
-2
lines changed

38 files changed

+4919
-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) SFS resource pool. Must have a region specified in the provider configuration.
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+
NFS-Share 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_share (Data Source)
11+
12+
NFS-Share 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_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 NFS 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: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
31+
<!-- schema generated by tfplugindocs -->
32+
## Schema
33+
34+
### Required
35+
36+
- `name` (String) Name of the export policy.
37+
- `project_id` (String) STACKIT project ID to which the export policy is associated.
38+
39+
### Optional
40+
41+
- `region` (String) The resource region. If not defined, the provider region is used.
42+
- `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules))
43+
44+
### Read-Only
45+
46+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`policy_id`".
47+
- `policy_id` (String) Export policy ID
48+
49+
<a id="nestedatt--rules"></a>
50+
### Nested Schema for `rules`
51+
52+
Required:
53+
54+
- `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).
55+
- `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
56+
57+
Optional:
58+
59+
- `description` (String) Description of the Rule
60+
- `read_only` (Boolean) Flag to indicate if client IPs matching this rule can only mount the share in read only mode
61+
- `set_uuid` (Boolean) Flag to honor set UUID
62+
- `super_user` (Boolean) Flag to indicate if client IPs matching this rule have root access on the Share
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_resource_pool Resource - stackit"
4+
subcategory: ""
5+
description: |-
6+
Resource-pool resource schema. Must have a region specified in the provider configuration.
7+
SFS resource pool. Must have a region specified in the provider configuration.
8+
~> 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.
9+
---
10+
11+
# stackit_sfs_resource_pool (Resource)
12+
13+
Resource-pool resource schema. Must have a `region` specified in the provider configuration.
14+
SFS resource pool. Must have a region specified in the provider configuration.
15+
16+
17+
~> 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.
18+
19+
## Example Usage
20+
21+
```terraform
22+
resource "stackit_sfs_resource_pool" "resourcepool" {
23+
project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
24+
name = "some-resourcepool"
25+
availability_zone = "eu01-m"
26+
performance_class = "Standard"
27+
size_gigabytes = 512
28+
ip_acl = [
29+
"192.168.42.1/32",
30+
"192.168.42.2/32"
31+
]
32+
snapshots_are_visible = true
33+
}
34+
```
35+
36+
<!-- schema generated by tfplugindocs -->
37+
## Schema
38+
39+
### Required
40+
41+
- `availability_zone` (String) Availability zone.
42+
- `ip_acl` (List of String) SFS resource pool. Must have a region specified in the provider configuration.
43+
- `name` (String) Name of the resource pool.
44+
- `performance_class` (String) Name of the performance class.
45+
- `project_id` (String) STACKIT project ID to which the resource pool is associated.
46+
- `size_gigabytes` (Number) Size of the resource pool (unit: gigabytes)
47+
48+
### Optional
49+
50+
- `region` (String) The resource region. If not defined, the provider region is used.
51+
- `snapshots_are_visible` (Boolean) If set to true, snapshots are visible and accessible to users. (default: false)
52+
53+
### Read-Only
54+
55+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`resource_pool_id`".
56+
- `resource_pool_id` (String) Resource pool ID

docs/resources/sfs_share.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "stackit_sfs_share Resource - stackit"
4+
subcategory: ""
5+
description: |-
6+
SFS Shares. 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_share (Resource)
11+
12+
SFS Shares. Must have a region specified in the provider configuration.
13+
14+
15+
~> 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.
16+
17+
## Example Usage
18+
19+
```terraform
20+
resource "stackit_sfs_share" "example" {
21+
project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
22+
resource_pool_id = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
23+
name = "my-nfs-share"
24+
export_policy = "high-performance-class"
25+
space_hard_limit_gigabytes = 32
26+
}
27+
```
28+
29+
<!-- schema generated by tfplugindocs -->
30+
## Schema
31+
32+
### Required
33+
34+
- `export_policy` (String) Name of the Share Export Policy to use in the Share.
35+
Note that if this is set to an empty string, the Share can only be mounted in read only by
36+
clients with IPs matching the IP ACL of the Resource Pool hosting this Share.
37+
You can also assign a Share Export Policy after creating the Share
38+
- `name` (String) Name of the share.
39+
- `project_id` (String) STACKIT project ID to which the share is associated.
40+
- `resource_pool_id` (String) The ID of the resource pool for the NFS share.
41+
- `space_hard_limit_gigabytes` (Number) Space hard limit for the Share.
42+
If zero, the Share will have access to the full space of the Resource Pool it lives in.
43+
(unit: gigabytes)
44+
45+
### Optional
46+
47+
- `region` (String) The resource region. If not defined, the provider region is used.
48+
49+
### Read-Only
50+
51+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`resource_pool_id`,`share_id`".
52+
- `mount_path` (String) Mount path of the Share, used to mount the Share
53+
- `share_id` (String) share ID
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
data "stackit_sfs_export_policy" "example" {
2+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
3+
policy_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
4+
}

0 commit comments

Comments
 (0)