# AWS Resilience Hub Application [AWS Resilience Hub](https://aws.amazon.com/blogs/aws/monitor-and-improve-your-application-resiliency-with-resilience-hub/) is a new AWS service designed to help you define, track, and manage the resilience of your applications. \ AWS Resilience Hub lets you define your RTO and RPO objectives for each of your applications. Then it assesses your application’s configuration to ensure it meets your requirements. It provides actionable recommendations and a resilience score to help you track your application’s resiliency progress over time. This Terraform module contains AWS Resilience Hub resources. The module will be s3 state-file backed, as it is currently mandatory by Resilience Hub to onboard new terraform-Application using s3 only.\ As a result, we must provide the module with `s3_state_file_url` where the actual resources are deployed. The `app-components` variable is an object list composed of the following schema: ``` list(object({ app_component_name = string app_component_type = string resources = list(object({ resource_name = string resource_type = string resource_identifier = string resource_identifier_type = string resource_region = string })) })) ``` A single app-component is composed of: - `app_component_name` - a unique name for each app-component - `app_component_type` - one of the supported app-component types, as listed in https://docs.aws.amazon.com/resilience-hub/latest/userguide/AppComponent.grouping.html - `resources` - the list of resources to that are assessed together Please refer to https://docs.aws.amazon.com/resilience-hub/latest/userguide/AppComponent.grouping.html for more details. A single resources is composed of: - `resource_name` - a unique name for each resource - `resource_type` - one of the supported resource types, as listed in https://docs.aws.amazon.com/resilience-hub/latest/userguide/AppComponent.grouping.html - `resource_identifier` - either an ARN or identifier, depends on the actual resources (some AWS resources don't support ARN, refer to docs) - `resource_identifier_type` - either `Native` or `Arn`, should correspond with `resource_identifier` - `resource_region` - the AWS region where the resource is deployed ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.0 | | [aws](#requirement\_aws) | >= 3.72.0 | | [awscc](#requirement\_awscc) | >= 0.21.0 | | [random](#requirement\_random) | ~> 3.0.0 | ## Providers | Name | Version | |------|---------| | [awscc](#provider\_awscc) | >= 0.21.0 | | [random](#provider\_random) | ~> 3.0.0 | ## Modules No modules. ## Resources | Name | Type | |------|------| | [awscc_resiliencehub_app.app](https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/resiliencehub_app) | resource | | [awscc_resiliencehub_resiliency_policy.policy](https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/resiliencehub_resiliency_policy) | resource | | [random_id.session](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [app\_components](#input\_app\_components) | The application's app-components, including its resources |
list(object({
app_component_name = string
app_component_type = string
resources = list(object({
resource_name = string
resource_type = string
resource_identifier = string
resource_identifier_type = string
resource_region = string
}))
}))
| n/a | yes | | [app\_name](#input\_app\_name) | The Application's name | `string` | n/a | yes | | [rpo](#input\_rpo) | RPO across all failure metrics | `number` | n/a | yes | | [rto](#input\_rto) | RTO across all failure metrics | `number` | n/a | yes | | [s3\_state\_file\_url](#input\_s3\_state\_file\_url) | An URL to s3-backend Terraform state-file | `string` | n/a | yes | ## Outputs | Name | Description | |------|-------------| | [app\_id](#output\_app\_id) | The application created | | [policy\_id](#output\_policy\_id) | The policy created |