Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nat_public_ips printing empty #392

Closed
sagivle opened this issue Feb 3, 2020 · 1 comment · Fixed by #432
Closed

nat_public_ips printing empty #392

sagivle opened this issue Feb 3, 2020 · 1 comment · Fixed by #432

Comments

@sagivle
Copy link

sagivle commented Feb 3, 2020

// TF version 0.12.20

resource "aws_eip" "nat" {
count = 1
vpc = true
}

module "vpc" {
create_vpc = var.module_enabled
source = "terraform-aws-modules/vpc/aws"
version = "2.24.0"

name = "${var.deploy_name}-${var.region}"
cidr = "192.168.0.0/16"

azs = split(",", var.aws_azs[var.region])
public_subnets = ["192.168.14.0/24"]
private_subnets = ["192.168.192.0/19"]

enable_nat_gateway = true
single_nat_gateway = false
reuse_nat_ips = true
external_nat_ip_ids = "${aws_eip.nat.*.id}"
enable_vpn_gateway = false
enable_dns_hostnames = true

vpc_tags = {
"kubernetes.io/cluster/${var.deploy_name}-${var.region}" = "shared"
}
private_subnet_tags = {
"kubernetes.io/cluster/${var.deploy_name}-${var.region}" = "shared"
}
public_subnet_tags = {
"kubernetes.io/cluster/${var.deploy_name}-${var.region}" = "owned"
}
tags = {
Terraform = "true"
Environment = var.environment
KubernetesCluster = "${var.deploy_name}-${var.region}"
}
}

output "nat_public_ips" {
// value = module.vpc.nat_public_ips // - printing empty
value = "${aws_eip.nat.*.public_ip}" // printing the ip
}

@github-actions
Copy link

github-actions bot commented Nov 1, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant