Interface IBastionHostLinuxProps
Properties of the bastion host.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBastionHostLinuxProps
Syntax (vb)
Public Interface IBastionHostLinuxProps
Remarks
ExampleMetadata: fixture=with-vpc infused
Examples
var host = new BastionHostLinux(this, "BastionHost", new BastionHostLinuxProps {
Vpc = vpc,
BlockDevices = new [] { new BlockDevice {
DeviceName = "/dev/sdh",
Volume = BlockDeviceVolume.Ebs(10, new EbsDeviceOptions {
Encrypted = true
})
} }
});
Synopsis
Properties
AvailabilityZone | In which AZ to place the instance within the VPC. |
BlockDevices | Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes. |
Init | Apply the given CloudFormation Init configuration to the instance at startup. |
InitOptions | Use the given options for applying CloudFormation Init. |
InstanceName | The name of the instance. |
InstanceType | Type of instance to launch. |
MachineImage | The machine image to use, assumed to have SSM Agent preinstalled. |
RequireImdsv2 | Whether IMDSv2 should be required on this instance. |
SecurityGroup | Security Group to assign to this instance. |
SubnetSelection | Select the subnets to run the bastion host in. |
Vpc | VPC to launch the instance in. |
Properties
AvailabilityZone
In which AZ to place the instance within the VPC.
virtual string AvailabilityZone { get; }
Property Value
System.String
Remarks
Default: - Random zone.
BlockDevices
Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
virtual IBlockDevice[] BlockDevices { get; }
Property Value
Remarks
Each instance that is launched has an associated root device volume, either an Amazon EBS volume or an instance store volume. You can use block device mappings to specify additional EBS volumes or instance store volumes to attach to an instance when it is launched.
Default: - Uses the block device mapping of the AMI
See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
Init
Apply the given CloudFormation Init configuration to the instance at startup.
virtual CloudFormationInit Init { get; }
Property Value
Remarks
Default: - no CloudFormation init
InitOptions
Use the given options for applying CloudFormation Init.
virtual IApplyCloudFormationInitOptions InitOptions { get; }
Property Value
IApplyCloudFormationInitOptions
Remarks
Describes the configsets to use and the timeout to wait
Default: - default options
InstanceName
The name of the instance.
virtual string InstanceName { get; }
Property Value
System.String
Remarks
Default: 'BastionHost'
InstanceType
Type of instance to launch.
virtual InstanceType InstanceType { get; }
Property Value
Remarks
Default: 't3.nano'
MachineImage
The machine image to use, assumed to have SSM Agent preinstalled.
virtual IMachineImage MachineImage { get; }
Property Value
Remarks
Default: - An Amazon Linux 2 image which is kept up-to-date automatically (the instance may be replaced on every deployment) and already has SSM Agent installed.
RequireImdsv2
Whether IMDSv2 should be required on this instance.
virtual Nullable<bool> RequireImdsv2 { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
SecurityGroup
Security Group to assign to this instance.
virtual ISecurityGroup SecurityGroup { get; }
Property Value
Remarks
Default: - create new security group with no inbound and all outbound traffic allowed
SubnetSelection
Select the subnets to run the bastion host in.
virtual ISubnetSelection SubnetSelection { get; }
Property Value
Remarks
Set this to PUBLIC if you need to connect to this instance via the internet and cannot use SSM. You have to allow port 22 manually by using the connections field
Default: - private subnets of the supplied VPC