---
title: "Resource selectel_iam_saml_federation_certificate_v1"
sidebar_label: "selectel_iam_saml_federation_certificate_v1"
description: "Creates and manages SAML Federation Certificates for Selectel products using public API v1"
sidebar_position: 24
---

# Resource selectel\_iam\_saml\_federation\_certificate\_v1

:::info

This guide is a copy of the Selectel Terraform provider documentation in the [Terraform Registry](https://registry.terraform.io/providers/selectel/selectel/latest/docs).

:::

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](/access-control/federations/manage-saml/certificates/).

## Usage Example \{#example-usage}

```hcl
resource "selectel_iam_saml_federation_certificate_v1" "certificate" {
  federation_id = selectel_iam_saml_federation_v1.federation_1.id
  name          = "certificate name"
  description   = "simple description"
  data          = file("${path.module}/federation_cert.crt")
}

```

## Argument Reference \{#argument-reference}

* `federation_id` — (Required) Unique identifier of the federation.

* `name` — (Required) Certificate name.

* `description` — (Optional) Certificate description.

* `data` — (Required) Certificate data. Must begin with `-----BEGIN CERTIFICATE-----` and end with `-----END CERTIFICATE-----`.

## Attributes Reference \{#attributes-reference}

* `account_id` — Selectel account ID.

* `not_before` — Certificate issue date.

* `not_after` — Certificate expiration date.

* `fingerprint` — Certificate fingerprint.

## Import \{#import}

You can import a certificate:

```shell
export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=<username>
export OS_PASSWORD=<password>
export OS_SAML_FEDERATION_ID=<federation_id>
terraform import selectel_iam_saml_federation_certificate_v1.certificate_1 <certificate_id>
```

where:

* `<account_id>` — Selectel account ID. You can find the account ID in the top right corner of the [Control panel](https://my.selectel.ru/). Learn more about [registration](/account/registration/).

* `<username>` — Service user name. To get the name, in the [Control panel](https://my.selectel.ru/iam/users_management/users?type=service), go to **Identity & Access Management** ⟶ **User management** ⟶ the **Service users** tab ⟶ copy the name of the required user. Learn more about [Service Users](/access-control/access-management/).

* `<password>` — Service user password.

* `<federation_id>` — Unique identifier of the associated federation for which the certificate is issued, for example, `abc1bb378ac84e1234b869b77aadd2ab`. To get the federation ID, in the [Control panel](https://my.selectel.ru/iam/federations), go to **IAM** → **Federations** → copy the ID under the federation name.

* `<certificate_id>` — Unique identifier of the certificate.
