This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::CredentialBroker::CredentialProvider
Specifies an Amazon IAM CredentialBroker credential provider. A provider obtains credentials from an external identity provider or authorization server on behalf of your workloads. Every provider belongs to a credential provider pool and inherits the settings that pool defines. Minimally, you must specify the following properties:
-
CredentialProviderPoolIdentifier– Specify the ID of the parent credential provider pool. -
Name– Specify a name for the credential provider. The name must be unique within the parent pool. -
ProviderConfigurationInput– Specify exactly one member. The member you set determines the provider type:OauthConfigurationcreates anOAUTHprovider (allowed grant types, vendor configuration, and client authentication), andApiKeyConfigurationcreates anAPI_KEYprovider.
The provider configuration is write-only. Client secrets and API keys are never returned by CloudFormation reads; reads report the ARN of the Amazon Secrets Manager secret that holds them.
See the Properties section below for descriptions of both the required and optional properties.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CredentialBroker::CredentialProvider", "Properties" : { "CredentialProviderPoolIdentifier" :String, "Name" :String, "ProviderConfigurationInput" :CredentialProviderConfigurationInput, "Tags" :[ Tag, ... ]} }
YAML
Type: AWS::CredentialBroker::CredentialProvider Properties: CredentialProviderPoolIdentifier:StringName:StringProviderConfigurationInput:CredentialProviderConfigurationInputTags:- Tag
Properties
CredentialProviderPoolIdentifier-
The service-generated ID of the credential provider pool to create the credential provider in. Use the
CredentialProviderPoolIdentifierattribute of anAWS::CredentialBroker::CredentialProviderPoolresource, for example withFn::GetAtt.Required: Yes
Type: String
Pattern:
^[a-z0-9]{1,64}$Minimum:
1Maximum:
64Update requires: Replacement
Name-
The name for the credential provider. Must be unique among the providers that currently exist in the same pool. To rename the provider, change this value in your template; the provider is updated in place.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9_.-]{1,128}$Minimum:
1Maximum:
128Update requires: No interruption
ProviderConfigurationInput-
Write-only, type-specific provider configuration. Set exactly one member. The current schema supports
OauthConfiguration.Required: Yes
Type: CredentialProviderConfigurationInput
Update requires: No interruption
-
Metadata that you can assign to the credential provider as key-value pairs. You can specify up to 50 tags. For more information, see the following resources:
Required: No
Type: Array of Tag
Maximum:
50Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the provider, which is
the resource's primary identifier.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
CreatedAt-
The ISO 8601 timestamp of when the credential provider was created.
CredentialProviderArn-
The Amazon Resource Name (ARN) of the provider. This is the primary identifier and the value returned by
Ref. CredentialProviderIdentifier-
The service-generated provider identifier. This is an additional identifier accepted by operations that accept a provider identifier; it is not the value returned by
Ref. ProviderType-
The provider type. For the current resource schema, the value is
OAUTH. Status-
The lifecycle status of the provider. Create, update, and delete operations are asynchronous. Possible values are
CREATING,UPDATING,DELETING,READY, andFAILED. UpdatedAt-
The ISO 8601 timestamp of when the credential provider was last updated.
Examples
The following example creates an OAuth credential provider with a custom authorization server. Replace the example client and discovery values with values from your authorization server.
Create an OAuth credential provider
YAML
Resources: CredentialProviderPool: Type: AWS::CredentialBroker::CredentialProviderPool Properties: Name: example-pool CredentialProvider: Type: AWS::CredentialBroker::CredentialProvider Properties: CredentialProviderPoolIdentifier: !Ref CredentialProviderPool Name: example-provider ProviderConfigurationInput: OauthConfiguration: AllowedGrantTypes: - CLIENT_CREDENTIALS VendorConfigurationInput: CustomConfiguration: ClientAuthenticationConfiguration: ClientAuthenticationMethod: NONE ClientId: example-client-id OauthDiscovery: DiscoveryUrl: https://idp.example.com/.well-known/openid-configuration