Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SKSNodepool doesn't wait for the instance pool to become ready #109

Open
davemaier opened this issue Apr 19, 2023 · 0 comments
Open

SKSNodepool doesn't wait for the instance pool to become ready #109

davemaier opened this issue Apr 19, 2023 · 0 comments

Comments

@davemaier
Copy link

When creating an SKSNodepool, pulumi doesn't wait for the instance pool to become ready. This leads to the problem that if I want to use the instance pools IP addresses later to configure the allowed IPs of my database, they are filled with an empty string.

This is an example of what I've tried:

const sksNodepool = new exoscale.SKSNodepool('nodepool-prd', {
  zone: 'at-vie-1',
  diskSize: 20,
  instanceType: 'standard.medium',
  size: 2,
  description: 'Instance pool for the production cluster',
  clusterId: sksCluster.id,
});

const instancePoolIps = sksNodepool.instancePoolId.apply(async (id) => {
  const instancePool = await exoscale.getInstancePool({ zone: 'at-vie-1', id });
    
  return instancePool.instances.map((i) => i.publicIpAddress);
});

const db = new exoscale.Database(
  'postgres',
  {
    name: 'postgres',
    zone: 'at-vie-1',
    type: 'pg',
    plan: 'hobbyist-2',
    pg: {
      ipFilters: instancePoolIps.apply((instances) => [
        ...instances.map(async (i) => `${await i}/32`),
        '62.240.134.67/32',
      ]),
    },
  },
  {
    dependsOn: sksNodepool,
  },
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant