1. Packages
  2. Selectel Provider
  3. API Docs
  4. IamSamlFederationCertificateV1
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

selectel.IamSamlFederationCertificateV1

Explore with Pulumi AI

selectel logo
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

    Manages SAML Federation Certificates for Selectel products using public API v1. Selectel products support Identity and Access Management (IAM). For more information about Federation Certificates, see the official Selectel documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fs from "fs";
    import * as selectel from "@pulumi/selectel";
    
    const certificate = new selectel.IamSamlFederationCertificateV1("certificate", {
        federationId: selectel_iam_saml_federation_v1.federation_1.id,
        description: "simple description",
        data: fs.readFileSync(`${path.module}/federation_cert.crt`, "utf8"),
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    certificate = selectel.IamSamlFederationCertificateV1("certificate",
        federation_id=selectel_iam_saml_federation_v1["federation_1"]["id"],
        description="simple description",
        data=(lambda path: open(path).read())(f"{path['module']}/federation_cert.crt"))
    
    package main
    
    import (
    	"fmt"
    	"os"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewIamSamlFederationCertificateV1(ctx, "certificate", &selectel.IamSamlFederationCertificateV1Args{
    			FederationId: pulumi.Any(selectel_iam_saml_federation_v1.Federation_1.Id),
    			Description:  pulumi.String("simple description"),
    			Data:         pulumi.String(readFileOrPanic(fmt.Sprintf("%v/federation_cert.crt", path.Module))),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var certificate = new Selectel.IamSamlFederationCertificateV1("certificate", new()
        {
            FederationId = selectel_iam_saml_federation_v1.Federation_1.Id,
            Description = "simple description",
            Data = File.ReadAllText($"{path.Module}/federation_cert.crt"),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.IamSamlFederationCertificateV1;
    import com.pulumi.selectel.IamSamlFederationCertificateV1Args;
    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 certificate = new IamSamlFederationCertificateV1("certificate", IamSamlFederationCertificateV1Args.builder()
                .federationId(selectel_iam_saml_federation_v1.federation_1().id())
                .description("simple description")
                .data(Files.readString(Paths.get(String.format("%s/federation_cert.crt", path.module()))))
                .build());
    
        }
    }
    
    resources:
      certificate:
        type: selectel:IamSamlFederationCertificateV1
        properties:
          federationId: ${selectel_iam_saml_federation_v1.federation_1.id}
          description: simple description
          data:
            fn::readFile: ${path.module}/federation_cert.crt
    

    Create IamSamlFederationCertificateV1 Resource

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

    Constructor syntax

    new IamSamlFederationCertificateV1(name: string, args: IamSamlFederationCertificateV1Args, opts?: CustomResourceOptions);
    @overload
    def IamSamlFederationCertificateV1(resource_name: str,
                                       args: IamSamlFederationCertificateV1Args,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamSamlFederationCertificateV1(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       data: Optional[str] = None,
                                       federation_id: Optional[str] = None,
                                       description: Optional[str] = None,
                                       iam_saml_federation_certificate_v1_id: Optional[str] = None,
                                       name: Optional[str] = None)
    func NewIamSamlFederationCertificateV1(ctx *Context, name string, args IamSamlFederationCertificateV1Args, opts ...ResourceOption) (*IamSamlFederationCertificateV1, error)
    public IamSamlFederationCertificateV1(string name, IamSamlFederationCertificateV1Args args, CustomResourceOptions? opts = null)
    public IamSamlFederationCertificateV1(String name, IamSamlFederationCertificateV1Args args)
    public IamSamlFederationCertificateV1(String name, IamSamlFederationCertificateV1Args args, CustomResourceOptions options)
    
    type: selectel:IamSamlFederationCertificateV1
    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 IamSamlFederationCertificateV1Args
    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 IamSamlFederationCertificateV1Args
    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 IamSamlFederationCertificateV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamSamlFederationCertificateV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamSamlFederationCertificateV1Args
    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 iamSamlFederationCertificateV1Resource = new Selectel.IamSamlFederationCertificateV1("iamSamlFederationCertificateV1Resource", new()
    {
        Data = "string",
        FederationId = "string",
        Description = "string",
        IamSamlFederationCertificateV1Id = "string",
        Name = "string",
    });
    
    example, err := selectel.NewIamSamlFederationCertificateV1(ctx, "iamSamlFederationCertificateV1Resource", &selectel.IamSamlFederationCertificateV1Args{
    	Data:                             pulumi.String("string"),
    	FederationId:                     pulumi.String("string"),
    	Description:                      pulumi.String("string"),
    	IamSamlFederationCertificateV1Id: pulumi.String("string"),
    	Name:                             pulumi.String("string"),
    })
    
    var iamSamlFederationCertificateV1Resource = new IamSamlFederationCertificateV1("iamSamlFederationCertificateV1Resource", IamSamlFederationCertificateV1Args.builder()
        .data("string")
        .federationId("string")
        .description("string")
        .iamSamlFederationCertificateV1Id("string")
        .name("string")
        .build());
    
    iam_saml_federation_certificate_v1_resource = selectel.IamSamlFederationCertificateV1("iamSamlFederationCertificateV1Resource",
        data="string",
        federation_id="string",
        description="string",
        iam_saml_federation_certificate_v1_id="string",
        name="string")
    
    const iamSamlFederationCertificateV1Resource = new selectel.IamSamlFederationCertificateV1("iamSamlFederationCertificateV1Resource", {
        data: "string",
        federationId: "string",
        description: "string",
        iamSamlFederationCertificateV1Id: "string",
        name: "string",
    });
    
    type: selectel:IamSamlFederationCertificateV1
    properties:
        data: string
        description: string
        federationId: string
        iamSamlFederationCertificateV1Id: string
        name: string
    

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

    Data string
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    FederationId string
    Unique identifier of the federation.
    Description string
    Certificate description.
    IamSamlFederationCertificateV1Id string
    Name string
    Certificate name.
    Data string
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    FederationId string
    Unique identifier of the federation.
    Description string
    Certificate description.
    IamSamlFederationCertificateV1Id string
    Name string
    Certificate name.
    data String
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    federationId String
    Unique identifier of the federation.
    description String
    Certificate description.
    iamSamlFederationCertificateV1Id String
    name String
    Certificate name.
    data string
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    federationId string
    Unique identifier of the federation.
    description string
    Certificate description.
    iamSamlFederationCertificateV1Id string
    name string
    Certificate name.
    data str
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    federation_id str
    Unique identifier of the federation.
    description str
    Certificate description.
    iam_saml_federation_certificate_v1_id str
    name str
    Certificate name.
    data String
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    federationId String
    Unique identifier of the federation.
    description String
    Certificate description.
    iamSamlFederationCertificateV1Id String
    name String
    Certificate name.

    Outputs

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

    AccountId string
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    Fingerprint string
    Fingerprint of the certificate.
    Id string
    The provider-assigned unique ID for this managed resource.
    NotAfter string
    Expiration date of the certificate.
    NotBefore string
    Issue date of the certificate.
    AccountId string
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    Fingerprint string
    Fingerprint of the certificate.
    Id string
    The provider-assigned unique ID for this managed resource.
    NotAfter string
    Expiration date of the certificate.
    NotBefore string
    Issue date of the certificate.
    accountId String
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    fingerprint String
    Fingerprint of the certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    notAfter String
    Expiration date of the certificate.
    notBefore String
    Issue date of the certificate.
    accountId string
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    fingerprint string
    Fingerprint of the certificate.
    id string
    The provider-assigned unique ID for this managed resource.
    notAfter string
    Expiration date of the certificate.
    notBefore string
    Issue date of the certificate.
    account_id str
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    fingerprint str
    Fingerprint of the certificate.
    id str
    The provider-assigned unique ID for this managed resource.
    not_after str
    Expiration date of the certificate.
    not_before str
    Issue date of the certificate.
    accountId String
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    fingerprint String
    Fingerprint of the certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    notAfter String
    Expiration date of the certificate.
    notBefore String
    Issue date of the certificate.

    Look up Existing IamSamlFederationCertificateV1 Resource

    Get an existing IamSamlFederationCertificateV1 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?: IamSamlFederationCertificateV1State, opts?: CustomResourceOptions): IamSamlFederationCertificateV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            data: Optional[str] = None,
            description: Optional[str] = None,
            federation_id: Optional[str] = None,
            fingerprint: Optional[str] = None,
            iam_saml_federation_certificate_v1_id: Optional[str] = None,
            name: Optional[str] = None,
            not_after: Optional[str] = None,
            not_before: Optional[str] = None) -> IamSamlFederationCertificateV1
    func GetIamSamlFederationCertificateV1(ctx *Context, name string, id IDInput, state *IamSamlFederationCertificateV1State, opts ...ResourceOption) (*IamSamlFederationCertificateV1, error)
    public static IamSamlFederationCertificateV1 Get(string name, Input<string> id, IamSamlFederationCertificateV1State? state, CustomResourceOptions? opts = null)
    public static IamSamlFederationCertificateV1 get(String name, Output<String> id, IamSamlFederationCertificateV1State state, CustomResourceOptions options)
    resources:  _:    type: selectel:IamSamlFederationCertificateV1    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.
    The following state arguments are supported:
    AccountId string
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    Data string
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    Description string
    Certificate description.
    FederationId string
    Unique identifier of the federation.
    Fingerprint string
    Fingerprint of the certificate.
    IamSamlFederationCertificateV1Id string
    Name string
    Certificate name.
    NotAfter string
    Expiration date of the certificate.
    NotBefore string
    Issue date of the certificate.
    AccountId string
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    Data string
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    Description string
    Certificate description.
    FederationId string
    Unique identifier of the federation.
    Fingerprint string
    Fingerprint of the certificate.
    IamSamlFederationCertificateV1Id string
    Name string
    Certificate name.
    NotAfter string
    Expiration date of the certificate.
    NotBefore string
    Issue date of the certificate.
    accountId String
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    data String
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    description String
    Certificate description.
    federationId String
    Unique identifier of the federation.
    fingerprint String
    Fingerprint of the certificate.
    iamSamlFederationCertificateV1Id String
    name String
    Certificate name.
    notAfter String
    Expiration date of the certificate.
    notBefore String
    Issue date of the certificate.
    accountId string
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    data string
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    description string
    Certificate description.
    federationId string
    Unique identifier of the federation.
    fingerprint string
    Fingerprint of the certificate.
    iamSamlFederationCertificateV1Id string
    name string
    Certificate name.
    notAfter string
    Expiration date of the certificate.
    notBefore string
    Issue date of the certificate.
    account_id str
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    data str
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    description str
    Certificate description.
    federation_id str
    Unique identifier of the federation.
    fingerprint str
    Fingerprint of the certificate.
    iam_saml_federation_certificate_v1_id str
    name str
    Certificate name.
    not_after str
    Expiration date of the certificate.
    not_before str
    Issue date of the certificate.
    accountId String
    Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.
    data String
    Certificate data. Must begin with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.
    description String
    Certificate description.
    federationId String
    Unique identifier of the federation.
    fingerprint String
    Fingerprint of the certificate.
    iamSamlFederationCertificateV1Id String
    name String
    Certificate name.
    notAfter String
    Expiration date of the certificate.
    notBefore String
    Issue date of the certificate.

    Import

    You can import a certificate:

    export OS_DOMAIN_NAME=<account_id>

    export OS_USERNAME=

    export OS_PASSWORD=

    export OS_SAML_FEDERATION_ID=<federation_id>

    $ pulumi import selectel:index/iamSamlFederationCertificateV1:IamSamlFederationCertificateV1 certificate_1 <certificate_id>
    

    where:

    • <account_id> — Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.

    • <username> — Name of the service user. To get the name, in the Control panel, go to Identity & Access ManagementUser management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service Users.

    • <password> — Password of the service user.

    • <federation_id> — Unique identifier of the associated federation, for which the certificate is issued, for example, abc1bb378ac84e1234b869b77aadd2ab. To get the federation ID, use either Control Panel or IAM API.

    • <certificate_id> — Unique identifier of the certificate.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    selectel logo
    selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel