published on Monday, Aug 17, 2026 by stackitcloud
published on Monday, Aug 17, 2026 by stackitcloud
Manages a federated identity provider for a STACKIT service account to enable workload identity federation.
Example Usage
Create a federated identity provider
resource "stackit_service_account" "sa" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "my-service-account"
}
resource "stackit_service_account_federated_identity_provider" "provider" {
project_id = stackit_service_account.sa.project_id
service_account_email = stackit_service_account.sa.email
name = "my-provider"
issuer = "https://auth.example.com"
assertions = [
{
item = "aud" # Including the audience check is mandatory for security reasons, the value is free to choose
operator = "equals"
value = "sts.accounts.stackit.cloud"
},
{
item = "email"
operator = "equals"
value = "terraform@example.com"
}
]
}
Additional Examples
resource "stackit_service_account" "sa" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "my-service-account"
}
resource "stackit_service_account_federated_identity_provider" "provider" {
project_id = stackit_service_account.sa.project_id
service_account_email = stackit_service_account.sa.email
name = "gh-actions"
issuer = "https://token.actions.githubusercontent.com"
assertions = [
{
item = "aud"
operator = "equals"
value = "sts.accounts.stackit.cloud"
},
{
item = "sub"
operator = "equals"
value = "repo:stackitcloud/terraform-provider-stackit:ref:refs/heads/main"
}
]
}
Create ServiceAccountFederatedIdentityProvider Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceAccountFederatedIdentityProvider(name: string, args: ServiceAccountFederatedIdentityProviderArgs, opts?: CustomResourceOptions);@overload
def ServiceAccountFederatedIdentityProvider(resource_name: str,
args: ServiceAccountFederatedIdentityProviderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceAccountFederatedIdentityProvider(resource_name: str,
opts: Optional[ResourceOptions] = None,
assertions: Optional[Sequence[ServiceAccountFederatedIdentityProviderAssertionArgs]] = None,
issuer: Optional[str] = None,
project_id: Optional[str] = None,
service_account_email: Optional[str] = None,
name: Optional[str] = None)func NewServiceAccountFederatedIdentityProvider(ctx *Context, name string, args ServiceAccountFederatedIdentityProviderArgs, opts ...ResourceOption) (*ServiceAccountFederatedIdentityProvider, error)public ServiceAccountFederatedIdentityProvider(string name, ServiceAccountFederatedIdentityProviderArgs args, CustomResourceOptions? opts = null)
public ServiceAccountFederatedIdentityProvider(String name, ServiceAccountFederatedIdentityProviderArgs args)
public ServiceAccountFederatedIdentityProvider(String name, ServiceAccountFederatedIdentityProviderArgs args, CustomResourceOptions options)
type: stackit:ServiceAccountFederatedIdentityProvider
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "stackit_service_account_federated_identity_provider" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ServiceAccountFederatedIdentityProviderArgs
- 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 ServiceAccountFederatedIdentityProviderArgs
- 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 ServiceAccountFederatedIdentityProviderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceAccountFederatedIdentityProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceAccountFederatedIdentityProviderArgs
- 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 serviceAccountFederatedIdentityProviderResource = new Stackit.ServiceAccountFederatedIdentityProvider("serviceAccountFederatedIdentityProviderResource", new()
{
Assertions = new[]
{
new Stackit.Inputs.ServiceAccountFederatedIdentityProviderAssertionArgs
{
Item = "string",
Operator = "string",
Value = "string",
},
},
Issuer = "string",
ProjectId = "string",
ServiceAccountEmail = "string",
Name = "string",
});
example, err := stackit.NewServiceAccountFederatedIdentityProvider(ctx, "serviceAccountFederatedIdentityProviderResource", &stackit.ServiceAccountFederatedIdentityProviderArgs{
Assertions: stackit.ServiceAccountFederatedIdentityProviderAssertionArray{
&stackit.ServiceAccountFederatedIdentityProviderAssertionArgs{
Item: pulumi.String("string"),
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Issuer: pulumi.String("string"),
ProjectId: pulumi.String("string"),
ServiceAccountEmail: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "stackit_service_account_federated_identity_provider" "serviceAccountFederatedIdentityProviderResource" {
lifecycle {
create_before_destroy = true
}
assertions {
item = "string"
operator = "string"
value = "string"
}
issuer = "string"
project_id = "string"
service_account_email = "string"
name = "string"
}
var serviceAccountFederatedIdentityProviderResource = new ServiceAccountFederatedIdentityProvider("serviceAccountFederatedIdentityProviderResource", ServiceAccountFederatedIdentityProviderArgs.builder()
.assertions(ServiceAccountFederatedIdentityProviderAssertionArgs.builder()
.item("string")
.operator("string")
.value("string")
.build())
.issuer("string")
.projectId("string")
.serviceAccountEmail("string")
.name("string")
.build());
service_account_federated_identity_provider_resource = stackit.ServiceAccountFederatedIdentityProvider("serviceAccountFederatedIdentityProviderResource",
assertions=[{
"item": "string",
"operator": "string",
"value": "string",
}],
issuer="string",
project_id="string",
service_account_email="string",
name="string")
const serviceAccountFederatedIdentityProviderResource = new stackit.ServiceAccountFederatedIdentityProvider("serviceAccountFederatedIdentityProviderResource", {
assertions: [{
item: "string",
operator: "string",
value: "string",
}],
issuer: "string",
projectId: "string",
serviceAccountEmail: "string",
name: "string",
});
type: stackit:ServiceAccountFederatedIdentityProvider
properties:
assertions:
- item: string
operator: string
value: string
issuer: string
name: string
projectId: string
serviceAccountEmail: string
ServiceAccountFederatedIdentityProvider 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 ServiceAccountFederatedIdentityProvider resource accepts the following input properties:
- Assertions
List<Service
Account Federated Identity Provider Assertion> - The assertions for the federated identity provider.
- Issuer string
- The issuer URL.
- Project
Id string - The STACKIT project ID associated with the service account.
- Service
Account stringEmail - The email address associated with the service account, used for account identification and communication.
- Name string
- The name of the federated identity provider.
- Assertions
[]Service
Account Federated Identity Provider Assertion Args - The assertions for the federated identity provider.
- Issuer string
- The issuer URL.
- Project
Id string - The STACKIT project ID associated with the service account.
- Service
Account stringEmail - The email address associated with the service account, used for account identification and communication.
- Name string
- The name of the federated identity provider.
- assertions list(object)
- The assertions for the federated identity provider.
- issuer string
- The issuer URL.
- project_
id string - The STACKIT project ID associated with the service account.
- service_
account_ stringemail - The email address associated with the service account, used for account identification and communication.
- name string
- The name of the federated identity provider.
- assertions
List<Service
Account Federated Identity Provider Assertion> - The assertions for the federated identity provider.
- issuer String
- The issuer URL.
- project
Id String - The STACKIT project ID associated with the service account.
- service
Account StringEmail - The email address associated with the service account, used for account identification and communication.
- name String
- The name of the federated identity provider.
- assertions
Service
Account Federated Identity Provider Assertion[] - The assertions for the federated identity provider.
- issuer string
- The issuer URL.
- project
Id string - The STACKIT project ID associated with the service account.
- service
Account stringEmail - The email address associated with the service account, used for account identification and communication.
- name string
- The name of the federated identity provider.
- assertions
Sequence[Service
Account Federated Identity Provider Assertion Args] - The assertions for the federated identity provider.
- issuer str
- The issuer URL.
- project_
id str - The STACKIT project ID associated with the service account.
- service_
account_ stremail - The email address associated with the service account, used for account identification and communication.
- name str
- The name of the federated identity provider.
- assertions List<Property Map>
- The assertions for the federated identity provider.
- issuer String
- The issuer URL.
- project
Id String - The STACKIT project ID associated with the service account.
- service
Account StringEmail - The email address associated with the service account, used for account identification and communication.
- name String
- The name of the federated identity provider.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceAccountFederatedIdentityProvider resource produces the following output properties:
- Federation
Id string - The unique identifier for the federated identity provider associated with the service account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Federation
Id string - The unique identifier for the federated identity provider associated with the service account.
- Id string
- The provider-assigned unique ID for this managed resource.
- federation_
id string - The unique identifier for the federated identity provider associated with the service account.
- id string
- The provider-assigned unique ID for this managed resource.
- federation
Id String - The unique identifier for the federated identity provider associated with the service account.
- id String
- The provider-assigned unique ID for this managed resource.
- federation
Id string - The unique identifier for the federated identity provider associated with the service account.
- id string
- The provider-assigned unique ID for this managed resource.
- federation_
id str - The unique identifier for the federated identity provider associated with the service account.
- id str
- The provider-assigned unique ID for this managed resource.
- federation
Id String - The unique identifier for the federated identity provider associated with the service account.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ServiceAccountFederatedIdentityProvider Resource
Get an existing ServiceAccountFederatedIdentityProvider 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?: ServiceAccountFederatedIdentityProviderState, opts?: CustomResourceOptions): ServiceAccountFederatedIdentityProvider@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
assertions: Optional[Sequence[ServiceAccountFederatedIdentityProviderAssertionArgs]] = None,
federation_id: Optional[str] = None,
issuer: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
service_account_email: Optional[str] = None) -> ServiceAccountFederatedIdentityProviderfunc GetServiceAccountFederatedIdentityProvider(ctx *Context, name string, id IDInput, state *ServiceAccountFederatedIdentityProviderState, opts ...ResourceOption) (*ServiceAccountFederatedIdentityProvider, error)public static ServiceAccountFederatedIdentityProvider Get(string name, Input<string> id, ServiceAccountFederatedIdentityProviderState? state, CustomResourceOptions? opts = null)public static ServiceAccountFederatedIdentityProvider get(String name, Output<String> id, ServiceAccountFederatedIdentityProviderState state, CustomResourceOptions options)resources: _: type: stackit:ServiceAccountFederatedIdentityProvider get: id: ${id}import {
to = stackit_service_account_federated_identity_provider.example
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.
- Assertions
List<Service
Account Federated Identity Provider Assertion> - The assertions for the federated identity provider.
- Federation
Id string - The unique identifier for the federated identity provider associated with the service account.
- Issuer string
- The issuer URL.
- Name string
- The name of the federated identity provider.
- Project
Id string - The STACKIT project ID associated with the service account.
- Service
Account stringEmail - The email address associated with the service account, used for account identification and communication.
- Assertions
[]Service
Account Federated Identity Provider Assertion Args - The assertions for the federated identity provider.
- Federation
Id string - The unique identifier for the federated identity provider associated with the service account.
- Issuer string
- The issuer URL.
- Name string
- The name of the federated identity provider.
- Project
Id string - The STACKIT project ID associated with the service account.
- Service
Account stringEmail - The email address associated with the service account, used for account identification and communication.
- assertions list(object)
- The assertions for the federated identity provider.
- federation_
id string - The unique identifier for the federated identity provider associated with the service account.
- issuer string
- The issuer URL.
- name string
- The name of the federated identity provider.
- project_
id string - The STACKIT project ID associated with the service account.
- service_
account_ stringemail - The email address associated with the service account, used for account identification and communication.
- assertions
List<Service
Account Federated Identity Provider Assertion> - The assertions for the federated identity provider.
- federation
Id String - The unique identifier for the federated identity provider associated with the service account.
- issuer String
- The issuer URL.
- name String
- The name of the federated identity provider.
- project
Id String - The STACKIT project ID associated with the service account.
- service
Account StringEmail - The email address associated with the service account, used for account identification and communication.
- assertions
Service
Account Federated Identity Provider Assertion[] - The assertions for the federated identity provider.
- federation
Id string - The unique identifier for the federated identity provider associated with the service account.
- issuer string
- The issuer URL.
- name string
- The name of the federated identity provider.
- project
Id string - The STACKIT project ID associated with the service account.
- service
Account stringEmail - The email address associated with the service account, used for account identification and communication.
- assertions
Sequence[Service
Account Federated Identity Provider Assertion Args] - The assertions for the federated identity provider.
- federation_
id str - The unique identifier for the federated identity provider associated with the service account.
- issuer str
- The issuer URL.
- name str
- The name of the federated identity provider.
- project_
id str - The STACKIT project ID associated with the service account.
- service_
account_ stremail - The email address associated with the service account, used for account identification and communication.
- assertions List<Property Map>
- The assertions for the federated identity provider.
- federation
Id String - The unique identifier for the federated identity provider associated with the service account.
- issuer String
- The issuer URL.
- name String
- The name of the federated identity provider.
- project
Id String - The STACKIT project ID associated with the service account.
- service
Account StringEmail - The email address associated with the service account, used for account identification and communication.
Supporting Types
ServiceAccountFederatedIdentityProviderAssertion, ServiceAccountFederatedIdentityProviderAssertionArgs
Import
In Terraform v1.5.0 and later, the + "" + import + “" + block can be used with the + "” + id + “" + attribute, for example:
# Only use the import statement, if you want to import an existing federated identity provider
import {
to = stackit_service_account_federated_identity_provider.import-example
id = "${var.project_id},${var.service_account_email},${var.federation_id}"
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Monday, Aug 17, 2026 by stackitcloud