circleci 0.6.1 published on Monday, Apr 14, 2025 by mrolla
circleci.getContext
Explore with Pulumi AI
Use this data source to get information about a CircleCI context.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as circleci from "@pulumi/circleci";
const build = circleci.getContext({
name: "build",
});
import pulumi
import pulumi_circleci as circleci
build = circleci.get_context(name="build")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/circleci/circleci"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := circleci.LookupContext(ctx, &circleci.LookupContextArgs{
Name: "build",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Circleci = Pulumi.Circleci;
return await Deployment.RunAsync(() =>
{
var build = Circleci.GetContext.Invoke(new()
{
Name = "build",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.circleci.CircleciFunctions;
import com.pulumi.circleci.inputs.GetContextArgs;
import java.util.List;
import java.util.ArrayList;
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 build = CircleciFunctions.getContext(GetContextArgs.builder()
.name("build")
.build());
}
}
variables:
build:
fn::invoke:
function: circleci:getContext
arguments:
name: build
Using getContext
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 getContext(args: GetContextArgs, opts?: InvokeOptions): Promise<GetContextResult>
function getContextOutput(args: GetContextOutputArgs, opts?: InvokeOptions): Output<GetContextResult>
def get_context(id: Optional[str] = None,
name: Optional[str] = None,
organization: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetContextResult
def get_context_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
organization: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetContextResult]
func LookupContext(ctx *Context, args *LookupContextArgs, opts ...InvokeOption) (*LookupContextResult, error)
func LookupContextOutput(ctx *Context, args *LookupContextOutputArgs, opts ...InvokeOption) LookupContextResultOutput
> Note: This function is named LookupContext
in the Go SDK.
public static class GetContext
{
public static Task<GetContextResult> InvokeAsync(GetContextArgs args, InvokeOptions? opts = null)
public static Output<GetContextResult> Invoke(GetContextInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetContextResult> getContext(GetContextArgs args, InvokeOptions options)
public static Output<GetContextResult> getContext(GetContextArgs args, InvokeOptions options)
fn::invoke:
function: circleci:index/getContext:getContext
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Name of the context.
- Id string
- The ID of the context.
- Organization string
- Organization where the context is defined.
- Name string
- Name of the context.
- Id string
- The ID of the context.
- Organization string
- Organization where the context is defined.
- name String
- Name of the context.
- id String
- The ID of the context.
- organization String
- Organization where the context is defined.
- name string
- Name of the context.
- id string
- The ID of the context.
- organization string
- Organization where the context is defined.
- name str
- Name of the context.
- id str
- The ID of the context.
- organization str
- Organization where the context is defined.
- name String
- Name of the context.
- id String
- The ID of the context.
- organization String
- Organization where the context is defined.
getContext Result
The following output properties are available:
- Id string
- The ID of the context.
- Name string
- Organization string
- Id string
- The ID of the context.
- Name string
- Organization string
- id String
- The ID of the context.
- name String
- organization String
- id string
- The ID of the context.
- name string
- organization string
- id str
- The ID of the context.
- name str
- organization str
- id String
- The ID of the context.
- name String
- organization String
Package Details
- Repository
- circleci mrolla/terraform-provider-circleci
- License
- Notes
- This Pulumi package is based on the
circleci
Terraform Provider.