1. Registry
  2. Packages
  3. DigitalOcean Provider
  4. API Docs
  5. getActionGatewayProviderCredential
Viewing docs for DigitalOcean v4.86.0
published on Saturday, Nov 21, 2026 by Pulumi
digitalocean logo
Viewing docs for DigitalOcean v4.86.0
published on Saturday, Nov 21, 2026 by Pulumi

    Get information about an Action Gateway provider credential, such as one registered in the control panel, to pass its ID to a digitalocean.ActionGatewayConnection. Look a credential up by its id, or by its toolProvider and displayName.

    The lookup finds only credentials visible to the DigitalOcean user who owns Terraform’s API token: that user’s own and those shared with the team. The API never returns a credential’s API key, client ID, or client secret, so this data source does not export them.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const github = digitalocean.getActionGatewayProviderCredential({
        toolProvider: "github",
        displayName: "Production GitHub app",
    });
    const githubActionGatewayConnection = new digitalocean.ActionGatewayConnection("github", {
        toolProvider: github.then(github => github.toolProvider),
        userId: "user-123",
        credentialId: github.then(github => github.id),
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    github = digitalocean.get_action_gateway_provider_credential(tool_provider="github",
        display_name="Production GitHub app")
    github_action_gateway_connection = digitalocean.ActionGatewayConnection("github",
        tool_provider=github.tool_provider,
        user_id="user-123",
        credential_id=github.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		github, err := digitalocean.GetActionGatewayProviderCredential(ctx, &digitalocean.LookupActionGatewayProviderCredentialArgs{
    			ToolProvider: pulumi.StringRef("github"),
    			DisplayName:  pulumi.StringRef("Production GitHub app"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewActionGatewayConnection(ctx, "github", &digitalocean.ActionGatewayConnectionArgs{
    			ToolProvider: pulumi.String(github.ToolProvider),
    			UserId:       pulumi.String("user-123"),
    			CredentialId: pulumi.String(github.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var github = DigitalOcean.GetActionGatewayProviderCredential.Invoke(new()
        {
            ToolProvider = "github",
            DisplayName = "Production GitHub app",
        });
    
        var githubActionGatewayConnection = new DigitalOcean.ActionGatewayConnection("github", new()
        {
            ToolProvider = github.Apply(getActionGatewayProviderCredentialResult => getActionGatewayProviderCredentialResult.ToolProvider),
            UserId = "user-123",
            CredentialId = github.Apply(getActionGatewayProviderCredentialResult => getActionGatewayProviderCredentialResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DigitaloceanFunctions;
    import com.pulumi.digitalocean.inputs.GetActionGatewayProviderCredentialArgs;
    import com.pulumi.digitalocean.ActionGatewayConnection;
    import com.pulumi.digitalocean.ActionGatewayConnectionArgs;
    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) {
            final var github = DigitaloceanFunctions.getActionGatewayProviderCredential(GetActionGatewayProviderCredentialArgs.builder()
                .toolProvider("github")
                .displayName("Production GitHub app")
                .build());
    
            var githubActionGatewayConnection = new ActionGatewayConnection("githubActionGatewayConnection", ActionGatewayConnectionArgs.builder()
                .toolProvider(github.toolProvider())
                .userId("user-123")
                .credentialId(github.id())
                .build());
    
        }
    }
    
    resources:
      githubActionGatewayConnection:
        type: digitalocean:ActionGatewayConnection
        name: github
        properties:
          toolProvider: ${github.toolProvider}
          userId: user-123
          credentialId: ${github.id}
    variables:
      github:
        fn::invoke:
          function: digitalocean:getActionGatewayProviderCredential
          arguments:
            toolProvider: github
            displayName: Production GitHub app
    
    terraform {
      required_providers {
        digitalocean = {
          source = "pulumi/digitalocean"
        }
      }
    }
    
    data "digitalocean_action_gateway_provider_credential" "github" {
      tool_provider = "github"
      display_name  = "Production GitHub app"
    }
    
    resource "digitalocean_action_gateway_connection" "github" {
      lifecycle {
        create_before_destroy = true
      }
      tool_provider = data.digitalocean_action_gateway_provider_credential.github.tool_provider
      user_id       = "user-123"
      credential_id = data.digitalocean_action_gateway_provider_credential.github.id
    }
    

    Using getActionGatewayProviderCredential

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getActionGatewayProviderCredential(args: GetActionGatewayProviderCredentialArgs, opts?: InvokeOptions): Promise<GetActionGatewayProviderCredentialResult>
    function getActionGatewayProviderCredentialOutput(args: GetActionGatewayProviderCredentialOutputArgs, opts?: InvokeOutputOptions): Output<GetActionGatewayProviderCredentialResult>
    def get_action_gateway_provider_credential(display_name: Optional[str] = None,
                                               id: Optional[str] = None,
                                               tool_provider: Optional[str] = None,
                                               opts: Optional[InvokeOptions] = None) -> GetActionGatewayProviderCredentialResult
    def get_action_gateway_provider_credential_output(display_name: pulumi.Input[Optional[str]] = None,
                                               id: pulumi.Input[Optional[str]] = None,
                                               tool_provider: pulumi.Input[Optional[str]] = None,
                                               opts: Optional[InvokeOutputOptions] = None) -> Output[GetActionGatewayProviderCredentialResult]
    func LookupActionGatewayProviderCredential(ctx *Context, args *LookupActionGatewayProviderCredentialArgs, opts ...InvokeOption) (*LookupActionGatewayProviderCredentialResult, error)
    func LookupActionGatewayProviderCredentialOutput(ctx *Context, args *LookupActionGatewayProviderCredentialOutputArgs, opts ...InvokeOption) LookupActionGatewayProviderCredentialResultOutput

    > Note: This function is named LookupActionGatewayProviderCredential in the Go SDK.

    public static class GetActionGatewayProviderCredential 
    {
        public static Task<GetActionGatewayProviderCredentialResult> InvokeAsync(GetActionGatewayProviderCredentialArgs args, InvokeOptions? opts = null)
        public static Output<GetActionGatewayProviderCredentialResult> Invoke(GetActionGatewayProviderCredentialInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetActionGatewayProviderCredentialResult> Invoke(GetActionGatewayProviderCredentialInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetActionGatewayProviderCredentialResult> getActionGatewayProviderCredential(GetActionGatewayProviderCredentialArgs args, InvokeOptions options)
    public static Output<GetActionGatewayProviderCredentialResult> getActionGatewayProviderCredential(GetActionGatewayProviderCredentialArgs args, InvokeOptions options)
    public static Output<GetActionGatewayProviderCredentialResult> getActionGatewayProviderCredential(GetActionGatewayProviderCredentialArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: digitalocean:index/getActionGatewayProviderCredential:getActionGatewayProviderCredential
      arguments:
        # arguments dictionary
    data "digitalocean_get_action_gateway_provider_credential" "name" {
        # arguments
    }

    The following arguments are supported:

    DisplayName string
    The label of the credential.
    Id string
    The ID of the provider credential.
    ToolProvider string
    and displayName - (Optional) The slug of the credential's tool provider and the credential's label. Both must be set. The label is matched ignoring case.
    DisplayName string
    The label of the credential.
    Id string
    The ID of the provider credential.
    ToolProvider string
    and displayName - (Optional) The slug of the credential's tool provider and the credential's label. Both must be set. The label is matched ignoring case.
    display_name string
    The label of the credential.
    id string
    The ID of the provider credential.
    tool_provider string
    and displayName - (Optional) The slug of the credential's tool provider and the credential's label. Both must be set. The label is matched ignoring case.
    displayName String
    The label of the credential.
    id String
    The ID of the provider credential.
    toolProvider String
    and displayName - (Optional) The slug of the credential's tool provider and the credential's label. Both must be set. The label is matched ignoring case.
    displayName string
    The label of the credential.
    id string
    The ID of the provider credential.
    toolProvider string
    and displayName - (Optional) The slug of the credential's tool provider and the credential's label. Both must be set. The label is matched ignoring case.
    display_name str
    The label of the credential.
    id str
    The ID of the provider credential.
    tool_provider str
    and displayName - (Optional) The slug of the credential's tool provider and the credential's label. Both must be set. The label is matched ignoring case.
    displayName String
    The label of the credential.
    id String
    The ID of the provider credential.
    toolProvider String
    and displayName - (Optional) The slug of the credential's tool provider and the credential's label. Both must be set. The label is matched ignoring case.

    getActionGatewayProviderCredential Result

    The following output properties are available:

    BaseUrl string
    The HTTPS origin of the tool provider's API, when one is configured.
    CreatedAt string
    When the credential was created.
    DisplayName string
    The label of the credential.
    Id string
    The ID of the provider credential.
    Kind string
    The kind of credential, such as oauthClient or apiKey.
    OwningUserId string
    The DigitalOcean user ID of the credential's creator. Empty for a credential shared with the team.
    RedirectUrl string
    The redirect URI registered with an OAuth client. Empty when DigitalOcean's callback is used.
    ReusableByTeam bool
    Whether everyone on the team can see and use the credential.
    Scope string
    Who can use the credential: user for only its creator, or team.
    Status string
    The status of the credential: active or disabled.
    ToolProvider string
    The slug of the tool provider.
    UpdatedAt string
    When the credential was last modified.
    BaseUrl string
    The HTTPS origin of the tool provider's API, when one is configured.
    CreatedAt string
    When the credential was created.
    DisplayName string
    The label of the credential.
    Id string
    The ID of the provider credential.
    Kind string
    The kind of credential, such as oauthClient or apiKey.
    OwningUserId string
    The DigitalOcean user ID of the credential's creator. Empty for a credential shared with the team.
    RedirectUrl string
    The redirect URI registered with an OAuth client. Empty when DigitalOcean's callback is used.
    ReusableByTeam bool
    Whether everyone on the team can see and use the credential.
    Scope string
    Who can use the credential: user for only its creator, or team.
    Status string
    The status of the credential: active or disabled.
    ToolProvider string
    The slug of the tool provider.
    UpdatedAt string
    When the credential was last modified.
    base_url string
    The HTTPS origin of the tool provider's API, when one is configured.
    created_at string
    When the credential was created.
    display_name string
    The label of the credential.
    id string
    The ID of the provider credential.
    kind string
    The kind of credential, such as oauthClient or apiKey.
    owning_user_id string
    The DigitalOcean user ID of the credential's creator. Empty for a credential shared with the team.
    redirect_url string
    The redirect URI registered with an OAuth client. Empty when DigitalOcean's callback is used.
    reusable_by_team bool
    Whether everyone on the team can see and use the credential.
    scope string
    Who can use the credential: user for only its creator, or team.
    status string
    The status of the credential: active or disabled.
    tool_provider string
    The slug of the tool provider.
    updated_at string
    When the credential was last modified.
    baseUrl String
    The HTTPS origin of the tool provider's API, when one is configured.
    createdAt String
    When the credential was created.
    displayName String
    The label of the credential.
    id String
    The ID of the provider credential.
    kind String
    The kind of credential, such as oauthClient or apiKey.
    owningUserId String
    The DigitalOcean user ID of the credential's creator. Empty for a credential shared with the team.
    redirectUrl String
    The redirect URI registered with an OAuth client. Empty when DigitalOcean's callback is used.
    reusableByTeam Boolean
    Whether everyone on the team can see and use the credential.
    scope String
    Who can use the credential: user for only its creator, or team.
    status String
    The status of the credential: active or disabled.
    toolProvider String
    The slug of the tool provider.
    updatedAt String
    When the credential was last modified.
    baseUrl string
    The HTTPS origin of the tool provider's API, when one is configured.
    createdAt string
    When the credential was created.
    displayName string
    The label of the credential.
    id string
    The ID of the provider credential.
    kind string
    The kind of credential, such as oauthClient or apiKey.
    owningUserId string
    The DigitalOcean user ID of the credential's creator. Empty for a credential shared with the team.
    redirectUrl string
    The redirect URI registered with an OAuth client. Empty when DigitalOcean's callback is used.
    reusableByTeam boolean
    Whether everyone on the team can see and use the credential.
    scope string
    Who can use the credential: user for only its creator, or team.
    status string
    The status of the credential: active or disabled.
    toolProvider string
    The slug of the tool provider.
    updatedAt string
    When the credential was last modified.
    base_url str
    The HTTPS origin of the tool provider's API, when one is configured.
    created_at str
    When the credential was created.
    display_name str
    The label of the credential.
    id str
    The ID of the provider credential.
    kind str
    The kind of credential, such as oauthClient or apiKey.
    owning_user_id str
    The DigitalOcean user ID of the credential's creator. Empty for a credential shared with the team.
    redirect_url str
    The redirect URI registered with an OAuth client. Empty when DigitalOcean's callback is used.
    reusable_by_team bool
    Whether everyone on the team can see and use the credential.
    scope str
    Who can use the credential: user for only its creator, or team.
    status str
    The status of the credential: active or disabled.
    tool_provider str
    The slug of the tool provider.
    updated_at str
    When the credential was last modified.
    baseUrl String
    The HTTPS origin of the tool provider's API, when one is configured.
    createdAt String
    When the credential was created.
    displayName String
    The label of the credential.
    id String
    The ID of the provider credential.
    kind String
    The kind of credential, such as oauthClient or apiKey.
    owningUserId String
    The DigitalOcean user ID of the credential's creator. Empty for a credential shared with the team.
    redirectUrl String
    The redirect URI registered with an OAuth client. Empty when DigitalOcean's callback is used.
    reusableByTeam Boolean
    Whether everyone on the team can see and use the credential.
    scope String
    Who can use the credential: user for only its creator, or team.
    status String
    The status of the credential: active or disabled.
    toolProvider String
    The slug of the tool provider.
    updatedAt String
    When the credential was last modified.

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    Viewing docs for DigitalOcean v4.86.0
    published on Saturday, Nov 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial