Regarding AWS Instance Public IP

I’m new to terraform and testing deploying ec2 instances via an ASG and launch configuration. My launch config looks like this:

resource "aws_launch_configuration" "test_launcher" {

  name_prefix   = "test-launcher"
  image_id      =
  instance_type = var.instance_type
  iam_instance_profile        = var.iam_instance_profile
  key_name                    = var.ssh_key
  associate_public_ip_address = false
  ebs_optimized               = true

  lifecycle {
    create_before_destroy = true


As you can see, I’m specifying that a public ip address should not be assigned. However, the instances are being deployed with a public ip and DNS name. Is there something else I need to do in order to prevent a public IP being assigned?