1. Packages
  2. Civo
  3. API Docs
  4. ObjectStoreCredential
Civo v2.3.13 published on Friday, Jan 19, 2024 by Pulumi

civo.ObjectStoreCredential

Explore with Pulumi AI

civo logo
Civo v2.3.13 published on Friday, Jan 19, 2024 by Pulumi

    Provides an Object Store Credential resource. This can be used to create, modify, and delete object stores credential.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Civo = Pulumi.Civo;
    
    return await Deployment.RunAsync(() => 
    {
        var backupObjectStoreCredential = Civo.GetObjectStoreCredential.Invoke(new()
        {
            Name = "backup-server",
        });
    
        // Create a credential for the object store with a specific access key and secret key
        var backupIndex_objectStoreCredentialObjectStoreCredential = new Civo.ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", new()
        {
            AccessKeyId = "my-access-key",
            SecretAccessKey = "my-secret-key",
        });
    
        // Use the credential to create a bucket
        var backupObjectStore = new Civo.ObjectStore("backupObjectStore", new()
        {
            MaxSizeGb = 500,
            Region = "LON1",
            AccessKeyId = backupIndex / objectStoreCredentialObjectStoreCredential.AccessKeyId,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-civo/sdk/v2/go/civo"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := civo.LookupObjectStoreCredential(ctx, &civo.LookupObjectStoreCredentialArgs{
    			Name: pulumi.StringRef("backup-server"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = civo.NewObjectStoreCredential(ctx, "backupIndex/objectStoreCredentialObjectStoreCredential", &civo.ObjectStoreCredentialArgs{
    			AccessKeyId:     pulumi.String("my-access-key"),
    			SecretAccessKey: pulumi.String("my-secret-key"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = civo.NewObjectStore(ctx, "backupObjectStore", &civo.ObjectStoreArgs{
    			MaxSizeGb:   pulumi.Int(500),
    			Region:      pulumi.String("LON1"),
    			AccessKeyId: backupIndex / objectStoreCredentialObjectStoreCredential.AccessKeyId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.civo.CivoFunctions;
    import com.pulumi.civo.inputs.GetObjectStoreCredentialArgs;
    import com.pulumi.civo.ObjectStoreCredential;
    import com.pulumi.civo.ObjectStoreCredentialArgs;
    import com.pulumi.civo.ObjectStore;
    import com.pulumi.civo.ObjectStoreArgs;
    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) {
            final var backupObjectStoreCredential = CivoFunctions.getObjectStoreCredential(GetObjectStoreCredentialArgs.builder()
                .name("backup-server")
                .build());
    
            var backupIndex_objectStoreCredentialObjectStoreCredential = new ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", ObjectStoreCredentialArgs.builder()        
                .accessKeyId("my-access-key")
                .secretAccessKey("my-secret-key")
                .build());
    
            var backupObjectStore = new ObjectStore("backupObjectStore", ObjectStoreArgs.builder()        
                .maxSizeGb(500)
                .region("LON1")
                .accessKeyId(backupIndex / objectStoreCredentialObjectStoreCredential.accessKeyId())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_civo as civo
    
    backup_object_store_credential = civo.get_object_store_credential(name="backup-server")
    # Create a credential for the object store with a specific access key and secret key
    backup_index_object_store_credential_object_store_credential = civo.ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential",
        access_key_id="my-access-key",
        secret_access_key="my-secret-key")
    # Use the credential to create a bucket
    backup_object_store = civo.ObjectStore("backupObjectStore",
        max_size_gb=500,
        region="LON1",
        access_key_id=backup_index / object_store_credential_object_store_credential["accessKeyId"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as civo from "@pulumi/civo";
    
    const backupObjectStoreCredential = civo.getObjectStoreCredential({
        name: "backup-server",
    });
    // Create a credential for the object store with a specific access key and secret key
    const backupIndex_objectStoreCredentialObjectStoreCredential = new civo.ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", {
        accessKeyId: "my-access-key",
        secretAccessKey: "my-secret-key",
    });
    // Use the credential to create a bucket
    const backupObjectStore = new civo.ObjectStore("backupObjectStore", {
        maxSizeGb: 500,
        region: "LON1",
        accessKeyId: backupIndex / objectStoreCredentialObjectStoreCredential.accessKeyId,
    });
    

    Coming soon!

    Create ObjectStoreCredential Resource

    new ObjectStoreCredential(name: string, args?: ObjectStoreCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def ObjectStoreCredential(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              access_key_id: Optional[str] = None,
                              name: Optional[str] = None,
                              region: Optional[str] = None,
                              secret_access_key: Optional[str] = None)
    @overload
    def ObjectStoreCredential(resource_name: str,
                              args: Optional[ObjectStoreCredentialArgs] = None,
                              opts: Optional[ResourceOptions] = None)
    func NewObjectStoreCredential(ctx *Context, name string, args *ObjectStoreCredentialArgs, opts ...ResourceOption) (*ObjectStoreCredential, error)
    public ObjectStoreCredential(string name, ObjectStoreCredentialArgs? args = null, CustomResourceOptions? opts = null)
    public ObjectStoreCredential(String name, ObjectStoreCredentialArgs args)
    public ObjectStoreCredential(String name, ObjectStoreCredentialArgs args, CustomResourceOptions options)
    
    type: civo:ObjectStoreCredential
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ObjectStoreCredentialArgs
    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 ObjectStoreCredentialArgs
    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 ObjectStoreCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ObjectStoreCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ObjectStoreCredentialArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ObjectStoreCredential Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ObjectStoreCredential resource accepts the following input properties:

    AccessKeyId string
    The access key id of the Object Store Credential. It is generated by the provider.
    Name string
    The name of the Object Store Credential. Must be unique.
    Region string
    The region where the Object Store Credential will be created.
    SecretAccessKey string
    The secret access key of the Object Store Credential. It is generated by the provider.
    AccessKeyId string
    The access key id of the Object Store Credential. It is generated by the provider.
    Name string
    The name of the Object Store Credential. Must be unique.
    Region string
    The region where the Object Store Credential will be created.
    SecretAccessKey string
    The secret access key of the Object Store Credential. It is generated by the provider.
    accessKeyId String
    The access key id of the Object Store Credential. It is generated by the provider.
    name String
    The name of the Object Store Credential. Must be unique.
    region String
    The region where the Object Store Credential will be created.
    secretAccessKey String
    The secret access key of the Object Store Credential. It is generated by the provider.
    accessKeyId string
    The access key id of the Object Store Credential. It is generated by the provider.
    name string
    The name of the Object Store Credential. Must be unique.
    region string
    The region where the Object Store Credential will be created.
    secretAccessKey string
    The secret access key of the Object Store Credential. It is generated by the provider.
    access_key_id str
    The access key id of the Object Store Credential. It is generated by the provider.
    name str
    The name of the Object Store Credential. Must be unique.
    region str
    The region where the Object Store Credential will be created.
    secret_access_key str
    The secret access key of the Object Store Credential. It is generated by the provider.
    accessKeyId String
    The access key id of the Object Store Credential. It is generated by the provider.
    name String
    The name of the Object Store Credential. Must be unique.
    region String
    The region where the Object Store Credential will be created.
    secretAccessKey String
    The secret access key of the Object Store Credential. It is generated by the provider.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ObjectStoreCredential resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Object Store Credential.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Object Store Credential.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Object Store Credential.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the Object Store Credential.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the Object Store Credential.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Object Store Credential.

    Look up Existing ObjectStoreCredential Resource

    Get an existing ObjectStoreCredential 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?: ObjectStoreCredentialState, opts?: CustomResourceOptions): ObjectStoreCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_key_id: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            secret_access_key: Optional[str] = None,
            status: Optional[str] = None) -> ObjectStoreCredential
    func GetObjectStoreCredential(ctx *Context, name string, id IDInput, state *ObjectStoreCredentialState, opts ...ResourceOption) (*ObjectStoreCredential, error)
    public static ObjectStoreCredential Get(string name, Input<string> id, ObjectStoreCredentialState? state, CustomResourceOptions? opts = null)
    public static ObjectStoreCredential get(String name, Output<String> id, ObjectStoreCredentialState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AccessKeyId string
    The access key id of the Object Store Credential. It is generated by the provider.
    Name string
    The name of the Object Store Credential. Must be unique.
    Region string
    The region where the Object Store Credential will be created.
    SecretAccessKey string
    The secret access key of the Object Store Credential. It is generated by the provider.
    Status string
    The status of the Object Store Credential.
    AccessKeyId string
    The access key id of the Object Store Credential. It is generated by the provider.
    Name string
    The name of the Object Store Credential. Must be unique.
    Region string
    The region where the Object Store Credential will be created.
    SecretAccessKey string
    The secret access key of the Object Store Credential. It is generated by the provider.
    Status string
    The status of the Object Store Credential.
    accessKeyId String
    The access key id of the Object Store Credential. It is generated by the provider.
    name String
    The name of the Object Store Credential. Must be unique.
    region String
    The region where the Object Store Credential will be created.
    secretAccessKey String
    The secret access key of the Object Store Credential. It is generated by the provider.
    status String
    The status of the Object Store Credential.
    accessKeyId string
    The access key id of the Object Store Credential. It is generated by the provider.
    name string
    The name of the Object Store Credential. Must be unique.
    region string
    The region where the Object Store Credential will be created.
    secretAccessKey string
    The secret access key of the Object Store Credential. It is generated by the provider.
    status string
    The status of the Object Store Credential.
    access_key_id str
    The access key id of the Object Store Credential. It is generated by the provider.
    name str
    The name of the Object Store Credential. Must be unique.
    region str
    The region where the Object Store Credential will be created.
    secret_access_key str
    The secret access key of the Object Store Credential. It is generated by the provider.
    status str
    The status of the Object Store Credential.
    accessKeyId String
    The access key id of the Object Store Credential. It is generated by the provider.
    name String
    The name of the Object Store Credential. Must be unique.
    region String
    The region where the Object Store Credential will be created.
    secretAccessKey String
    The secret access key of the Object Store Credential. It is generated by the provider.
    status String
    The status of the Object Store Credential.

    Import

    using ID

     $ pulumi import civo:index/objectStoreCredential:ObjectStoreCredential custom_object b8ecd2ab-2267-4a5e-8692-cbf1d32583e3
    

    Package Details

    Repository
    Civo pulumi/pulumi-civo
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the civo Terraform Provider.
    civo logo
    Civo v2.3.13 published on Friday, Jan 19, 2024 by Pulumi