-
Notifications
You must be signed in to change notification settings - Fork 42
feat(sfs): onboard sfs resources and datasources #1101
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,56 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_sfs_export_policy Data Source - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| SFS export policy datasource schema. Must have a region specified in the provider configuration. | ||
| ~> 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. | ||
| --- | ||
|
|
||
| # stackit_sfs_export_policy (Data Source) | ||
|
|
||
| SFS export policy datasource schema. Must have a `region` specified in the provider configuration. | ||
|
|
||
| ~> 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. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| data "stackit_sfs_export_policy" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| policy_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `policy_id` (String) Export policy ID | ||
| - `project_id` (String) STACKIT project ID to which the export policy is associated. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The resource region. If not defined, the provider region is used. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`policy_id`". | ||
| - `name` (String) Name of the export policy. | ||
| - `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules)) | ||
|
|
||
| <a id="nestedatt--rules"></a> | ||
| ### Nested Schema for `rules` | ||
|
|
||
| Optional: | ||
|
|
||
| - `description` (String) Description of the Rule | ||
|
|
||
| Read-Only: | ||
|
|
||
| - `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). | ||
| - `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 | ||
| - `read_only` (Boolean) Flag to indicate if client IPs matching this rule can only mount the share in read only mode | ||
| - `set_uuid` (Boolean) Flag to honor set UUID | ||
| - `super_user` (Boolean) Flag to indicate if client IPs matching this rule have root access on the Share |
This file contains hidden or 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,47 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_sfs_resource_pool Data Source - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| Resource-pool datasource schema. Must have a region specified in the provider configuration. | ||
| ~> 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. | ||
| --- | ||
|
|
||
| # stackit_sfs_resource_pool (Data Source) | ||
|
|
||
| Resource-pool datasource schema. Must have a `region` specified in the provider configuration. | ||
|
|
||
| ~> 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. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| data "stackit_sfs_resource_pool" "resourcepool" { | ||
| project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" | ||
| resource_pool_id = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `project_id` (String) STACKIT project ID to which the resource pool is associated. | ||
| - `resource_pool_id` (String) Resourcepool ID | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The resource region. Read-only attribute that reflects the provider region. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `availability_zone` (String) Availability zone. | ||
| - `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`resource_pool_id`". | ||
| - `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). | ||
| - `name` (String) Name of the resource pool. | ||
| - `performance_class` (String) Name of the performance class. | ||
| - `performance_class_downgradable_at` (String) Time when the performance class can be downgraded again. | ||
| - `size_gigabytes` (Number) Size of the resource pool (unit: gigabytes) | ||
| - `size_reducible_at` (String) Time when the size can be reduced again. | ||
| - `snapshots_are_visible` (Boolean) If set to true, snapshots are visible and accessible to users. (default: false) |
This file contains hidden or 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,52 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_sfs_resource_pool_snapshot Data Source - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| Resource-pool datasource schema. Must have a region specified in the provider configuration. | ||
| ~> 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. | ||
| --- | ||
|
|
||
| # stackit_sfs_resource_pool_snapshot (Data Source) | ||
|
|
||
| Resource-pool datasource schema. Must have a `region` specified in the provider configuration. | ||
|
|
||
| ~> 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. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| data "stackit_sfs_resource_pool_snapshot" "example" { | ||
| project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" | ||
| resource_pool_id = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `project_id` (String) STACKIT project ID to which the resource pool snapshot is associated. | ||
| - `resource_pool_id` (String) Resource pool ID | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The resource region. Read-only attribute that reflects the provider region. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`resource_pool_id`". | ||
| - `snapshots` (Attributes List) Resource-pool datasource schema. Must have a `region` specified in the provider configuration. (see [below for nested schema](#nestedatt--snapshots)) | ||
|
|
||
| <a id="nestedatt--snapshots"></a> | ||
| ### Nested Schema for `snapshots` | ||
|
|
||
| Read-Only: | ||
|
|
||
| - `comment` (String) (optional) A comment to add more information about a snapshot | ||
| - `created_at` (String) creation date of the snapshot | ||
| - `logical_size_gigabytes` (Number) Represents the user-visible data size at the time of the snapshot (e.g. what’s in the snapshot) | ||
| - `resource_pool_id` (String) ID of the Resource Pool of the Snapshot | ||
| - `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) | ||
| - `snapshot_name` (String) Name of the Resource Pool Snapshot |
This file contains hidden or 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,50 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_sfs_share Data Source - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| SFS Share schema. Must have a region specified in the provider configuration. | ||
| ~> 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. | ||
| --- | ||
|
|
||
| # stackit_sfs_share (Data Source) | ||
|
|
||
| SFS Share schema. Must have a `region` specified in the provider configuration. | ||
|
|
||
| ~> 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. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| data "stackit_sfs_share" "example" { | ||
| project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" | ||
| resource_pool_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" | ||
| share_id = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `project_id` (String) STACKIT project ID to which the share is associated. | ||
| - `resource_pool_id` (String) The ID of the resource pool for the SFS share. | ||
| - `share_id` (String) share ID | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The resource region. Read-only attribute that reflects the provider region. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `export_policy` (String) Name of the Share Export Policy to use in the Share. | ||
| Note that if this is not set, the Share can only be mounted in read only by | ||
| clients with IPs matching the IP ACL of the Resource Pool hosting this Share. | ||
| You can also assign a Share Export Policy after creating the Share | ||
| - `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`share_id`". | ||
| - `mount_path` (String) Mount path of the Share, used to mount the Share | ||
| - `name` (String) Name of the Share | ||
| - `space_hard_limit_gigabytes` (Number) Space hard limit for the Share. | ||
| If zero, the Share will have access to the full space of the Resource Pool it lives in. | ||
| (unit: gigabytes) |
This file contains hidden or 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 hidden or 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,68 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_sfs_export_policy Resource - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| SFS export policy resource schema. Must have a region specified in the provider configuration. | ||
| ~> 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. | ||
| --- | ||
|
|
||
| # stackit_sfs_export_policy (Resource) | ||
|
|
||
| SFS export policy resource schema. Must have a `region` specified in the provider configuration. | ||
|
|
||
| ~> 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. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| resource "stackit_sfs_export_policy" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "example" | ||
| rules = [ | ||
| { | ||
| ip_acl = ["172.16.0.0/24", "172.16.0.250/32"] | ||
| order = 1 | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| # Only use the import statement, if you want to import an existing export policy | ||
| import { | ||
| to = stackit_sfs_export_policy.example | ||
| id = "${var.project_id},${var.region},${var.policy_id}" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `name` (String) Name of the export policy. | ||
| - `project_id` (String) STACKIT project ID to which the export policy is associated. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The resource region. If not defined, the provider region is used. | ||
| - `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules)) | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`policy_id`". | ||
| - `policy_id` (String) Export policy ID | ||
|
|
||
| <a id="nestedatt--rules"></a> | ||
| ### Nested Schema for `rules` | ||
|
|
||
| Required: | ||
|
|
||
| - `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). | ||
| - `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 | ||
|
|
||
| Optional: | ||
|
|
||
| - `description` (String) Description of the Rule | ||
| - `read_only` (Boolean) Flag to indicate if client IPs matching this rule can only mount the share in read only mode | ||
| - `set_uuid` (Boolean) Flag to honor set UUID | ||
| - `super_user` (Boolean) Flag to indicate if client IPs matching this rule have root access on the Share | ||
This file contains hidden or 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,59 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_sfs_resource_pool Resource - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| Resource-pool resource schema. Must have a region specified in the provider configuration. | ||
| ~> 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. | ||
| --- | ||
|
|
||
| # stackit_sfs_resource_pool (Resource) | ||
|
|
||
| Resource-pool resource schema. Must have a `region` specified in the provider configuration. | ||
|
|
||
| ~> 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. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| resource "stackit_sfs_resource_pool" "resourcepool" { | ||
| project_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" | ||
| name = "some-resourcepool" | ||
| availability_zone = "eu01-m" | ||
| performance_class = "Standard" | ||
| size_gigabytes = 512 | ||
| ip_acl = [ | ||
| "192.168.42.1/32", | ||
| "192.168.42.2/32" | ||
| ] | ||
| snapshots_are_visible = true | ||
| } | ||
marceljk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Only use the import statement, if you want to import an existing resource pool | ||
| import { | ||
| to = stackit_sfs_resource_pool.resourcepool | ||
| id = "${var.project_id},${var.region},${var.resource_pool_id}" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `availability_zone` (String) Availability zone. | ||
| - `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). | ||
| - `name` (String) Name of the resource pool. | ||
| - `performance_class` (String) Name of the performance class. | ||
| - `project_id` (String) STACKIT project ID to which the resource pool is associated. | ||
| - `size_gigabytes` (Number) Size of the resource pool (unit: gigabytes) | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The resource region. If not defined, the provider region is used. | ||
| - `snapshots_are_visible` (Boolean) If set to true, snapshots are visible and accessible to users. (default: false) | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`resource_pool_id`". | ||
| - `resource_pool_id` (String) Resource pool ID | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.