generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(policies): support storage policies within terraform
- Loading branch information
Showing
8 changed files
with
560 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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,33 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "boundary_policy_storage Resource - terraform-provider-boundary" | ||
subcategory: "" | ||
description: |- | ||
The storage policy resource allows you to configure a Boundary storage policy. Storage policies allow an admin to configure how long session recordings must be stored and when to delete them. Storage policies must be applied to the global scope or an org scope in order to take effect. | ||
--- | ||
|
||
# boundary_policy_storage (Resource) | ||
|
||
The storage policy resource allows you to configure a Boundary storage policy. Storage policies allow an admin to configure how long session recordings must be stored and when to delete them. Storage policies must be applied to the global scope or an org scope in order to take effect. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `scope_id` (String) The scope for this policy. | ||
|
||
### Optional | ||
|
||
- `delete_after_days` (Number) The number of days after which a session recording will be automatically deleted. Defaults to 0: never automatically delete. However, delete_after_days and retain_for_days cannot both be 0. | ||
- `delete_after_overridable` (Boolean) Whether or not the associated delete_after_days value can be overridden by org scopes. Note: if the associated delete_after_days value is 0, overridable is ignored | ||
- `description` (String) The policy description. | ||
- `name` (String) The policy name. Defaults to the resource name. | ||
- `retain_for_days` (Number) The number of days a session recording is required to be stored. Defaults to 0: allow deletions at any time. However, retain_for_days and delete_after_days cannot both be 0. | ||
- `retain_for_overridable` (Boolean) Whether or not the associated retain_for_days value can be overridden by org scopes. Note: if the associated retain_for_days value is 0, overridable is ignored. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of the policy. |
This file contains 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,25 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "boundary_scope_policy_attachment Resource - terraform-provider-boundary" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# boundary_scope_policy_attachment (Resource) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `policy_id` (String) | ||
- `scope_id` (String) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
This file contains 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,27 @@ | ||
resource "boundary_scope" "global" { | ||
global_scope = true | ||
scope_id = "global" | ||
} | ||
|
||
resource "boundary_scope" "org" { | ||
name = "organization_one" | ||
description = "My first scope!" | ||
scope_id = boundary_scope.global.id | ||
auto_create_admin_role = true | ||
auto_create_default_role = true | ||
} | ||
|
||
resource "boundary_policy_storage" "foo" { | ||
name = "foo" | ||
description = "Foo policy" | ||
scope_id = boundary_scope.org.id | ||
retain_for_days = 10 | ||
retain_for_overridable = false | ||
delete_after_days = 10 | ||
delete_after_overridable = true | ||
} | ||
|
||
resource "boundary_scope_policy_attachment" "foo_attachment" { | ||
scope_id = boundary_scope.org.id | ||
policy_id = boundary_policy_storage.foo.id | ||
} |
This file contains 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 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 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
Oops, something went wrong.