2023-03-21 14:01:16 +00:00
config input string {
description = "A simple input"
}
2023-03-20 19:56:24 +00:00
2023-03-21 14:01:16 +00:00
config cidrBlocks "map(string)" {
2023-03-21 15:50:30 +00:00
description = "The main CIDR blocks for the VPC\nIt is a map of strings"
2023-03-21 14:01:16 +00:00
}
2023-03-20 19:56:24 +00:00
2023-03-23 22:25:21 +00:00
config "githubApp" "object({id=string, keyBase64=string,webhookSecret=string})" {
description = "GitHub app parameters, see your github app. Ensure the key is the base64-encoded `.pem` file (the output of `base64 app.private-key.pem`, not the content of `private-key.pem`)."
nullable = true
}
config "servers" "list(object({name=string}))" {
description = "A list of servers"
nullable = true
}
config "deploymentZones" "map(object({ zone = string }))" {
description = "A map between for zones"
nullable = true
}
2023-03-20 19:56:24 +00:00
config ipAddress "list(int)" { }
2023-03-08 13:21:34 +00:00
resource password "random:index/randomPassword:RandomPassword" {
length = 16
special = true
overrideSpecial = input
}
2023-03-23 22:25:21 +00:00
resource githubPassword "random:index/randomPassword:RandomPassword" {
length = 16
special = true
overrideSpecial = githubApp . webhookSecret
}
2023-03-24 09:40:18 +00:00
# Example of iterating a list of objects
resource serverPasswords "random:index/randomPassword:RandomPassword" {
options { range = length ( servers ) }
length = 16
special = true
overrideSpecial = servers [ range . value ] . name
}
# Example of iterating a map of objects
resource zonePasswords "random:index/randomPassword:RandomPassword" {
options { range = deploymentZones }
length = 16
special = true
overrideSpecial = range . value . zone
}
2023-03-09 13:28:55 +00:00
component simpleComponent "../simpleComponent" { }
2023-03-08 13:21:34 +00:00
output result {
value = password . result
}