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

docs: added example for resilience hub resiliency policy #2106

Open
wants to merge 5 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
33 changes: 32 additions & 1 deletion docs/resources/resiliencehub_resiliency_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,38 @@ description: |-

Resource Type Definition for Resiliency Policy.


## Example Usage

```terraform
resource "awscc_resiliencehub_resiliency_policy" "example" {
policy_name = "example_policy"
tier = "MissionCritical"
policy = {
software = {
rpo_in_secs = 900
rto_in_secs = 3600
}
hardware = {
rpo_in_secs = 300
rto_in_secs = 300
}
region = {
rpo_in_secs = 300
rto_in_secs = 300
}
az = {
rpo_in_secs = 300
rto_in_secs = 300
}
}
policy_description = "This is an example policy"
data_location_constraint = "SameContinent"
tags = {
key = "Modified By"
value = "AWSCC"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
resource "awscc_resiliencehub_resiliency_policy" "example" {
policy_name = "example_policy"
tier = "MissionCritical"
policy = {
software = {
rpo_in_secs = 900
rto_in_secs = 3600
}
hardware = {
rpo_in_secs = 300
rto_in_secs = 300
}
region = {
rpo_in_secs = 300
rto_in_secs = 300
}
az = {
rpo_in_secs = 300
rto_in_secs = 300
}
}
policy_description = "This is an example policy"
data_location_constraint = "SameContinent"
tags = {
key = "Modified By"
value = "AWSCC"
}
}
26 changes: 26 additions & 0 deletions templates/resources/resiliency_policy.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example Usage

{{ tffile (printf "examples/resources/%s/resiliency_policy.tf" .Name)}}


{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}