published on Wednesday, May 6, 2026 by stackitcloud
published on Wednesday, May 6, 2026 by stackitcloud
Setting up supporting infrastructure
The example below creates the supporting infrastructure using the STACKIT Terraform provider, including the automatic creation of a TLS certificate resource.
Example Usage
variable "project_id" {
description = "The STACKIT Project ID"
type = string
default = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
# Create a RAS key pair
resource "tls_private_key" "example" {
algorithm = "RSA"
rsa_bits = 2048
}
# Create a TLS certificate
resource "tls_self_signed_cert" "example" {
private_key_pem = tls_private_key.example.private_key_pem
subject {
common_name = "localhost"
organization = "STACKIT Test"
}
validity_period_hours = 12
allowed_uses = [
"key_encipherment",
"digital_signature",
"server_auth",
]
}
# Create a ALB certificate
resource "stackit_alb_certificate" "certificate" {
project_id = var.project_id
name = "example-certificate"
private_key = tls_private_key.example.private_key_pem
public_key = tls_self_signed_cert.example.cert_pem
}
Create AlbCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlbCertificate(name: string, args: AlbCertificateArgs, opts?: CustomResourceOptions);@overload
def AlbCertificate(resource_name: str,
args: AlbCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlbCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
private_key: Optional[str] = None,
project_id: Optional[str] = None,
public_key: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewAlbCertificate(ctx *Context, name string, args AlbCertificateArgs, opts ...ResourceOption) (*AlbCertificate, error)public AlbCertificate(string name, AlbCertificateArgs args, CustomResourceOptions? opts = null)
public AlbCertificate(String name, AlbCertificateArgs args)
public AlbCertificate(String name, AlbCertificateArgs args, CustomResourceOptions options)
type: stackit:AlbCertificate
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 AlbCertificateArgs
- 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 AlbCertificateArgs
- 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 AlbCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlbCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlbCertificateArgs
- 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 albCertificateResource = new Stackit.AlbCertificate("albCertificateResource", new()
{
PrivateKey = "string",
ProjectId = "string",
PublicKey = "string",
Name = "string",
Region = "string",
});
example, err := stackit.NewAlbCertificate(ctx, "albCertificateResource", &stackit.AlbCertificateArgs{
PrivateKey: pulumi.String("string"),
ProjectId: pulumi.String("string"),
PublicKey: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var albCertificateResource = new AlbCertificate("albCertificateResource", AlbCertificateArgs.builder()
.privateKey("string")
.projectId("string")
.publicKey("string")
.name("string")
.region("string")
.build());
alb_certificate_resource = stackit.AlbCertificate("albCertificateResource",
private_key="string",
project_id="string",
public_key="string",
name="string",
region="string")
const albCertificateResource = new stackit.AlbCertificate("albCertificateResource", {
privateKey: "string",
projectId: "string",
publicKey: "string",
name: "string",
region: "string",
});
type: stackit:AlbCertificate
properties:
name: string
privateKey: string
projectId: string
publicKey: string
region: string
AlbCertificate 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 AlbCertificate resource accepts the following input properties:
- Private
Key string - The PEM encoded private key part
- Project
Id string - STACKIT project ID to which the certificate is associated.
- Public
Key string - The PEM encoded public key part
- Name string
- Certificate name.
- Region string
- The resource region (e.g. eu01). If not defined, the provider region is used.
- Private
Key string - The PEM encoded private key part
- Project
Id string - STACKIT project ID to which the certificate is associated.
- Public
Key string - The PEM encoded public key part
- Name string
- Certificate name.
- Region string
- The resource region (e.g. eu01). If not defined, the provider region is used.
- private
Key String - The PEM encoded private key part
- project
Id String - STACKIT project ID to which the certificate is associated.
- public
Key String - The PEM encoded public key part
- name String
- Certificate name.
- region String
- The resource region (e.g. eu01). If not defined, the provider region is used.
- private
Key string - The PEM encoded private key part
- project
Id string - STACKIT project ID to which the certificate is associated.
- public
Key string - The PEM encoded public key part
- name string
- Certificate name.
- region string
- The resource region (e.g. eu01). If not defined, the provider region is used.
- private_
key str - The PEM encoded private key part
- project_
id str - STACKIT project ID to which the certificate is associated.
- public_
key str - The PEM encoded public key part
- name str
- Certificate name.
- region str
- The resource region (e.g. eu01). If not defined, the provider region is used.
- private
Key String - The PEM encoded private key part
- project
Id String - STACKIT project ID to which the certificate is associated.
- public
Key String - The PEM encoded public key part
- name String
- Certificate name.
- region String
- The resource region (e.g. eu01). If not defined, the provider region is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the AlbCertificate resource produces the following output properties:
Look up Existing AlbCertificate Resource
Get an existing AlbCertificate 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?: AlbCertificateState, opts?: CustomResourceOptions): AlbCertificate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cert_id: Optional[str] = None,
name: Optional[str] = None,
private_key: Optional[str] = None,
project_id: Optional[str] = None,
public_key: Optional[str] = None,
region: Optional[str] = None) -> AlbCertificatefunc GetAlbCertificate(ctx *Context, name string, id IDInput, state *AlbCertificateState, opts ...ResourceOption) (*AlbCertificate, error)public static AlbCertificate Get(string name, Input<string> id, AlbCertificateState? state, CustomResourceOptions? opts = null)public static AlbCertificate get(String name, Output<String> id, AlbCertificateState state, CustomResourceOptions options)resources: _: type: stackit:AlbCertificate 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.
- Cert
Id string - The ID of the certificate.
- Name string
- Certificate name.
- Private
Key string - The PEM encoded private key part
- Project
Id string - STACKIT project ID to which the certificate is associated.
- Public
Key string - The PEM encoded public key part
- Region string
- The resource region (e.g. eu01). If not defined, the provider region is used.
- Cert
Id string - The ID of the certificate.
- Name string
- Certificate name.
- Private
Key string - The PEM encoded private key part
- Project
Id string - STACKIT project ID to which the certificate is associated.
- Public
Key string - The PEM encoded public key part
- Region string
- The resource region (e.g. eu01). If not defined, the provider region is used.
- cert
Id String - The ID of the certificate.
- name String
- Certificate name.
- private
Key String - The PEM encoded private key part
- project
Id String - STACKIT project ID to which the certificate is associated.
- public
Key String - The PEM encoded public key part
- region String
- The resource region (e.g. eu01). If not defined, the provider region is used.
- cert
Id string - The ID of the certificate.
- name string
- Certificate name.
- private
Key string - The PEM encoded private key part
- project
Id string - STACKIT project ID to which the certificate is associated.
- public
Key string - The PEM encoded public key part
- region string
- The resource region (e.g. eu01). If not defined, the provider region is used.
- cert_
id str - The ID of the certificate.
- name str
- Certificate name.
- private_
key str - The PEM encoded private key part
- project_
id str - STACKIT project ID to which the certificate is associated.
- public_
key str - The PEM encoded public key part
- region str
- The resource region (e.g. eu01). If not defined, the provider region is used.
- cert
Id String - The ID of the certificate.
- name String
- Certificate name.
- private
Key String - The PEM encoded private key part
- project
Id String - STACKIT project ID to which the certificate is associated.
- public
Key String - The PEM encoded public key part
- region String
- The resource region (e.g. eu01). If not defined, the provider region is used.
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Wednesday, May 6, 2026 by stackitcloud
