Class: EksCli::CloudFormation::EKS
- Inherits:
-
Object
- Object
- EksCli::CloudFormation::EKS
- Defined in:
- lib/eks_cli/cloudformation/eks.rb
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
-
#initialize(cluster_name) ⇒ EKS
constructor
A new instance of EKS.
Constructor Details
#initialize(cluster_name) ⇒ EKS
Returns a new instance of EKS.
11 12 13 |
# File 'lib/eks_cli/cloudformation/eks.rb', line 11 def initialize(cluster_name) @cluster_name = cluster_name end |
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/eks_cli/cloudformation/eks.rb', line 15 def create Log.info "creating EKS stack for #{@cluster_name}" s = Stack.create(@cluster_name, cf_config) Stack.await([s]) s.reload Log.info "Outputs are: SecurityGroups: #{s.output("SecurityGroups")} VpcId: #{s.output("VpcId")} SubnetIds: #{s.output("SubnetIds")} EKSClusterARN: #{s.output("EKSClusterARN")} NodeGroupsInClusterSecurityGroup: #{s.output("NodeGroupsInClusterSecurityGroup")} " {control_plane_sg_id: s.output("SecurityGroups"), vpc_id: s.output("VpcId"), subnets: s.output("SubnetIds").split(","), nodes_sg_id: s.output("NodeGroupsInClusterSecurityGroup"), cluster_arn: s.output("EKSClusterARN")} end |