This document describes how to use NHN Cloud Object Storage service as a third-party tool.
Cyberduck is an open-source cloud storage browser.
Download and install the installation file for user’s operating system from the Cyberduck download page .
To connect to object storage, you must create a bookmark that stores connection information. By clicking New Connection button at the top of browser, you can create a new bookmark. Select Openstack Swift (Keystone 2.0) from the drop-down menu, enter the required information, and click the Connect button to create a bookmark.
Item | Description |
---|---|
Alias | It is an alias of bookmark. You can freely set it to any desired value. |
Server | It is an address of Identity. You can check it in the dialog box of API Endpoint Settings from on the Object Storage service page. |
Tenant ID: Access Key | Tenant ID: It is the project ID of the user. You can check it in Project Management > Project Basic information from the web console. |
Access ID: Enter either NHN Cloud member ID (email format) or IAM user ID. | |
Secret Key | On the Object Storage Services page, enter the API password set in the Set API Endpoint dialog box. |
[Note] See Set the API Password in the API guide for information on how to set API passwords.
Double-click the bookmark you want to connect in order to access object storage.
When accessing object storage, a list of containers for All Regions appear in the browser. You can retrieve a list of objects in a container by double-clicking the desired container.
[Note] If there are containers with the same name in different regions, multiple containers with the same name are displayed. Select View > Column > Region from the menu to display regions in the column entry.
You can create a new container by right-clicking an empty space in the container list and selecting New Folder.... After entering the container's name and region, click the Create button to create a container.
[Note] You can refresh the container list by right-clicking an empty space in the list and selecting View Again.
Select a container and click Action > Upload… at the top of the browser, or right-click the object list and click Upload… to select and upload the file.
[Note] If you upload or create a folder with Cyberduck, another 0 byte object with the same folder name is created. The object can be found with the console or object storage API and can be deleted.
Select and right-click an object to download, select Download. You can download the object by dragging and dropping.
[Note] When you download an object, it is saved to your local Downloads folder by default. Right-click it and select Download to Specified Location to download to the specified path. When uploading or downloading an object, the Send window pops up to check the progress.
Select the container to delete and right-click and select Delete to delete it.
[Caution] When deleting containers, all objects in the containers are deleted.
Select the object to delete and right-click and select Delete.
You can synchronize local folders with containers or folders. Select a container or folder and right-click and select Synchronize. Folder synchronization provides three methods of download, upload, and mirror.
Download objects that are changed or added in object storage to your local.
Upload files that are changed or added in your local to object storage.
Compare local and object storage to upload or download changed or missing files or objects.
[Note] For more information on synchronization, see Cyberduck Synchronize Folders.
Terraform is an open source tool that makes it easy to build infrastructure, make changes to it safely, and manage its geometry efficiently. For basic usage, see User Guide > Compute > Instance > Terraform User Guide.
In general, each resource is independent, but it can also have dependencies on certain other resources. Terraform automatically establishes dependencies when a resource's label references information from another resource.
For example, the object1 object
contained in the conatiner1
container might be represented as follows
# Container resource
resource "nhncloud_objectstorage_container_v1" "container_1" {
name = "container1"
}
# Object resource
resource "nhncloud_objectstorage_object_v1" "object_1" {
container_name = nhncloud_objectstorage_container_v1.container_1.name
name = "object1"
source = "/tmp/dummy"
}
[Note] For information on how to specify explicit resource dependencies, see Terraform's Resource dependencies documentation.
# Create a default container
resource "nhncloud_objectstorage_container_v1" "container_1" {
region = "KR1"
name = "tf-test-container-1"
}
# Create an object versioning container
resource "nhncloud_objectstorage_container_v1" "container_2" {
region = "KR1"
name = "tf-test-container-2"
versioning_legacy {
type = "history"
location = resource.nhncloud_objectstorage_container_v1.container_1.name
}
}
# Create a public container
resource "nhncloud_objectstorage_container_v1" "container_3" {
region = "KR1"
name = "tf-test-container-3"
container_read = ".r:*,.rlistings"
}
Name | Type | Required | Description |
---|---|---|---|
region | String | Region to manage NHN Cloud resources | |
name | String | O | Container name |
container_read | String | Sets the role-based access rules for container read | |
container_write | String | Role-based access rules for container writes | |
force_destroy | Boolean | Whether to force container deletion, true or false You can't recover objects that were deleted together. |
|
versioning_legacy | Object | Object Version Control Settings | |
versioning_legacy.type | String | Specify as history |
|
versioning_legacy.location | String | Container name to store the previous version of the object |
# Create the object
resource "nhncloud_objectstorage_object_v1" "object_1" {
region = "KR1"
container_name = nhncloud_objectstorage_container_v1.container_1.name
name = "test/test1.json"
content_type = "application/json"
content = <<JSON
{ "key" : "value
"key" : "value"
}
JSON
}
# Upload a file
resource "nhncloud_objectstorage_object_v1" "object_2" {
region = "KR2"
container_name = nhncloud_objectstorage_container_v1.container_1.name
name = "test/test2.json"
source = "./test2.txt"
}
Name | Type | Required | Description |
---|---|---|---|
name | String | O | Object name |
container_name | String | O | Container name |
source | String | O | The path to the file on the local file system to upload Cannot be used with content , copy_from , or object_manifest .You must specify one of the following: source , content , copy_from , or object_manifest . |
content | String | O | Data content of the object to create Cannot be used with source , copy_from , or object_manifest . |
copy_from | String | O | The original object to copy, {container}/{object} Cannot be used with source , content , or object_manifest . |
object_manifest | String | O | The path where segment objects are uploaded: {Segment-Container}/{Segment-Object}/ Cannot be used with source , content , or copy_from . |
content_disposition | String | Specify the Content-Disposition header |
|
content_encoding | String | Specify the Content-Encoding header |
|
content_type | String | Specify the Content-Type header |
|
delete_after | Integer | Object's expiration time, unix time (seconds) | |
delete_at | String | Object expiration date, Unix time in seconds, RFC3339 formatted string | |
detect_content_type | Boolean | Whether to infer content typeThe content_type is ignored when setting. |
Cyberduck - https://docs.cyberduck.io/cyberduck/ Terraform - https://www.terraform.io/ Terraform Registry - https://registry.terraform.io/