Skip to content

Commit

Permalink
feat(provider): Vultr
Browse files Browse the repository at this point in the history
  • Loading branch information
xMikux committed Aug 28, 2024
1 parent ef6ce58 commit c3b0343
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ Currently the below providers are supported, but it could be used with other pro
- DigitalOcean
- Scaleway
- Cloudflare
- Vultr

## Inputs

### `provider`

**Not Required** The s3 provider to use. Defaults to Linode. AWS, Linode, DigitalOcean, Scaleway, Cloudflare are supported.
**Not Required** The s3 provider to use. Defaults to Linode. AWS, Linode, DigitalOcean, Scaleway, Cloudflare, Vultr are supported.

### `secret_key`

Expand Down
8 changes: 8 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24961,6 +24961,14 @@ const providers = {
website_endpoint: '',
access_key,
secret_key,
}),
vultr: ({ region = 'ewr1', access_key = '', secret_key = ''}) => ({
bucket_location: region,
host_base: `${region}.vultrobjects.com`,
host_bucket: `%(bucket)s.${region}.vultrobjects.com`,
website_endpoint: '',
access_key,
secret_key,
})
}

Expand Down
8 changes: 8 additions & 0 deletions src/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ const providers = {
website_endpoint: '',
access_key,
secret_key,
}),
vultr: ({ region = 'ewr1', access_key = '', secret_key = ''}) => ({
bucket_location: region,
host_base: `${region}.vultrobjects.com`,
host_bucket: `%(bucket)s.${region}.vultrobjects.com`,
website_endpoint: '',
access_key,
secret_key,
})
}

Expand Down
13 changes: 13 additions & 0 deletions src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,16 @@ const cloudflareWriter = createWriteStream("assets/test-results/cloudflare");
for (const line of cloudflareConf) {
cloudflareWriter.write(line + "\r\n");
}

const vultrWriter = createWriteStream('assets/test-results/vultr')

const vultrConf = makeConf(providers.vultr({
cluster: "ewr1",
access_key: 'top-secret',
secret_key: 'more secret'
}))


for (const line of vultrConf) {
vultrWriter.write(line + '\r\n')
}

0 comments on commit c3b0343

Please sign in to comment.