@orange-stack/load-balancer-env-component
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

load-balancer-env-jsii-component

Component to create a Load Balancer.

How to use

Below are all languages supported by the AWS CDK.

C#

Install the dependency:

dotnet add package OrangeStack.Components.Env.LoadBalancer
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
using Constructs;
using OrangeStack.Components.Env.LoadBalancer;

namespace MyStack
{
    public class MyStack : Stack
    {
        internal MyStack(Construct scope, string id, IStackProps props = null) : base(scope, id, props)
        {
            LoadBalancerEnvComponent environment = new LoadBalancerEnvComponent(this, "MyALB", new LoadBalancerEnvComponentProps{
                LoadBalancerName = "xxxxxx",
                Subnets = "xxxxxx",
                Vpc = "xxxxxxx"
            });
        }
    }
}

F#

Not yet supported.

Go

Not yet supported.

Java

Not yet supported.

JavaScript

Install the dependency:

npm install --save @orange-stack/load-balancer-env-component

Import the construct into your project, for example:

const { Stack } = require('aws-cdk-lib');
const { LoadBalancerEnvComponent } = require('@orange-stack/load-balancer-env-component');

class MyStack extends Stack {
  constructor(scope, id, props) {
    super(scope, id, props);

    const loadBalancer = new LoadBalancerEnvComponent(this, 'MyALB', { 
      loadBalancerName: 'xxxxxxx',
      subnets: vpcEnvComponent.subnets,
      vpc: vpcEnvComponent.vpc
     });
  }
}

module.exports = { MyStack }

Python

Not yet supported.

TypeScript

Install the dependency:

npm install --save @orange-stack/load-balancer-env-component

Import the construct into your project, for example:

import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { LoadBalancerEnvComponent } from '@orange-stack/load-balancer-env-component';

export class MyStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    const loadBalancer = new LoadBalancerEnvComponent(this, 'MyALB', { 
      loadBalancerName: 'xxxxxxxxxx',
      subnets: vpcEnvComponent.subnets,
      vpc: vpcEnvComponent.vpc
     });
  }
}

Construct Props

Name Type Description
loadBalancerName string The name for the load balancer. Default: DefaultEnvComponentLoadBalancer.
ingressIpv4Source string[] Sources that will have access to Load Balancer. Default: [].
internetFacing boolean Whether the load balancer has an internet-routable address. Default: false.
subnets SubnetSelection The subnets to be used.
vpc IVpc The VPC to be used.

Properties

Name Type Description
loadBalancer ApplicationLoadBalancer Application Load Balancer of the cluster.
securityGroup SecurityGroup Security group of the load balancer.

Development

Prerequisites

Setup

cd load-balancer-env-jsii-component
npm install

You are done! Happy coding!

Readme

Keywords

Package Sidebar

Install

npm i @orange-stack/load-balancer-env-component

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

996 kB

Total Files

15

Last publish

Collaborators

  • orange.stack