build icon indicating copy to clipboard operation
build copied to clipboard

[plugin] MongoDB Atlas

Open DavidWells opened this issue 5 years ago • 5 comments

Create a Netlify build plugin that allows users to provision MongoDB atlas databases for a site.

The user will need to supply their mongo API key from atlas.

The first time it runs, it will create a database instance

Example config:

plugins:
  - mongo:
       databaseName: 'xyz'
       MONGO_API_KEY: ${env:mongokey}
       ...

DavidWells avatar Oct 02 '19 19:10 DavidWells

see this is where i get confused between addons and plugins.

easy to say "anything goes" but once you let people do this you will have confusion between them for ever.

swyxio avatar Oct 02 '19 20:10 swyxio

Yeah maybe these types of plugins will run on a provisioning step.

They might expose functions like:

function mongoPlugin(conf) {
  return {
    create: ({ netlifyConfig }) => {
      console.log('idempotent create')
    },
    update: () => {
      console.log('update if inputs have changed')
    },
    delete: () => {
      console.log('delete when site deleted')
    }
  }
}

Figuring it out as we go

DavidWells avatar Oct 02 '19 21:10 DavidWells

For right now we can use the lifecycle in place.

function mongoPlugin(conf) {
  return {
    init: () => {
      // create idempotent mongoDB instance
    },
  }
}

DavidWells avatar Oct 03 '19 03:10 DavidWells

TODO look into the mongoDB complexity

Also outputs.

DavidWells avatar Jan 14 '20 16:01 DavidWells

Blocked by #186.

erquhart avatar Feb 11 '20 20:02 erquhart

This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 14 days if no further activity occurs. Thanks!

github-actions[bot] avatar Oct 26 '22 14:10 github-actions[bot]

This issue was closed because it had no activity for over 1 year.

github-actions[bot] avatar Nov 10 '22 14:11 github-actions[bot]