1. Packages
  2. UpCloud
  3. API Docs
  4. ManagedObjectStorageCustomDomain
UpCloud v0.2.0 published on Wednesday, Apr 16, 2025 by UpCloudLtd

upcloud.ManagedObjectStorageCustomDomain

Explore with Pulumi AI

This resource represents an UpCloud Managed Object Storage custom domain. Note that DNS settings for the custom domain should be configured before creating this resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as upcloud from "@pulumi/upcloud";
import * as upcloud from "@upcloud/pulumi-upcloud";

const thisManagedObjectStorage = new upcloud.ManagedObjectStorage("this", {
    name: "object-storage-custom-domain-example",
    region: "europe-1",
    configuredStatus: "started",
    networks: [{
        family: "IPv4",
        name: "public",
        type: "public",
    }],
});
const _this = upcloud.getLoadBalancerDnsChallengeDomain({});
// Before creating the custom domain, configure the DNS settings for your custom domain. For example, if your custom domain is objects.example.com, you should configure the following DNS records:
// - "_acme-challenge.objects IN CNAME ${data.upcloud_load_balancer_dns_challenge_domain.this.domain}"
// - "objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
// - "*.objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
const thisManagedObjectStorageCustomDomain = new upcloud.ManagedObjectStorageCustomDomain("this", {
    serviceUuid: thisManagedObjectStorage.id,
    domainName: "objects.example.com",
});
Copy
import pulumi
import pulumi_upcloud as upcloud

this_managed_object_storage = upcloud.ManagedObjectStorage("this",
    name="object-storage-custom-domain-example",
    region="europe-1",
    configured_status="started",
    networks=[{
        "family": "IPv4",
        "name": "public",
        "type": "public",
    }])
this = upcloud.get_load_balancer_dns_challenge_domain()
# Before creating the custom domain, configure the DNS settings for your custom domain. For example, if your custom domain is objects.example.com, you should configure the following DNS records:
# - "_acme-challenge.objects IN CNAME ${data.upcloud_load_balancer_dns_challenge_domain.this.domain}"
# - "objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
# - "*.objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
this_managed_object_storage_custom_domain = upcloud.ManagedObjectStorageCustomDomain("this",
    service_uuid=this_managed_object_storage.id,
    domain_name="objects.example.com")
Copy
package main

import (
	"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		thisManagedObjectStorage, err := upcloud.NewManagedObjectStorage(ctx, "this", &upcloud.ManagedObjectStorageArgs{
			Name:             pulumi.String("object-storage-custom-domain-example"),
			Region:           pulumi.String("europe-1"),
			ConfiguredStatus: pulumi.String("started"),
			Networks: upcloud.ManagedObjectStorageNetworkArray{
				&upcloud.ManagedObjectStorageNetworkArgs{
					Family: pulumi.String("IPv4"),
					Name:   pulumi.String("public"),
					Type:   pulumi.String("public"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = upcloud.GetLoadBalancerDnsChallengeDomain(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		// Before creating the custom domain, configure the DNS settings for your custom domain. For example, if your custom domain is objects.example.com, you should configure the following DNS records:
		// - "_acme-challenge.objects IN CNAME ${data.upcloud_load_balancer_dns_challenge_domain.this.domain}"
		// - "objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
		// - "*.objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
		_, err = upcloud.NewManagedObjectStorageCustomDomain(ctx, "this", &upcloud.ManagedObjectStorageCustomDomainArgs{
			ServiceUuid: thisManagedObjectStorage.ID(),
			DomainName:  pulumi.String("objects.example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using UpCloud = Pulumi.UpCloud;
using UpCloud = UpCloud.Pulumi.UpCloud;

return await Deployment.RunAsync(() => 
{
    var thisManagedObjectStorage = new UpCloud.ManagedObjectStorage("this", new()
    {
        Name = "object-storage-custom-domain-example",
        Region = "europe-1",
        ConfiguredStatus = "started",
        Networks = new[]
        {
            new UpCloud.Inputs.ManagedObjectStorageNetworkArgs
            {
                Family = "IPv4",
                Name = "public",
                Type = "public",
            },
        },
    });

    var @this = UpCloud.GetLoadBalancerDnsChallengeDomain.Invoke();

    // Before creating the custom domain, configure the DNS settings for your custom domain. For example, if your custom domain is objects.example.com, you should configure the following DNS records:
    // - "_acme-challenge.objects IN CNAME ${data.upcloud_load_balancer_dns_challenge_domain.this.domain}"
    // - "objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
    // - "*.objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
    var thisManagedObjectStorageCustomDomain = new UpCloud.ManagedObjectStorageCustomDomain("this", new()
    {
        ServiceUuid = thisManagedObjectStorage.Id,
        DomainName = "objects.example.com",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.upcloud.ManagedObjectStorage;
import com.pulumi.upcloud.ManagedObjectStorageArgs;
import com.pulumi.upcloud.inputs.ManagedObjectStorageNetworkArgs;
import com.pulumi.upcloud.UpcloudFunctions;
import com.pulumi.upcloud.ManagedObjectStorageCustomDomain;
import com.pulumi.upcloud.ManagedObjectStorageCustomDomainArgs;
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 thisManagedObjectStorage = new ManagedObjectStorage("thisManagedObjectStorage", ManagedObjectStorageArgs.builder()
            .name("object-storage-custom-domain-example")
            .region("europe-1")
            .configuredStatus("started")
            .networks(ManagedObjectStorageNetworkArgs.builder()
                .family("IPv4")
                .name("public")
                .type("public")
                .build())
            .build());

        final var this = UpcloudFunctions.getLoadBalancerDnsChallengeDomain(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);

        // Before creating the custom domain, configure the DNS settings for your custom domain. For example, if your custom domain is objects.example.com, you should configure the following DNS records:
        // - "_acme-challenge.objects IN CNAME ${data.upcloud_load_balancer_dns_challenge_domain.this.domain}"
        // - "objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
        // - "*.objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
        var thisManagedObjectStorageCustomDomain = new ManagedObjectStorageCustomDomain("thisManagedObjectStorageCustomDomain", ManagedObjectStorageCustomDomainArgs.builder()
            .serviceUuid(thisManagedObjectStorage.id())
            .domainName("objects.example.com")
            .build());

    }
}
Copy
resources:
  thisManagedObjectStorage:
    type: upcloud:ManagedObjectStorage
    name: this
    properties:
      name: object-storage-custom-domain-example
      region: europe-1
      configuredStatus: started
      networks:
        - family: IPv4
          name: public
          type: public
  # Before creating the custom domain, configure the DNS settings for your custom domain. For example, if your custom domain is objects.example.com, you should configure the following DNS records:
  # // - "_acme-challenge.objects IN CNAME ${data.upcloud_load_balancer_dns_challenge_domain.this.domain}"
  # // - "objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
  # // - "*.objects IN CNAME ${[for i in upcloud_managed_object_storage.this.endpoint: i.domain_name if i.type == "public"][0]}"
  thisManagedObjectStorageCustomDomain:
    type: upcloud:ManagedObjectStorageCustomDomain
    name: this
    properties:
      serviceUuid: ${thisManagedObjectStorage.id}
      domainName: objects.example.com
variables:
  this:
    fn::invoke:
      function: upcloud:getLoadBalancerDnsChallengeDomain
      arguments: {}
Copy

Create ManagedObjectStorageCustomDomain Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ManagedObjectStorageCustomDomain(name: string, args: ManagedObjectStorageCustomDomainArgs, opts?: CustomResourceOptions);
@overload
def ManagedObjectStorageCustomDomain(resource_name: str,
                                     args: ManagedObjectStorageCustomDomainArgs,
                                     opts: Optional[ResourceOptions] = None)

@overload
def ManagedObjectStorageCustomDomain(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     domain_name: Optional[str] = None,
                                     service_uuid: Optional[str] = None,
                                     type: Optional[str] = None)
func NewManagedObjectStorageCustomDomain(ctx *Context, name string, args ManagedObjectStorageCustomDomainArgs, opts ...ResourceOption) (*ManagedObjectStorageCustomDomain, error)
public ManagedObjectStorageCustomDomain(string name, ManagedObjectStorageCustomDomainArgs args, CustomResourceOptions? opts = null)
public ManagedObjectStorageCustomDomain(String name, ManagedObjectStorageCustomDomainArgs args)
public ManagedObjectStorageCustomDomain(String name, ManagedObjectStorageCustomDomainArgs args, CustomResourceOptions options)
type: upcloud:ManagedObjectStorageCustomDomain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ManagedObjectStorageCustomDomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ManagedObjectStorageCustomDomainArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedObjectStorageCustomDomainArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedObjectStorageCustomDomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ManagedObjectStorageCustomDomainArgs
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 managedObjectStorageCustomDomainResource = new UpCloud.ManagedObjectStorageCustomDomain("managedObjectStorageCustomDomainResource", new()
{
    DomainName = "string",
    ServiceUuid = "string",
    Type = "string",
});
Copy
example, err := upcloud.NewManagedObjectStorageCustomDomain(ctx, "managedObjectStorageCustomDomainResource", &upcloud.ManagedObjectStorageCustomDomainArgs{
	DomainName:  pulumi.String("string"),
	ServiceUuid: pulumi.String("string"),
	Type:        pulumi.String("string"),
})
Copy
var managedObjectStorageCustomDomainResource = new ManagedObjectStorageCustomDomain("managedObjectStorageCustomDomainResource", ManagedObjectStorageCustomDomainArgs.builder()
    .domainName("string")
    .serviceUuid("string")
    .type("string")
    .build());
Copy
managed_object_storage_custom_domain_resource = upcloud.ManagedObjectStorageCustomDomain("managedObjectStorageCustomDomainResource",
    domain_name="string",
    service_uuid="string",
    type="string")
Copy
const managedObjectStorageCustomDomainResource = new upcloud.ManagedObjectStorageCustomDomain("managedObjectStorageCustomDomainResource", {
    domainName: "string",
    serviceUuid: "string",
    type: "string",
});
Copy
type: upcloud:ManagedObjectStorageCustomDomain
properties:
    domainName: string
    serviceUuid: string
    type: string
Copy

ManagedObjectStorageCustomDomain 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 ManagedObjectStorageCustomDomain resource accepts the following input properties:

DomainName This property is required. string
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
ServiceUuid This property is required. string
Managed Object Storage service UUID.
Type string
At the moment only public is accepted.
DomainName This property is required. string
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
ServiceUuid This property is required. string
Managed Object Storage service UUID.
Type string
At the moment only public is accepted.
domainName This property is required. String
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
serviceUuid This property is required. String
Managed Object Storage service UUID.
type String
At the moment only public is accepted.
domainName This property is required. string
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
serviceUuid This property is required. string
Managed Object Storage service UUID.
type string
At the moment only public is accepted.
domain_name This property is required. str
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
service_uuid This property is required. str
Managed Object Storage service UUID.
type str
At the moment only public is accepted.
domainName This property is required. String
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
serviceUuid This property is required. String
Managed Object Storage service UUID.
type String
At the moment only public is accepted.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ManagedObjectStorageCustomDomain Resource

Get an existing ManagedObjectStorageCustomDomain 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?: ManagedObjectStorageCustomDomainState, opts?: CustomResourceOptions): ManagedObjectStorageCustomDomain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        domain_name: Optional[str] = None,
        service_uuid: Optional[str] = None,
        type: Optional[str] = None) -> ManagedObjectStorageCustomDomain
func GetManagedObjectStorageCustomDomain(ctx *Context, name string, id IDInput, state *ManagedObjectStorageCustomDomainState, opts ...ResourceOption) (*ManagedObjectStorageCustomDomain, error)
public static ManagedObjectStorageCustomDomain Get(string name, Input<string> id, ManagedObjectStorageCustomDomainState? state, CustomResourceOptions? opts = null)
public static ManagedObjectStorageCustomDomain get(String name, Output<String> id, ManagedObjectStorageCustomDomainState state, CustomResourceOptions options)
resources:  _:    type: upcloud:ManagedObjectStorageCustomDomain    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DomainName string
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
ServiceUuid string
Managed Object Storage service UUID.
Type string
At the moment only public is accepted.
DomainName string
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
ServiceUuid string
Managed Object Storage service UUID.
Type string
At the moment only public is accepted.
domainName String
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
serviceUuid String
Managed Object Storage service UUID.
type String
At the moment only public is accepted.
domainName string
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
serviceUuid string
Managed Object Storage service UUID.
type string
At the moment only public is accepted.
domain_name str
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
service_uuid str
Managed Object Storage service UUID.
type str
At the moment only public is accepted.
domainName String
Must be a subdomain and consist of 3 to 5 parts such as objects.example.com. Cannot be root-level domain e.g. example.com.
serviceUuid String
Managed Object Storage service UUID.
type String
At the moment only public is accepted.

Package Details

Repository
upcloud UpCloudLtd/pulumi-upcloud
License
Apache-2.0
Notes
This Pulumi package is based on the upcloud Terraform Provider.