network_interfaces = {}
for (group_name, group_config, role_name, role_info) in process_nodes(cfg):
for index, network_interface in enumerate(role_info["node_list"]):
network_interfaces[f"{cfg.stack}-{group_name}-{role_name}-{index}"] = network_interface
config = get_full_config(cfg)
ghe_ha_config_bucket_object = aws.s3.BucketObject(
"ghe-ha-config-bucket-object",
bucket=config_bucket.id,
content=Output.from_input(network_interfaces).apply(update_config(config, network_interfaces)),
opts=pulumi.ResourceOptions(depends_on=network_interfaces.values()),
)