Skip to content

Commit 2ed5441

Browse files
committed
make format-tf
1 parent 90a92d2 commit 2ed5441

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

examples/eks/eks_live_migration/castai.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resource "castai_eks_clusterid" "cluster_id" {
1616
account_id = data.aws_caller_identity.current.account_id
1717
region = var.region
1818
cluster_name = var.cluster_name
19-
depends_on = [module.eks, helm_release.calico, aws_eks_access_entry.access_entry]
19+
depends_on = [module.eks, helm_release.calico, aws_eks_access_entry.access_entry]
2020
}
2121

2222
resource "castai_eks_user_arn" "castai_user_arn" {
@@ -56,14 +56,14 @@ module "castai-eks-cluster" {
5656

5757
node_configurations = {
5858
default = {
59-
subnets = module.vpc.private_subnets
59+
subnets = module.vpc.private_subnets
6060
instance_profile_arn = module.castai-eks-role-iam.instance_profile_arn
61-
security_groups = [
61+
security_groups = [
6262
module.eks.node_security_group_id,
6363
]
64-
init_script = base64encode(file("eks-init-script.sh"))
64+
init_script = base64encode(file("eks-init-script.sh"))
6565
container_runtime = "containerd"
66-
eks_image_family = "al2023"
66+
eks_image_family = "al2023"
6767
}
6868
}
6969

examples/eks/eks_live_migration/eks.tf

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ provider "aws" {
1919
}
2020

2121
provider "kubernetes" {
22-
host = module.eks.cluster_endpoint
22+
host = module.eks.cluster_endpoint
2323
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
2424

2525
exec {
2626
api_version = "client.authentication.k8s.io/v1beta1"
2727
command = "aws"
28-
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
28+
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
2929
}
3030
}
3131

@@ -44,16 +44,16 @@ locals {
4444

4545
tags = {
4646
# repo_url = "http://gitlab.com/castai/IaC"
47-
team = "live"
48-
persist = "true"
47+
team = "live"
48+
persist = "true"
4949
terraform = "true"
5050
}
5151

5252
# Create a local value to store the first IP of the kubernetes endpoint -> to install Calico
5353
all_endpoint_ips = flatten([
5454
for subset in data.kubernetes_endpoints_v1.kubernetes_service.subset : [
5555
for addresses in subset : [
56-
for ip in addresses: ip
56+
for ip in addresses : ip
5757
]
5858
]
5959
])
@@ -62,13 +62,13 @@ locals {
6262

6363
# Without that, pods on nodes with Calico don't have network access (internet, nor even node IPs)
6464
resource "aws_security_group_rule" "calico-vxlan" {
65-
security_group_id = module.eks.node_security_group_id
66-
type = "ingress"
67-
from_port = 4789
68-
to_port = 4789
69-
protocol = "udp"
70-
cidr_blocks = [local.vpc_cidr]
71-
description = "VXLAN calico"
65+
security_group_id = module.eks.node_security_group_id
66+
type = "ingress"
67+
from_port = 4789
68+
to_port = 4789
69+
protocol = "udp"
70+
cidr_blocks = [local.vpc_cidr]
71+
description = "VXLAN calico"
7272
}
7373

7474
# trivy:ignore:aws-ec2-no-excessive-port-access
@@ -171,13 +171,13 @@ module "eks" {
171171

172172
eks_managed_node_groups = {
173173
stock_ami = {
174-
name = "stock-ami"
175-
ami_family = "AmazonLinux2023"
176-
instance_types = ["c5a.large"]
174+
name = "stock-ami"
175+
ami_family = "AmazonLinux2023"
176+
instance_types = ["c5a.large"]
177177
privateNetworking = true
178-
min_size = 2
179-
max_size = 4
180-
desired_size = 2
178+
min_size = 2
179+
max_size = 4
180+
desired_size = 2
181181

182182
iam_role_additional_policies = {
183183
AmazonSSMManagedInstanceCore = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"

examples/eks/eks_live_migration/variables.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ variable "cluster_name" {
55

66
variable "region" {
77
description = "AWS region where cluster will be created"
8-
type = string
8+
type = string
99
}
1010

1111
variable "castai_api_token" {
12-
type = string
12+
type = string
1313
description = "CAST AI api token"
14-
sensitive = true
14+
sensitive = true
1515
}
1616

1717
variable "castai_api_url" {
18-
type = string
18+
type = string
1919
description = "URL of alternative CAST AI API to be used during development or testing"
20-
default = "https://api.cast.ai"
20+
default = "https://api.cast.ai"
2121
}
2222

2323
variable "castai_grpc_url" {
24-
type = string
24+
type = string
2525
description = "CAST AI gRPC URL"
26-
default = "grpc.cast.ai:443"
26+
default = "grpc.cast.ai:443"
2727
}
2828

2929
variable "delete_nodes_on_disconnect" {

0 commit comments

Comments
 (0)