fix nix flake, add security_group_name which matches the tag rather than the attribute
Signed-off-by: matttrach <matttrach@gmail.com>
This commit is contained in:
parent
4d5aa9db7b
commit
618f61c80e
4
.envrc
4
.envrc
|
|
@ -1,6 +1,4 @@
|
|||
IS_NIX_SHELL=$(echo "$SHELL" | grep 'nix')
|
||||
|
||||
if [ -z "${IS_NIX_SHELL}" ]; then
|
||||
if [ -z "${name}" ]; then
|
||||
echo "entering dev environment..."
|
||||
|
||||
nix develop . --extra-experimental-features nix-command --extra-experimental-features flakes
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ data "aws_security_group" "selected" {
|
|||
|
||||
resource "aws_security_group" "new" {
|
||||
count = local.create
|
||||
description = "security group for single person"
|
||||
description = "${local.type} security group generated by aws_access module"
|
||||
name = local.name
|
||||
tags = {
|
||||
Name = local.name
|
||||
Owner = local.owner
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
output "id" {
|
||||
value = (local.select == 1 ? data.aws_security_group.selected[0].id : aws_security_group.new[0].id)
|
||||
}
|
||||
output "name" {
|
||||
value = (local.select == 1 ? data.aws_security_group.selected[0].tags.Name : aws_security_group.new[0].tags.Name)
|
||||
}
|
||||
output "security_group" {
|
||||
value = (local.select == 1 ? data.aws_security_group.selected[0] : aws_security_group.new[0])
|
||||
}
|
||||
|
|
@ -14,6 +14,10 @@ output "security_group" {
|
|||
value = module.security_group.security_group
|
||||
}
|
||||
|
||||
output "security_group_name" {
|
||||
value = module.security_group.name
|
||||
}
|
||||
|
||||
output "ssh_key" {
|
||||
value = module.ssh_key.ssh_key
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue