AuthProvider class
An AuthProvider resource in Agent Identity to manage cloud authentication delegation.
> Note: All arguments marked as write-only values will not be stored in the state: auth_provider_type_params.three_legged_oauth.client_secret_wo, auth_provider_type_params.two_legged_oauth.client_secret_wo.
Read more about Write-only Arguments.
Example Usage
Agent Identity Auth Provider Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.agentidentity.AuthProvider("default", {
location: "us-central1",
authProviderId: "example-provider",
authProviderTypeParams: {
apiKey: {
apiKey: "test-api-key-value",
},
},
});
import pulumi
import pulumi_gcp as gcp
default = gcp.agentidentity.AuthProvider("default",
location="us-central1",
auth_provider_id="example-provider",
auth_provider_type_params={
"api_key": {
"api_key": "test-api-key-value",
},
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.AgentIdentity.AuthProvider("default", new()
{
Location = "us-central1",
AuthProviderId = "example-provider",
AuthProviderTypeParams = new Gcp.AgentIdentity.Inputs.AuthProviderAuthProviderTypeParamsArgs
{
ApiKey = new Gcp.AgentIdentity.Inputs.AuthProviderAuthProviderTypeParamsApiKeyArgs
{
ApiKey = "test-api-key-value",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/agentidentity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := agentidentity.NewAuthProvider(ctx, "default", &agentidentity.AuthProviderArgs{
Location: pulumi.String("us-central1"),
AuthProviderId: pulumi.String("example-provider"),
AuthProviderTypeParams: &agentidentity.AuthProviderAuthProviderTypeParamsArgs{
ApiKey: &agentidentity.AuthProviderAuthProviderTypeParamsApiKeyArgs{
ApiKey: pulumi.String("test-api-key-value"),
},
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_agentidentity_authprovider" "default" {
location = "us-central1"
auth_provider_id = "example-provider"
auth_provider_type_params = {
api_key = {
api_key = "test-api-key-value"
}
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.agentidentity.AuthProvider;
import com.pulumi.gcp.agentidentity.AuthProviderArgs;
import com.pulumi.gcp.agentidentity.inputs.AuthProviderAuthProviderTypeParamsArgs;
import com.pulumi.gcp.agentidentity.inputs.AuthProviderAuthProviderTypeParamsApiKeyArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 default_ = new AuthProvider("default", AuthProviderArgs.builder()
.location("us-central1")
.authProviderId("example-provider")
.authProviderTypeParams(AuthProviderAuthProviderTypeParamsArgs.builder()
.apiKey(AuthProviderAuthProviderTypeParamsApiKeyArgs.builder()
.apiKey("test-api-key-value")
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:agentidentity:AuthProvider
properties:
location: us-central1
authProviderId: example-provider
authProviderTypeParams:
apiKey:
apiKey: test-api-key-value
Import
AuthProvider can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/authProviders/{{auth_provider_id}}{{project}}/{{location}}/{{auth_provider_id}}{{location}}/{{auth_provider_id}}
When using the pulumi import command, AuthProvider can be imported using one of the formats above. For example:
$ pulumi import gcp:agentidentity/authProvider:AuthProvider default projects/{{project}}/locations/{{location}}/authProviders/{{auth_provider_id}}
$ pulumi import gcp:agentidentity/authProvider:AuthProvider default {{project}}/{{location}}/{{auth_provider_id}}
$ pulumi import gcp:agentidentity/authProvider:AuthProvider default {{location}}/{{auth_provider_id}}
Constructors
- AuthProvider(String name, {AuthProviderArgs? args, CustomResourceOptions? options})
-
Creates a new AuthProvider.
nameThe Pulumi resource name.argsArguments used to configure this AuthProvider. The set of arguments for AuthProvider.optionsResource options controlling this resource's behavior. - AuthProvider.reference(String urn)
- Creates a typed reference to an existing AuthProvider resource.
Properties
-
allowedScopes
↔ Output<
List< String> ?> -
List of scopes that are allowed to be requested for this auth_provider.
If this list is non-empty, only scopes within this list may be requested.
If this list is empty, all scopes may be requested.
Scopes appearing in
blockedScopesare disallowed even if they appear inallowedScopes. The number of allowed scopes is limited to 200.latefinal -
authProviderId
↔ Output<
String> -
The ID to use for the AuthProvider, which will become the final segment
of the AuthProvider's resource name.
This value should be 1-63 characters, and valid characters
are /a-z-/. The first character must be a lowercase letter, and the
last character must be a lowercase letter or a number.
latefinal
-
authProviderTypeParams
↔ Output<
AuthProviderAuthProviderTypeParams> -
AuthProvider type specific parameters.
Required when creating an auth_provider.
Structure is documented below.
latefinal
-
blockedScopes
↔ Output<
List< String> ?> -
List of scopes that are blocked from being requested for this
auth_provider. If a scope appears in this list, it will not be requested,
even if it also appears in
allowedScopes.blockedScopestakes precedence overallowedScopes. The number of blocked scopes is limited to 200.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createTime
↔ Output<
String> -
Output onlyCreate time stamplatefinal -
deleted
↔ Output<
bool> -
This is set to true if the authProvider is deleted.
latefinal
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
description
↔ Output<
String?> -
Description of the resource.
Must be less than 256 characters.
latefinal
-
effectiveLabels
↔ Output<
Map< String, String> > -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
-
expireTime
↔ Output<
String> -
The time when the authProvider will expire.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
labels
↔ Output<
Map< String, String> ?> -
Labels as key value pairs
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource.latefinal -
location
↔ Output<
String> -
Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.latefinal -
name
↔ Output<
String> -
Identifier. The full resource name of the auth_provider. Format:
projects/{project}/locations/{location}/authProviders/{auth_provider}
latefinal
-
project
↔ Output<
String> -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
latefinal
-
pulumiLabels
↔ Output<
Map< String, String> > -
The combination of labels configured directly on the resource
and default labels configured on the provider.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ Output<
String> -
The state of the auth_provider.
Possible values:
ENABLED
DISABLED
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
updateTime
↔ Output<
String> -
Output onlyUpdate time stamplatefinal -
urn
↔ Output<
String> -
latefinalinherited
-
workloadIds
↔ Output<
List< String> ?> -
Input only. Represents the workload identity in IAM
principal://format of the agent(s) that will use this AuthProvider. Example:principal://agents.global.org-${ORG_ID}.system.id.goog/resources/aiplatform/projects/{PROJECT_ID}/locations/{LOCATIONS}/reasoningEngines/{ID}latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {AuthProviderState? state, CustomResourceOptions? options}) → AuthProvider -
Gets an existing AuthProvider resource's state with the given
nameandid.