Skip to content

Commit

Permalink
pass in vpc
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Mar 11, 2025
1 parent 0522914 commit 6be6c79
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the
| <a name="input_region"></a> [region](#input\_region) | AWS region | `string` | n/a | yes |
| <a name="input_subnets_name"></a> [subnets\_name](#input\_subnets\_name) | Define the name of the subnets to be used by this cluster | `string` | `"*-container-*"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources | `map(string)` | `{}` | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC where the resources will be deployed | `string` | n/a | yes |

## Outputs

Expand Down
1 change: 1 addition & 0 deletions karpenter-resources/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ec2NodeClass:
amiFamily: ${amd_ami_family}
amiSelectorTerms:
- alias: ${amd_ami_alias}
vpcId: ${vpc_id}
subnetSelectorTerms:
- tags:
Name: "${subnets_name}"
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ resource "helm_release" "nodepool_resources" {
karpenter_node_profile = module.karpenter_resources.instance_profile_name
subnets_name = var.subnets_name
tags = var.tags
vpc_id = var.vpc_id
})
]
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,8 @@ variable "namespace" {
type = string
default = "namespace"
}

variable "vpc_id" {
description = "The ID of the VPC where the resources will be deployed"
type = string
}

0 comments on commit 6be6c79

Please sign in to comment.