Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
Remove redundant data call (#4)
Browse files Browse the repository at this point in the history
* remove redundant data call
  • Loading branch information
Dima Ilchenko authored Oct 27, 2022
1 parent 75379d9 commit b118ccb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion auth_asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "aws_launch_configuration" "auth" {
create_before_destroy = true
}
name_prefix = "${substr(var.cluster_name, 0, 16)}-auth-"
image_id = data.aws_ami.base.id
image_id = var.ami_id
instance_type = var.auth_instance_type
user_data = templatefile(
"${path.module}/auth-user-data.tpl",
Expand Down
12 changes: 0 additions & 12 deletions data.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# Base AMI is found by ID - this is to prevent issues where launch configurations
# are changed and ASGs recreated because the AMI ID gets updated externally
data "aws_ami" "base" {
most_recent = true
owners = [var.ami_owner_account_id]

filter {
name = "image-id"
values = [var.ami_id]
}
}

# Used in role ARNs
data "aws_caller_identity" "current" {}

Expand Down
4 changes: 2 additions & 2 deletions defaults.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variable "grafana_version" {

# Assign a number to each AZ letter used in our configuration
variable "az_number" {
type = map
type = map(any)
default = {
a = 1
b = 2
Expand All @@ -33,7 +33,7 @@ variable "az_number" {
# Assign a number to each different subnet type that we use
# This helps avoid conflicts across different availability zones
variable "az_subnet_type" {
type = map
type = map(any)
default = {
bastion = 1
auth = 2
Expand Down
2 changes: 1 addition & 1 deletion vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ locals {
bastion_cidr = cidrsubnet(var.vpc_cidr, 4, var.az_subnet_type.bastion)
node_cidr = cidrsubnet(var.vpc_cidr, 4, var.az_subnet_type.node)
monitor_cidr = cidrsubnet(var.vpc_cidr, 4, var.az_subnet_type.monitor) # tflint-ignore: terraform_unused_declarations
proxy_cidr = cidrsubnet(var.vpc_cidr, 4, var.az_subnet_type.proxy) # tflint-ignore: terraform_unused_declarations
proxy_cidr = cidrsubnet(var.vpc_cidr, 4, var.az_subnet_type.proxy) # tflint-ignore: terraform_unused_declarations
}

0 comments on commit b118ccb

Please sign in to comment.