Skip to content

Commit

Permalink
refactor(vpc): use cluster_name variable for vpc name
Browse files Browse the repository at this point in the history
The vpc.yaml template now uses  variable instead of hardcoded VPC name,
making it more flexible for different cluster deployments.

This change allows the VPC name to be dynamically set based on the cluster name
provided in the WorkspaceTemplateApply's spec.variables.
  • Loading branch information
reoring committed Nov 13, 2024
1 parent d803a45 commit bd4432c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
- Updated vpc.yaml template to use ${cluster_name} variable instead of hardcoded VPC name

## [v0.1.1] - 2024-11-13

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions config/samples/workspacetemplates/vpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
source: Inline
vars:
- key: name
value: demo-cluster-vpc
value: "${cluster_name}"
module: |
data "aws_availability_zones" "available" {
filter {
Expand Down Expand Up @@ -57,7 +57,7 @@ spec:
"kubernetes.io/role/elb" = "1"
}
private_subnet_tags = {
"karpenter.sh/discovery" = "$${local.name}"
"karpenter.sh/discovery" = "${local.name}"
"kubernetes.io/role/internal-elb" = "1"
}
tags = {
Expand Down

0 comments on commit bd4432c

Please sign in to comment.