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

Changes to policy storage and policy attachment files #604

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
45 changes: 45 additions & 0 deletions docs/resources/policy_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,52 @@ 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.

## Example Usage

```terraform
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_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}

resource "boundary_target" "ssh_session_recording_foo" {
name = "ssh_foo"
description = "SSH target"
type = "ssh"
default_port = "22"
scope_id = boundary_scope.project.id
host_source_ids = [
boundary_host_set.foo.id
]
injected_application_credential_source_ids = [
boundary_credential_library_vault.foo.id
]
enable_session_recording = true
storage_bucket_id = boundary_storage_bucket.aws_example
}

resource "boundary_policy_storage" "storage_policy_example" {
scope_id = boundary_scope.org.id
delete_after_days = 1
retain_for_days = 0
name = "storagepolicyexample"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
51 changes: 51 additions & 0 deletions docs/resources/scope_policy_attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,63 @@
page_title: "boundary_scope_policy_attachment Resource - terraform-provider-boundary"
subcategory: ""
description: |-
The storage policy attachment resource attaches to a Boundary storage policy to the global scope or org scope.

---

# boundary_scope_policy_attachment (Resource)

## Example Usage

```terraform
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_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
}

resource "boundary_target" "ssh_session_recording_foo" {
name = "ssh_foo"
description = "SSH target"
type = "ssh"
default_port = "22"
scope_id = boundary_scope.project.id
host_source_ids = [
boundary_host_set.foo.id
]
injected_application_credential_source_ids = [
boundary_credential_library_vault.foo.id
]
enable_session_recording = true
storage_bucket_id = boundary_storage_bucket.aws_example
}

resource "boundary_policy_storage" "storage_policy_example" {
scope_id = boundary_scope.project.id
delete_after_days = 1
retain_for_days = 0
name = "storagepolicyexample"
}

resource "boundary_scope_policy_attachment" "storage_policy_attachment_example" {
policy_id = boundary_policy_storage.storage_policy_example.id
scope_id = boundary_scope.org.id
}
```



Expand Down
Loading