All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.burkard.cdk.services.eks.FargateCluster.scala Maven / Gradle / Ivy

The newest version!
package io.burkard.cdk.services.eks

import scala.collection.JavaConverters._

@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object FargateCluster {

  def apply(
    internalResourceId: String,
    clusterHandlerSecurityGroup: Option[software.amazon.awscdk.services.ec2.ISecurityGroup] = None,
    outputMastersRoleArn: Option[Boolean] = None,
    kubectlLayer: Option[software.amazon.awscdk.services.lambda.ILayerVersion] = None,
    clusterHandlerEnvironment: Option[Map[String, String]] = None,
    role: Option[software.amazon.awscdk.services.iam.IRole] = None,
    mastersRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
    endpointAccess: Option[software.amazon.awscdk.services.eks.EndpointAccess] = None,
    serviceIpv4Cidr: Option[String] = None,
    placeClusterHandlerInVpc: Option[Boolean] = None,
    kubectlMemory: Option[software.amazon.awscdk.Size] = None,
    vpcSubnets: Option[List[_ <: software.amazon.awscdk.services.ec2.SubnetSelection]] = None,
    version: Option[software.amazon.awscdk.services.eks.KubernetesVersion] = None,
    albController: Option[software.amazon.awscdk.services.eks.AlbControllerOptions] = None,
    prune: Option[Boolean] = None,
    defaultProfile: Option[software.amazon.awscdk.services.eks.FargateProfileOptions] = None,
    kubectlEnvironment: Option[Map[String, String]] = None,
    outputConfigCommand: Option[Boolean] = None,
    outputClusterName: Option[Boolean] = None,
    vpc: Option[software.amazon.awscdk.services.ec2.IVpc] = None,
    clusterName: Option[String] = None,
    clusterLogging: Option[List[_ <: software.amazon.awscdk.services.eks.ClusterLoggingTypes]] = None,
    onEventLayer: Option[software.amazon.awscdk.services.lambda.ILayerVersion] = None,
    coreDnsComputeType: Option[software.amazon.awscdk.services.eks.CoreDnsComputeType] = None,
    securityGroup: Option[software.amazon.awscdk.services.ec2.ISecurityGroup] = None,
    secretsEncryptionKey: Option[software.amazon.awscdk.services.kms.IKey] = None
  )(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.eks.FargateCluster =
    software.amazon.awscdk.services.eks.FargateCluster.Builder
      .create(stackCtx, internalResourceId)
      .clusterHandlerSecurityGroup(clusterHandlerSecurityGroup.orNull)
      .outputMastersRoleArn(outputMastersRoleArn.map(Boolean.box).orNull)
      .kubectlLayer(kubectlLayer.orNull)
      .clusterHandlerEnvironment(clusterHandlerEnvironment.map(_.asJava).orNull)
      .role(role.orNull)
      .mastersRole(mastersRole.orNull)
      .endpointAccess(endpointAccess.orNull)
      .serviceIpv4Cidr(serviceIpv4Cidr.orNull)
      .placeClusterHandlerInVpc(placeClusterHandlerInVpc.map(Boolean.box).orNull)
      .kubectlMemory(kubectlMemory.orNull)
      .vpcSubnets(vpcSubnets.map(_.asJava).orNull)
      .version(version.orNull)
      .albController(albController.orNull)
      .prune(prune.map(Boolean.box).orNull)
      .defaultProfile(defaultProfile.orNull)
      .kubectlEnvironment(kubectlEnvironment.map(_.asJava).orNull)
      .outputConfigCommand(outputConfigCommand.map(Boolean.box).orNull)
      .outputClusterName(outputClusterName.map(Boolean.box).orNull)
      .vpc(vpc.orNull)
      .clusterName(clusterName.orNull)
      .clusterLogging(clusterLogging.map(_.asJava).orNull)
      .onEventLayer(onEventLayer.orNull)
      .coreDnsComputeType(coreDnsComputeType.orNull)
      .securityGroup(securityGroup.orNull)
      .secretsEncryptionKey(secretsEncryptionKey.orNull)
      .build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy