Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions server-hosting/config.sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const Config = {
restartApi: true,
// Set to true if you want to use Satisfactory Experimental
useExperimentalBuild: false,
// Set to true if you want to assign an elastic IP address (EIP)
useEip: false,

// optional parameters

Expand Down
10 changes: 10 additions & 0 deletions server-hosting/server-hosting-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ export class ServerHostingStack extends Stack {
securityGroup,
})

if (Config.useEip) {
const eip = new ec2.CfnEIP(this, 'IP')

// Elastic IP reference
new ec2.CfnEIPAssociation(this, 'Association', {
eip: eip.ref,
instanceId: server.instanceId,
})
}

// Add Base SSM Permissions, so we can use AWS Session Manager to connect to our server, rather than external SSH.
server.role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore'));

Expand Down