civo.ObjectStore
Provides an Object Store resource. This can be used to create, modify, and delete object stores.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";
const backupObjectStore = new civo.ObjectStore("backupObjectStore", {
    maxSizeGb: 500,
    region: "LON1",
});
const backupObjectStoreCredential = civo.getObjectStoreCredentialOutput({
    id: backupObjectStore.accessKeyId,
});
import pulumi
import pulumi_civo as civo
backup_object_store = civo.ObjectStore("backupObjectStore",
    max_size_gb=500,
    region="LON1")
backup_object_store_credential = civo.get_object_store_credential_output(id=backup_object_store.access_key_id)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/civo/civo"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		backupObjectStore, err := civo.NewObjectStore(ctx, "backupObjectStore", &civo.ObjectStoreArgs{
			MaxSizeGb: pulumi.Float64(500),
			Region:    pulumi.String("LON1"),
		})
		if err != nil {
			return err
		}
		_ = civo.LookupObjectStoreCredentialOutput(ctx, civo.GetObjectStoreCredentialOutputArgs{
			Id: backupObjectStore.AccessKeyId,
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Civo = Pulumi.Civo;
return await Deployment.RunAsync(() => 
{
    var backupObjectStore = new Civo.ObjectStore("backupObjectStore", new()
    {
        MaxSizeGb = 500,
        Region = "LON1",
    });
    var backupObjectStoreCredential = Civo.GetObjectStoreCredential.Invoke(new()
    {
        Id = backupObjectStore.AccessKeyId,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.civo.ObjectStore;
import com.pulumi.civo.ObjectStoreArgs;
import com.pulumi.civo.CivoFunctions;
import com.pulumi.civo.inputs.GetObjectStoreCredentialArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var backupObjectStore = new ObjectStore("backupObjectStore", ObjectStoreArgs.builder()
            .maxSizeGb(500)
            .region("LON1")
            .build());
        final var backupObjectStoreCredential = CivoFunctions.getObjectStoreCredential(GetObjectStoreCredentialArgs.builder()
            .id(backupObjectStore.accessKeyId())
            .build());
    }
}
resources:
  backupObjectStore:
    type: civo:ObjectStore
    properties:
      maxSizeGb: 500
      region: LON1
variables:
  backupObjectStoreCredential:
    fn::invoke:
      function: civo:getObjectStoreCredential
      arguments:
        id: ${backupObjectStore.accessKeyId}
Create ObjectStore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ObjectStore(name: string, args?: ObjectStoreArgs, opts?: CustomResourceOptions);@overload
def ObjectStore(resource_name: str,
                args: Optional[ObjectStoreArgs] = None,
                opts: Optional[ResourceOptions] = None)
@overload
def ObjectStore(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                access_key_id: Optional[str] = None,
                max_size_gb: Optional[float] = None,
                name: Optional[str] = None,
                object_store_id: Optional[str] = None,
                region: Optional[str] = None,
                timeouts: Optional[ObjectStoreTimeoutsArgs] = None)func NewObjectStore(ctx *Context, name string, args *ObjectStoreArgs, opts ...ResourceOption) (*ObjectStore, error)public ObjectStore(string name, ObjectStoreArgs? args = null, CustomResourceOptions? opts = null)
public ObjectStore(String name, ObjectStoreArgs args)
public ObjectStore(String name, ObjectStoreArgs args, CustomResourceOptions options)
type: civo:ObjectStore
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ObjectStoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ObjectStoreArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ObjectStoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ObjectStoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ObjectStoreArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var objectStoreResource = new Civo.ObjectStore("objectStoreResource", new()
{
    AccessKeyId = "string",
    MaxSizeGb = 0,
    Name = "string",
    ObjectStoreId = "string",
    Region = "string",
    Timeouts = new Civo.Inputs.ObjectStoreTimeoutsArgs
    {
        Create = "string",
    },
});
example, err := civo.NewObjectStore(ctx, "objectStoreResource", &civo.ObjectStoreArgs{
	AccessKeyId:   pulumi.String("string"),
	MaxSizeGb:     pulumi.Float64(0),
	Name:          pulumi.String("string"),
	ObjectStoreId: pulumi.String("string"),
	Region:        pulumi.String("string"),
	Timeouts: &civo.ObjectStoreTimeoutsArgs{
		Create: pulumi.String("string"),
	},
})
var objectStoreResource = new ObjectStore("objectStoreResource", ObjectStoreArgs.builder()
    .accessKeyId("string")
    .maxSizeGb(0.0)
    .name("string")
    .objectStoreId("string")
    .region("string")
    .timeouts(ObjectStoreTimeoutsArgs.builder()
        .create("string")
        .build())
    .build());
object_store_resource = civo.ObjectStore("objectStoreResource",
    access_key_id="string",
    max_size_gb=0,
    name="string",
    object_store_id="string",
    region="string",
    timeouts={
        "create": "string",
    })
const objectStoreResource = new civo.ObjectStore("objectStoreResource", {
    accessKeyId: "string",
    maxSizeGb: 0,
    name: "string",
    objectStoreId: "string",
    region: "string",
    timeouts: {
        create: "string",
    },
});
type: civo:ObjectStore
properties:
    accessKeyId: string
    maxSizeGb: 0
    name: string
    objectStoreId: string
    region: string
    timeouts:
        create: string
ObjectStore Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ObjectStore resource accepts the following input properties:
- AccessKey stringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- MaxSize doubleGb 
- The maximum size of the Object Store. Default is 500GB.
- Name string
- The name of the Object Store. Must be unique.
- ObjectStore stringId 
- The ID of this resource.
- Region string
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- Timeouts
ObjectStore Timeouts 
- AccessKey stringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- MaxSize float64Gb 
- The maximum size of the Object Store. Default is 500GB.
- Name string
- The name of the Object Store. Must be unique.
- ObjectStore stringId 
- The ID of this resource.
- Region string
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- Timeouts
ObjectStore Timeouts Args 
- accessKey StringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- maxSize DoubleGb 
- The maximum size of the Object Store. Default is 500GB.
- name String
- The name of the Object Store. Must be unique.
- objectStore StringId 
- The ID of this resource.
- region String
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- timeouts
ObjectStore Timeouts 
- accessKey stringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- maxSize numberGb 
- The maximum size of the Object Store. Default is 500GB.
- name string
- The name of the Object Store. Must be unique.
- objectStore stringId 
- The ID of this resource.
- region string
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- timeouts
ObjectStore Timeouts 
- access_key_ strid 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- max_size_ floatgb 
- The maximum size of the Object Store. Default is 500GB.
- name str
- The name of the Object Store. Must be unique.
- object_store_ strid 
- The ID of this resource.
- region str
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- timeouts
ObjectStore Timeouts Args 
- accessKey StringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- maxSize NumberGb 
- The maximum size of the Object Store. Default is 500GB.
- name String
- The name of the Object Store. Must be unique.
- objectStore StringId 
- The ID of this resource.
- region String
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ObjectStore resource produces the following output properties:
- bucket_url str
- The endpoint of the Object Store. It is generated by the provider.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the Object Store.
Look up Existing ObjectStore Resource
Get an existing ObjectStore resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ObjectStoreState, opts?: CustomResourceOptions): ObjectStore@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_key_id: Optional[str] = None,
        bucket_url: Optional[str] = None,
        max_size_gb: Optional[float] = None,
        name: Optional[str] = None,
        object_store_id: Optional[str] = None,
        region: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[ObjectStoreTimeoutsArgs] = None) -> ObjectStorefunc GetObjectStore(ctx *Context, name string, id IDInput, state *ObjectStoreState, opts ...ResourceOption) (*ObjectStore, error)public static ObjectStore Get(string name, Input<string> id, ObjectStoreState? state, CustomResourceOptions? opts = null)public static ObjectStore get(String name, Output<String> id, ObjectStoreState state, CustomResourceOptions options)resources:  _:    type: civo:ObjectStore    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AccessKey stringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- BucketUrl string
- The endpoint of the Object Store. It is generated by the provider.
- MaxSize doubleGb 
- The maximum size of the Object Store. Default is 500GB.
- Name string
- The name of the Object Store. Must be unique.
- ObjectStore stringId 
- The ID of this resource.
- Region string
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- Status string
- The status of the Object Store.
- Timeouts
ObjectStore Timeouts 
- AccessKey stringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- BucketUrl string
- The endpoint of the Object Store. It is generated by the provider.
- MaxSize float64Gb 
- The maximum size of the Object Store. Default is 500GB.
- Name string
- The name of the Object Store. Must be unique.
- ObjectStore stringId 
- The ID of this resource.
- Region string
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- Status string
- The status of the Object Store.
- Timeouts
ObjectStore Timeouts Args 
- accessKey StringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- bucketUrl String
- The endpoint of the Object Store. It is generated by the provider.
- maxSize DoubleGb 
- The maximum size of the Object Store. Default is 500GB.
- name String
- The name of the Object Store. Must be unique.
- objectStore StringId 
- The ID of this resource.
- region String
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- status String
- The status of the Object Store.
- timeouts
ObjectStore Timeouts 
- accessKey stringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- bucketUrl string
- The endpoint of the Object Store. It is generated by the provider.
- maxSize numberGb 
- The maximum size of the Object Store. Default is 500GB.
- name string
- The name of the Object Store. Must be unique.
- objectStore stringId 
- The ID of this resource.
- region string
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- status string
- The status of the Object Store.
- timeouts
ObjectStore Timeouts 
- access_key_ strid 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- bucket_url str
- The endpoint of the Object Store. It is generated by the provider.
- max_size_ floatgb 
- The maximum size of the Object Store. Default is 500GB.
- name str
- The name of the Object Store. Must be unique.
- object_store_ strid 
- The ID of this resource.
- region str
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- status str
- The status of the Object Store.
- timeouts
ObjectStore Timeouts Args 
- accessKey StringId 
- The access key ID from the Object Store credential. If this is not set, a new credential will be created.
- bucketUrl String
- The endpoint of the Object Store. It is generated by the provider.
- maxSize NumberGb 
- The maximum size of the Object Store. Default is 500GB.
- name String
- The name of the Object Store. Must be unique.
- objectStore StringId 
- The ID of this resource.
- region String
- The region for the Object Store, if not declared we use the region as declared in the provider (Defaults to LON1)
- status String
- The status of the Object Store.
- timeouts Property Map
Supporting Types
ObjectStoreTimeouts, ObjectStoreTimeoutsArgs      
- Create string
- Create string
- create String
- create string
- create str
- create String
Import
using ID
$ pulumi import civo:index/objectStore:ObjectStore custom_object b8ecd2ab-2267-4a5e-8692-cbf1d32583e3
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Civo civo/terraform-provider-civo
- License
- Notes
- This Pulumi package is based on the civoTerraform Provider.
