1. Packages
  2. Packages
  3. Harness Provider
  4. API Docs
  5. platform
  6. getIacmAnsiblePlaybook
Viewing docs for Harness v0.13.1
published on Thursday, May 28, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.13.1
published on Thursday, May 28, 2026 by Pulumi

    Data source for retrieving a Harness IaCM Ansible Playbook.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const example = harness.platform.getIacmAnsiblePlaybook({
        identifier: "my_playbook",
        orgId: exampleHarnessPlatformOrganization.id,
        projectId: exampleHarnessPlatformProject.id,
    });
    
    import pulumi
    import pulumi_harness as harness
    
    example = harness.platform.get_iacm_ansible_playbook(identifier="my_playbook",
        org_id=example_harness_platform_organization["id"],
        project_id=example_harness_platform_project["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.LookupIacmAnsiblePlaybook(ctx, &platform.LookupIacmAnsiblePlaybookArgs{
    			Identifier: "my_playbook",
    			OrgId:      exampleHarnessPlatformOrganization.Id,
    			ProjectId:  exampleHarnessPlatformProject.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Harness.Platform.GetIacmAnsiblePlaybook.Invoke(new()
        {
            Identifier = "my_playbook",
            OrgId = exampleHarnessPlatformOrganization.Id,
            ProjectId = exampleHarnessPlatformProject.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.PlatformFunctions;
    import com.pulumi.harness.platform.inputs.GetIacmAnsiblePlaybookArgs;
    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 example = PlatformFunctions.getIacmAnsiblePlaybook(GetIacmAnsiblePlaybookArgs.builder()
                .identifier("my_playbook")
                .orgId(exampleHarnessPlatformOrganization.id())
                .projectId(exampleHarnessPlatformProject.id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: harness:platform:getIacmAnsiblePlaybook
          arguments:
            identifier: my_playbook
            orgId: ${exampleHarnessPlatformOrganization.id}
            projectId: ${exampleHarnessPlatformProject.id}
    
    pulumi {
      required_providers {
        harness = {
          source = "pulumi/harness"
        }
      }
    }
    
    data "harness_platform_getiacmansibleplaybook" "example" {
      identifier = "my_playbook"
      org_id     = exampleHarnessPlatformOrganization.id
      project_id = exampleHarnessPlatformProject.id
    }
    

    Using getIacmAnsiblePlaybook

    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 getIacmAnsiblePlaybook(args: GetIacmAnsiblePlaybookArgs, opts?: InvokeOptions): Promise<GetIacmAnsiblePlaybookResult>
    function getIacmAnsiblePlaybookOutput(args: GetIacmAnsiblePlaybookOutputArgs, opts?: InvokeOptions): Output<GetIacmAnsiblePlaybookResult>
    def get_iacm_ansible_playbook(identifier: Optional[str] = None,
                                  name: Optional[str] = None,
                                  org_id: Optional[str] = None,
                                  project_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetIacmAnsiblePlaybookResult
    def get_iacm_ansible_playbook_output(identifier: pulumi.Input[Optional[str]] = None,
                                  name: pulumi.Input[Optional[str]] = None,
                                  org_id: pulumi.Input[Optional[str]] = None,
                                  project_id: pulumi.Input[Optional[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetIacmAnsiblePlaybookResult]
    func LookupIacmAnsiblePlaybook(ctx *Context, args *LookupIacmAnsiblePlaybookArgs, opts ...InvokeOption) (*LookupIacmAnsiblePlaybookResult, error)
    func LookupIacmAnsiblePlaybookOutput(ctx *Context, args *LookupIacmAnsiblePlaybookOutputArgs, opts ...InvokeOption) LookupIacmAnsiblePlaybookResultOutput

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

    public static class GetIacmAnsiblePlaybook 
    {
        public static Task<GetIacmAnsiblePlaybookResult> InvokeAsync(GetIacmAnsiblePlaybookArgs args, InvokeOptions? opts = null)
        public static Output<GetIacmAnsiblePlaybookResult> Invoke(GetIacmAnsiblePlaybookInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIacmAnsiblePlaybookResult> getIacmAnsiblePlaybook(GetIacmAnsiblePlaybookArgs args, InvokeOptions options)
    public static Output<GetIacmAnsiblePlaybookResult> getIacmAnsiblePlaybook(GetIacmAnsiblePlaybookArgs args, InvokeOptions options)
    
    fn::invoke:
      function: harness:platform/getIacmAnsiblePlaybook:getIacmAnsiblePlaybook
      arguments:
        # arguments dictionary
    data "harness_platform_getiacmansibleplaybook" "name" {
        # arguments
    }

    The following arguments are supported:

    Identifier string
    Unique identifier of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Name string
    Name of the resource.
    Identifier string
    Unique identifier of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Name string
    Name of the resource.
    identifier string
    Unique identifier of the resource.
    org_id string
    Unique identifier of the organization.
    project_id string
    Unique identifier of the project.
    name string
    Name of the resource.
    identifier String
    Unique identifier of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    name String
    Name of the resource.
    identifier string
    Unique identifier of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    name string
    Name of the resource.
    identifier str
    Unique identifier of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    name str
    Name of the resource.
    identifier String
    Unique identifier of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    name String
    Name of the resource.

    getIacmAnsiblePlaybook Result

    The following output properties are available:

    AnsibleGalaxy bool
    Install Ansible Galaxy dependencies.
    AnsibleGalaxyRequirementsFile string
    Path to the Ansible Galaxy requirements file.
    Description string
    Description of the resource.
    EnvVars List<GetIacmAnsiblePlaybookEnvVar>
    Environment variables configured on the playbook.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Repository string
    Repository name for the playbook.
    RepositoryBranch string
    Repository branch for the playbook.
    RepositoryCommit string
    Repository commit or tag for the playbook.
    RepositoryConnector string
    Repository connector reference for the playbook.
    RepositoryPath string
    Path within the repository where the playbook resides.
    Tags List<string>
    Tags to associate with the resource.
    Vars List<GetIacmAnsiblePlaybookVar>
    Variables configured on the playbook.
    Name string
    Name of the resource.
    AnsibleGalaxy bool
    Install Ansible Galaxy dependencies.
    AnsibleGalaxyRequirementsFile string
    Path to the Ansible Galaxy requirements file.
    Description string
    Description of the resource.
    EnvVars []GetIacmAnsiblePlaybookEnvVar
    Environment variables configured on the playbook.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Repository string
    Repository name for the playbook.
    RepositoryBranch string
    Repository branch for the playbook.
    RepositoryCommit string
    Repository commit or tag for the playbook.
    RepositoryConnector string
    Repository connector reference for the playbook.
    RepositoryPath string
    Path within the repository where the playbook resides.
    Tags []string
    Tags to associate with the resource.
    Vars []GetIacmAnsiblePlaybookVar
    Variables configured on the playbook.
    Name string
    Name of the resource.
    ansible_galaxy bool
    Install Ansible Galaxy dependencies.
    ansible_galaxy_requirements_file string
    Path to the Ansible Galaxy requirements file.
    description string
    Description of the resource.
    env_vars list(object)
    Environment variables configured on the playbook.
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the resource.
    org_id string
    Unique identifier of the organization.
    project_id string
    Unique identifier of the project.
    repository string
    Repository name for the playbook.
    repository_branch string
    Repository branch for the playbook.
    repository_commit string
    Repository commit or tag for the playbook.
    repository_connector string
    Repository connector reference for the playbook.
    repository_path string
    Path within the repository where the playbook resides.
    tags list(string)
    Tags to associate with the resource.
    vars list(object)
    Variables configured on the playbook.
    name string
    Name of the resource.
    ansibleGalaxy Boolean
    Install Ansible Galaxy dependencies.
    ansibleGalaxyRequirementsFile String
    Path to the Ansible Galaxy requirements file.
    description String
    Description of the resource.
    envVars List<GetIacmAnsiblePlaybookEnvVar>
    Environment variables configured on the playbook.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    repository String
    Repository name for the playbook.
    repositoryBranch String
    Repository branch for the playbook.
    repositoryCommit String
    Repository commit or tag for the playbook.
    repositoryConnector String
    Repository connector reference for the playbook.
    repositoryPath String
    Path within the repository where the playbook resides.
    tags List<String>
    Tags to associate with the resource.
    vars List<GetIacmAnsiblePlaybookVar>
    Variables configured on the playbook.
    name String
    Name of the resource.
    ansibleGalaxy boolean
    Install Ansible Galaxy dependencies.
    ansibleGalaxyRequirementsFile string
    Path to the Ansible Galaxy requirements file.
    description string
    Description of the resource.
    envVars GetIacmAnsiblePlaybookEnvVar[]
    Environment variables configured on the playbook.
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    repository string
    Repository name for the playbook.
    repositoryBranch string
    Repository branch for the playbook.
    repositoryCommit string
    Repository commit or tag for the playbook.
    repositoryConnector string
    Repository connector reference for the playbook.
    repositoryPath string
    Path within the repository where the playbook resides.
    tags string[]
    Tags to associate with the resource.
    vars GetIacmAnsiblePlaybookVar[]
    Variables configured on the playbook.
    name string
    Name of the resource.
    ansible_galaxy bool
    Install Ansible Galaxy dependencies.
    ansible_galaxy_requirements_file str
    Path to the Ansible Galaxy requirements file.
    description str
    Description of the resource.
    env_vars Sequence[GetIacmAnsiblePlaybookEnvVar]
    Environment variables configured on the playbook.
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Unique identifier of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    repository str
    Repository name for the playbook.
    repository_branch str
    Repository branch for the playbook.
    repository_commit str
    Repository commit or tag for the playbook.
    repository_connector str
    Repository connector reference for the playbook.
    repository_path str
    Path within the repository where the playbook resides.
    tags Sequence[str]
    Tags to associate with the resource.
    vars Sequence[GetIacmAnsiblePlaybookVar]
    Variables configured on the playbook.
    name str
    Name of the resource.
    ansibleGalaxy Boolean
    Install Ansible Galaxy dependencies.
    ansibleGalaxyRequirementsFile String
    Path to the Ansible Galaxy requirements file.
    description String
    Description of the resource.
    envVars List<Property Map>
    Environment variables configured on the playbook.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    repository String
    Repository name for the playbook.
    repositoryBranch String
    Repository branch for the playbook.
    repositoryCommit String
    Repository commit or tag for the playbook.
    repositoryConnector String
    Repository connector reference for the playbook.
    repositoryPath String
    Path within the repository where the playbook resides.
    tags List<String>
    Tags to associate with the resource.
    vars List<Property Map>
    Variables configured on the playbook.
    name String
    Name of the resource.

    Supporting Types

    GetIacmAnsiblePlaybookEnvVar

    FileName string
    Filename to store the value in (used for file-backed variables).
    Key string
    Key is the identifier for the variable.
    Value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    ValueType string
    Value type. One of: string, secret.
    FileName string
    Filename to store the value in (used for file-backed variables).
    Key string
    Key is the identifier for the variable.
    Value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    ValueType string
    Value type. One of: string, secret.
    file_name string
    Filename to store the value in (used for file-backed variables).
    key string
    Key is the identifier for the variable.
    value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    value_type string
    Value type. One of: string, secret.
    fileName String
    Filename to store the value in (used for file-backed variables).
    key String
    Key is the identifier for the variable.
    value String
    Value of the variable. For secret value types this must be a Harness secret reference.
    valueType String
    Value type. One of: string, secret.
    fileName string
    Filename to store the value in (used for file-backed variables).
    key string
    Key is the identifier for the variable.
    value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    valueType string
    Value type. One of: string, secret.
    file_name str
    Filename to store the value in (used for file-backed variables).
    key str
    Key is the identifier for the variable.
    value str
    Value of the variable. For secret value types this must be a Harness secret reference.
    value_type str
    Value type. One of: string, secret.
    fileName String
    Filename to store the value in (used for file-backed variables).
    key String
    Key is the identifier for the variable.
    value String
    Value of the variable. For secret value types this must be a Harness secret reference.
    valueType String
    Value type. One of: string, secret.

    GetIacmAnsiblePlaybookVar

    FileName string
    Filename to store the value in (used for file-backed variables).
    Key string
    Key is the identifier for the variable.
    Value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    ValueType string
    Value type. One of: string, secret.
    FileName string
    Filename to store the value in (used for file-backed variables).
    Key string
    Key is the identifier for the variable.
    Value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    ValueType string
    Value type. One of: string, secret.
    file_name string
    Filename to store the value in (used for file-backed variables).
    key string
    Key is the identifier for the variable.
    value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    value_type string
    Value type. One of: string, secret.
    fileName String
    Filename to store the value in (used for file-backed variables).
    key String
    Key is the identifier for the variable.
    value String
    Value of the variable. For secret value types this must be a Harness secret reference.
    valueType String
    Value type. One of: string, secret.
    fileName string
    Filename to store the value in (used for file-backed variables).
    key string
    Key is the identifier for the variable.
    value string
    Value of the variable. For secret value types this must be a Harness secret reference.
    valueType string
    Value type. One of: string, secret.
    file_name str
    Filename to store the value in (used for file-backed variables).
    key str
    Key is the identifier for the variable.
    value str
    Value of the variable. For secret value types this must be a Harness secret reference.
    value_type str
    Value type. One of: string, secret.
    fileName String
    Filename to store the value in (used for file-backed variables).
    key String
    Key is the identifier for the variable.
    value String
    Value of the variable. For secret value types this must be a Harness secret reference.
    valueType String
    Value type. One of: string, secret.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.13.1
    published on Thursday, May 28, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial