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

feat(provider): Vultr #15

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')
}
Loading