-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update resource-group module to support optional attributes (#35)
- Loading branch information
Showing
5 changed files
with
19 additions
and
11 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
variable "name" { | ||
description = "(Required) A name to identify the resource group. A resource group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with `AWS` or `aws`." | ||
type = string | ||
nullable = false | ||
} | ||
|
||
variable "description" { | ||
description = "(Optional) The description of the resource group." | ||
type = string | ||
default = "Managed by Terraform." | ||
nullable = false | ||
} | ||
|
||
variable "query" { | ||
description = <<EOF | ||
(Optional) A configuration for the actual query used to match against resources. It supports `resource_types` and `resource_tags`. `query` block as defined below. | ||
(Required) `resource_tags` - A map of key/value pairs that are compared to the tags attached to resources. | ||
(Optional) `resource_tags` - A map of key/value pairs that are compared to the tags attached to resources. | ||
(Optional) `resource_types` - A list of resource-type specification strings with `AWS::service-id::resource-type` format. Limit the results to only those resource types that match the filter. Specify `AWS::AllSupported` to include resources of any resources that are currently supported by Resource Group. | ||
EOF | ||
type = any | ||
default = {} | ||
type = object({ | ||
resource_tags = optional(map(string), {}) | ||
resource_types = optional(list(string), ["AWS::AllSupported"]) | ||
}) | ||
default = {} | ||
nullable = false | ||
} | ||
|
||
variable "tags" { | ||
description = "(Optional) A map of tags to add to all resources." | ||
type = map(string) | ||
default = {} | ||
nullable = false | ||
} | ||
|
||
variable "module_tags_enabled" { | ||
description = "(Optional) Whether to create AWS Resource Tags for the module informations." | ||
type = bool | ||
default = true | ||
nullable = false | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
terraform { | ||
required_version = ">= 1.1" | ||
required_version = ">= 1.5" | ||
|
||
required_providers { | ||
aws = { | ||
|