Skip to content

Commit

Permalink
add: outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmacedot committed Nov 7, 2024
1 parent 10b5377 commit e149fbc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion _locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ locals {
workload = "workload"
backup = "backup"
}
}
}
7 changes: 7 additions & 0 deletions _outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
output "vault_arn" {
value = aws_backup_vault.backup_vault.arn
}

output "plan_id" {
value = aws_backup_plan.backup_plan.id
}
7 changes: 7 additions & 0 deletions _versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# AWS Backup vault
resource "aws_backup_vault" "backup_vault" {
name = "${var.name}-vault"
kms_key_arn = var.vault_kms_key_arn
Expand Down
18 changes: 9 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -153,24 +153,24 @@ variable "changeable_for_days" {

variable "rules" {
description = "List of backup rules"
type = list(object({
rule_name = string
schedule = optional(string)
start_window = optional(number, 60)
completion_window = optional(number, 120)
enable_continuous_backup = optional(bool, false)
lifecycle = optional(object({
type = list(object({
rule_name = string
schedule = optional(string)
start_window = optional(number, 60)
completion_window = optional(number, 120)
enable_continuous_backup = optional(bool, false)
lifecycle = optional(object({
cold_storage_after = optional(number)
delete_after = optional(number, 30)
}))
}))
default = [{
rule_name = "backup-rule"
rule_name = "backup-rule"
}]
}

variable "enabled" {
description = "Change to false to avoid deploying any AWS Backup resources"
type = bool
default = true
}
}

0 comments on commit e149fbc

Please sign in to comment.