civo.ObjectStoreCredential
Explore with Pulumi AI
Provides an Object Store Credential resource. This can be used to create, modify, and delete object stores credential.
Example Usage
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,
});
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"])
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 {
_, err := civo.LookupObjectStoreCredential(ctx, &civo.LookupObjectStoreCredentialArgs{
Name: pulumi.StringRef("backup-server"),
}, nil)
if err != nil {
return err
}
// Create a credential for the object store with a specific access key and secret key
_, 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
}
// Use the credential to create a bucket
_, err = civo.NewObjectStore(ctx, "backupObjectStore", &civo.ObjectStoreArgs{
MaxSizeGb: pulumi.Float64(500),
Region: pulumi.String("LON1"),
AccessKeyId: pulumi.String(backupIndex / objectStoreCredentialObjectStoreCredential.AccessKeyId),
})
if err != nil {
return err
}
return nil
})
}
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 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());
// Create a credential for the object store with a specific access key and secret key
var backupIndex_objectStoreCredentialObjectStoreCredential = new ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", ObjectStoreCredentialArgs.builder()
.accessKeyId("my-access-key")
.secretAccessKey("my-secret-key")
.build());
// Use the credential to create a bucket
var backupObjectStore = new ObjectStore("backupObjectStore", ObjectStoreArgs.builder()
.maxSizeGb(500)
.region("LON1")
.accessKeyId(backupIndex / objectStoreCredentialObjectStoreCredential.accessKeyId())
.build());
}
}
Coming soon!
Create ObjectStoreCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ObjectStoreCredential(name: string, args?: ObjectStoreCredentialArgs, opts?: CustomResourceOptions);
@overload
def ObjectStoreCredential(resource_name: str,
args: Optional[ObjectStoreCredentialArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ObjectStoreCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_key_id: Optional[str] = None,
name: Optional[str] = None,
object_store_credential_id: Optional[str] = None,
region: Optional[str] = None,
secret_access_key: Optional[str] = None,
timeouts: Optional[ObjectStoreCredentialTimeoutsArgs] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var objectStoreCredentialResource = new Civo.ObjectStoreCredential("objectStoreCredentialResource", new()
{
AccessKeyId = "string",
Name = "string",
ObjectStoreCredentialId = "string",
Region = "string",
SecretAccessKey = "string",
Timeouts = new Civo.Inputs.ObjectStoreCredentialTimeoutsArgs
{
Create = "string",
},
});
example, err := civo.NewObjectStoreCredential(ctx, "objectStoreCredentialResource", &civo.ObjectStoreCredentialArgs{
AccessKeyId: pulumi.String("string"),
Name: pulumi.String("string"),
ObjectStoreCredentialId: pulumi.String("string"),
Region: pulumi.String("string"),
SecretAccessKey: pulumi.String("string"),
Timeouts: &.ObjectStoreCredentialTimeoutsArgs{
Create: pulumi.String("string"),
},
})
var objectStoreCredentialResource = new ObjectStoreCredential("objectStoreCredentialResource", ObjectStoreCredentialArgs.builder()
.accessKeyId("string")
.name("string")
.objectStoreCredentialId("string")
.region("string")
.secretAccessKey("string")
.timeouts(ObjectStoreCredentialTimeoutsArgs.builder()
.create("string")
.build())
.build());
object_store_credential_resource = civo.ObjectStoreCredential("objectStoreCredentialResource",
access_key_id="string",
name="string",
object_store_credential_id="string",
region="string",
secret_access_key="string",
timeouts={
"create": "string",
})
const objectStoreCredentialResource = new civo.ObjectStoreCredential("objectStoreCredentialResource", {
accessKeyId: "string",
name: "string",
objectStoreCredentialId: "string",
region: "string",
secretAccessKey: "string",
timeouts: {
create: "string",
},
});
type: civo:ObjectStoreCredential
properties:
accessKeyId: string
name: string
objectStoreCredentialId: string
region: string
secretAccessKey: string
timeouts:
create: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ObjectStoreCredential resource accepts the following input properties:
- Access
Key stringId - 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.
- Object
Store stringCredential Id - The ID of this resource.
- Region string
- The region where the Object Store Credential will be created.
- Secret
Access stringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- Timeouts
Object
Store Credential Timeouts
- Access
Key stringId - 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.
- Object
Store stringCredential Id - The ID of this resource.
- Region string
- The region where the Object Store Credential will be created.
- Secret
Access stringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- Timeouts
Object
Store Credential Timeouts Args
- access
Key StringId - 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.
- object
Store StringCredential Id - The ID of this resource.
- region String
- The region where the Object Store Credential will be created.
- secret
Access StringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- timeouts
Object
Store Credential Timeouts
- access
Key stringId - 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.
- object
Store stringCredential Id - The ID of this resource.
- region string
- The region where the Object Store Credential will be created.
- secret
Access stringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- timeouts
Object
Store Credential Timeouts
- access_
key_ strid - 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.
- object_
store_ strcredential_ id - The ID of this resource.
- region str
- The region where the Object Store Credential will be created.
- secret_
access_ strkey - The secret access key of the Object Store Credential. It is generated by the provider.
- timeouts
Object
Store Credential Timeouts Args
- access
Key StringId - 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.
- object
Store StringCredential Id - The ID of this resource.
- region String
- The region where the Object Store Credential will be created.
- secret
Access StringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ObjectStoreCredential resource produces the following output properties:
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,
object_store_credential_id: Optional[str] = None,
region: Optional[str] = None,
secret_access_key: Optional[str] = None,
status: Optional[str] = None,
timeouts: Optional[ObjectStoreCredentialTimeoutsArgs] = 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)
resources: _: type: civo:ObjectStoreCredential 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.
- Access
Key stringId - 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.
- Object
Store stringCredential Id - The ID of this resource.
- Region string
- The region where the Object Store Credential will be created.
- Secret
Access stringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- Status string
- The status of the Object Store Credential.
- Timeouts
Object
Store Credential Timeouts
- Access
Key stringId - 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.
- Object
Store stringCredential Id - The ID of this resource.
- Region string
- The region where the Object Store Credential will be created.
- Secret
Access stringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- Status string
- The status of the Object Store Credential.
- Timeouts
Object
Store Credential Timeouts Args
- access
Key StringId - 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.
- object
Store StringCredential Id - The ID of this resource.
- region String
- The region where the Object Store Credential will be created.
- secret
Access StringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- status String
- The status of the Object Store Credential.
- timeouts
Object
Store Credential Timeouts
- access
Key stringId - 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.
- object
Store stringCredential Id - The ID of this resource.
- region string
- The region where the Object Store Credential will be created.
- secret
Access stringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- status string
- The status of the Object Store Credential.
- timeouts
Object
Store Credential Timeouts
- access_
key_ strid - 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.
- object_
store_ strcredential_ id - The ID of this resource.
- region str
- The region where the Object Store Credential will be created.
- secret_
access_ strkey - The secret access key of the Object Store Credential. It is generated by the provider.
- status str
- The status of the Object Store Credential.
- timeouts
Object
Store Credential Timeouts Args
- access
Key StringId - 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.
- object
Store StringCredential Id - The ID of this resource.
- region String
- The region where the Object Store Credential will be created.
- secret
Access StringKey - The secret access key of the Object Store Credential. It is generated by the provider.
- status String
- The status of the Object Store Credential.
- timeouts Property Map
Supporting Types
ObjectStoreCredentialTimeouts, ObjectStoreCredentialTimeoutsArgs
- Create string
- Create string
- create String
- create string
- create str
- create String
Import
using ID
$ pulumi import civo:index/objectStoreCredential:ObjectStoreCredential 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
civo
Terraform Provider.