S3 kovası ve erişim anahtarı oluşturma
Nesne Depolama alın, kova ve anahtar oluşturun, herhangi bir S3 istemcisini bağlayın.
1. Depolama sipariş edin#
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/storage \
-H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"plan":"standard-250gb","cycle":"monthly","name":"gyro-proje-s3","confirm":true}'gyro s3 plans
gyro s3 create --plan standard-250gb --cycle monthly --name gyro-proje-s3 --yesresource "gyro_storage" "s3" {
plan = "standard-250gb"
cycle = "monthly"
name = "gyro-proje-s3"
}2. Kova ve anahtar#
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets -H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" -d '{"bucket":"assets"}'
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys -H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" -d '{}' # gizli anahtar bir kez gösterilir
curl -s https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/connect -H "Authorization: Bearer $GYRO_TOKEN" # uç adresi, bölgegyro s3 bucket create 12345 --bucket assets
gyro s3 key create 12345
gyro s3 connect 12345resource "gyro_storage_bucket" "assets" {
service_id = gyro_storage.s3.service_id
name = "assets"
}
resource "gyro_storage_key" "ci" {
service_id = gyro_storage.s3.service_id
label = "ci-uploader"
}Uç adresi https://s3.gyrohosting.com, bölge tr-ist-1; path-style ve virtual-host her ikisi de çalışır. Statik site, CORS ve nesne kilidi uçları Nesne depolama başvurusunda.