Skip to content

Provider: support clevercloud #16

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

Merged
merged 1 commit into from
Sep 25, 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 @@ -12,12 +12,13 @@ Currently the below providers are supported, but it could be used with other pro
- Scaleway
- Cloudflare
- Vultr
- CleverCloud

## Inputs

### `provider`

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

### `secret_key`

Expand Down
10 changes: 9 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24969,7 +24969,15 @@ const providers = {
website_endpoint: '',
access_key,
secret_key,
})
}),
clevercloud: ({ region = 'US', access_key = '', secret_key = '' }) => ({
bucket_location: region,
host_base: `cellar-c2.services.clever-cloud.com`,
host_bucket: `%(bucket)s.cellar-c2.services.clever-cloud.com`,
website_endpoint: '',
access_key,
secret_key,
}),
}

const makeConf = (provider) => {
Expand Down
10 changes: 9 additions & 1 deletion src/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ const providers = {
website_endpoint: '',
access_key,
secret_key,
})
}),
clevercloud: ({ region = 'US', access_key = '', secret_key = '' }) => ({
bucket_location: region,
host_base: `cellar-c2.services.clever-cloud.com`,
host_bucket: `%(bucket)s.cellar-c2.services.clever-cloud.com`,
website_endpoint: '',
access_key,
secret_key,
}),
}

const makeConf = (provider) => {
Expand Down
11 changes: 11 additions & 0 deletions src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,14 @@ const vultrConf = makeConf(providers.vultr({
for (const line of vultrConf) {
vultrWriter.write(line + '\r\n')
}


const clevercloudWriter = createWriteStream('assets/test-results/clevercloud')
const clevercloudConf = makeConf(providers.clevercloud({
access_key: 'top-secret',
secret_key: 'more secret'
}))

for (const line of clevercloudConf) {
clevercloudWriter.write(line + '\r\n')
}
Loading