Skip to content

Commit f4b1823

Browse files
committed
Cleanup and passing network id downstream
1 parent 71f6b56 commit f4b1823

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/sui/lib/single-node-stack.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export interface SuiSingleNodeStackProps extends cdk.StackProps {
1818
instanceCpuType: ec2.AmazonLinuxCpuType;
1919
suiNetworkId: configTypes.SuiNetworkId;
2020
dataVolume: configTypes.SuiDataVolumeConfig;
21-
2221
}
2322

2423
export class SuiSingleNodeStack extends cdk.Stack {
@@ -40,8 +39,6 @@ export class SuiSingleNodeStack extends cdk.Stack {
4039
dataVolume,
4140
} = props;
4241

43-
44-
4542
// Using default VPC
4643
const vpc = ec2.Vpc.fromLookup(this, "vpc", { isDefault: true });
4744

@@ -86,10 +83,9 @@ export class SuiSingleNodeStack extends cdk.Stack {
8683
},
8784
});
8885

89-
// Assuming the SingleNodeConstruct exposes the EC2 instance as a property named 'instance'
86+
// Assuming the SingleNodeConstruct exposes the EC2 instance as a property named 'instance'
9087
// Set a CreationPolicy with a 30-minute timeout
9188

92-
9389
// Parsing user data script and injecting necessary variables
9490
const nodeStartScript = fs.readFileSync(path.join(__dirname, "assets", "user-data", "node.sh")).toString();
9591
const dataVolumeSizeBytes = dataVolume.sizeGiB * constants.GibibytesToBytesConversionCoefficient;
@@ -102,8 +98,11 @@ export class SuiSingleNodeStack extends cdk.Stack {
10298
_NODE_CF_LOGICAL_ID_: node.nodeCFLogicalId,
10399
_DATA_VOLUME_TYPE_: dataVolume.type,
104100
_DATA_VOLUME_SIZE_: dataVolumeSizeBytes.toString(),
105-
101+
_NETWORK_ID: suiNetworkId,
106102
});
103+
104+
// /var/log/cloud-init.log and
105+
// /var/log/cloud-init-output.log
107106
node.instance.addUserData(modifiedInitNodeScript);
108107

109108
// Adding CloudWatch dashboard to the node

0 commit comments

Comments
 (0)