1. Packages
  2. Awx Provider
  3. API Docs
  4. Project
awx 0.29.1 published on Monday, Apr 14, 2025 by denouche

awx.Project

Explore with Pulumi AI

awx logo
awx 0.29.1 published on Monday, Apr 14, 2025 by denouche

    TBD

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as awx from "@pulumi/awx";
    
    const _default = awx.getOrganization({
        name: "Default",
    });
    const baseServiceConfig = new awx.Project("baseServiceConfig", {
        scmType: "git",
        scmUrl: "https://github.com/nolte/ansible_playbook-baseline-online-server",
        scmBranch: "feature/centos8-v2",
        scmUpdateOnLaunch: true,
        organizationId: _default.then(_default => _default.id),
    });
    
    import pulumi
    import pulumi_awx as awx
    
    default = awx.get_organization(name="Default")
    base_service_config = awx.Project("baseServiceConfig",
        scm_type="git",
        scm_url="https://github.com/nolte/ansible_playbook-baseline-online-server",
        scm_branch="feature/centos8-v2",
        scm_update_on_launch=True,
        organization_id=default.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/awx/awx"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := awx.LookupOrganization(ctx, &awx.LookupOrganizationArgs{
    			Name: pulumi.StringRef("Default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = awx.NewProject(ctx, "baseServiceConfig", &awx.ProjectArgs{
    			ScmType:           pulumi.String("git"),
    			ScmUrl:            pulumi.String("https://github.com/nolte/ansible_playbook-baseline-online-server"),
    			ScmBranch:         pulumi.String("feature/centos8-v2"),
    			ScmUpdateOnLaunch: pulumi.Bool(true),
    			OrganizationId:    pulumi.Float64(_default.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Awx = Pulumi.Awx;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Awx.GetOrganization.Invoke(new()
        {
            Name = "Default",
        });
    
        var baseServiceConfig = new Awx.Project("baseServiceConfig", new()
        {
            ScmType = "git",
            ScmUrl = "https://github.com/nolte/ansible_playbook-baseline-online-server",
            ScmBranch = "feature/centos8-v2",
            ScmUpdateOnLaunch = true,
            OrganizationId = @default.Apply(@default => @default.Apply(getOrganizationResult => getOrganizationResult.Id)),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.awx.AwxFunctions;
    import com.pulumi.awx.inputs.GetOrganizationArgs;
    import com.pulumi.awx.Project;
    import com.pulumi.awx.ProjectArgs;
    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 default = AwxFunctions.getOrganization(GetOrganizationArgs.builder()
                .name("Default")
                .build());
    
            var baseServiceConfig = new Project("baseServiceConfig", ProjectArgs.builder()
                .scmType("git")
                .scmUrl("https://github.com/nolte/ansible_playbook-baseline-online-server")
                .scmBranch("feature/centos8-v2")
                .scmUpdateOnLaunch(true)
                .organizationId(default_.id())
                .build());
    
        }
    }
    
    resources:
      baseServiceConfig:
        type: awx:Project
        properties:
          scmType: git
          scmUrl: https://github.com/nolte/ansible_playbook-baseline-online-server
          scmBranch: feature/centos8-v2
          scmUpdateOnLaunch: true
          organizationId: ${default.id}
    variables:
      default:
        fn::invoke:
          function: awx:getOrganization
          arguments:
            name: Default
    

    Create Project Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Project(name: string, args: ProjectArgs, opts?: CustomResourceOptions);
    @overload
    def Project(resource_name: str,
                args: ProjectArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                organization_id: Optional[float] = None,
                scm_type: Optional[str] = None,
                scm_branch: Optional[str] = None,
                name: Optional[str] = None,
                local_path: Optional[str] = None,
                project_id: Optional[str] = None,
                allow_override: Optional[bool] = None,
                scm_clean: Optional[bool] = None,
                scm_credential_id: Optional[float] = None,
                scm_delete_on_update: Optional[bool] = None,
                description: Optional[str] = None,
                scm_update_cache_timeout: Optional[float] = None,
                scm_update_on_launch: Optional[bool] = None,
                scm_url: Optional[str] = None,
                timeouts: Optional[ProjectTimeoutsArgs] = None)
    func NewProject(ctx *Context, name string, args ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs args, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: awx:Project
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var projectResource = new Awx.Project("projectResource", new()
    {
        OrganizationId = 0,
        ScmType = "string",
        ScmBranch = "string",
        Name = "string",
        LocalPath = "string",
        ProjectId = "string",
        AllowOverride = false,
        ScmClean = false,
        ScmCredentialId = 0,
        ScmDeleteOnUpdate = false,
        Description = "string",
        ScmUpdateCacheTimeout = 0,
        ScmUpdateOnLaunch = false,
        ScmUrl = "string",
        Timeouts = new Awx.Inputs.ProjectTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := awx.NewProject(ctx, "projectResource", &awx.ProjectArgs{
    	OrganizationId:        pulumi.Float64(0),
    	ScmType:               pulumi.String("string"),
    	ScmBranch:             pulumi.String("string"),
    	Name:                  pulumi.String("string"),
    	LocalPath:             pulumi.String("string"),
    	ProjectId:             pulumi.String("string"),
    	AllowOverride:         pulumi.Bool(false),
    	ScmClean:              pulumi.Bool(false),
    	ScmCredentialId:       pulumi.Float64(0),
    	ScmDeleteOnUpdate:     pulumi.Bool(false),
    	Description:           pulumi.String("string"),
    	ScmUpdateCacheTimeout: pulumi.Float64(0),
    	ScmUpdateOnLaunch:     pulumi.Bool(false),
    	ScmUrl:                pulumi.String("string"),
    	Timeouts: &awx.ProjectTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var projectResource = new Project("projectResource", ProjectArgs.builder()
        .organizationId(0)
        .scmType("string")
        .scmBranch("string")
        .name("string")
        .localPath("string")
        .projectId("string")
        .allowOverride(false)
        .scmClean(false)
        .scmCredentialId(0)
        .scmDeleteOnUpdate(false)
        .description("string")
        .scmUpdateCacheTimeout(0)
        .scmUpdateOnLaunch(false)
        .scmUrl("string")
        .timeouts(ProjectTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    project_resource = awx.Project("projectResource",
        organization_id=0,
        scm_type="string",
        scm_branch="string",
        name="string",
        local_path="string",
        project_id="string",
        allow_override=False,
        scm_clean=False,
        scm_credential_id=0,
        scm_delete_on_update=False,
        description="string",
        scm_update_cache_timeout=0,
        scm_update_on_launch=False,
        scm_url="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const projectResource = new awx.Project("projectResource", {
        organizationId: 0,
        scmType: "string",
        scmBranch: "string",
        name: "string",
        localPath: "string",
        projectId: "string",
        allowOverride: false,
        scmClean: false,
        scmCredentialId: 0,
        scmDeleteOnUpdate: false,
        description: "string",
        scmUpdateCacheTimeout: 0,
        scmUpdateOnLaunch: false,
        scmUrl: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: awx:Project
    properties:
        allowOverride: false
        description: string
        localPath: string
        name: string
        organizationId: 0
        projectId: string
        scmBranch: string
        scmClean: false
        scmCredentialId: 0
        scmDeleteOnUpdate: false
        scmType: string
        scmUpdateCacheTimeout: 0
        scmUpdateOnLaunch: false
        scmUrl: string
        timeouts:
            create: string
            delete: string
            update: string
    

    Project Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Project resource accepts the following input properties:

    OrganizationId double
    Numeric ID of the project organization
    ScmType string
    One of "" (manual), git, hg, svn
    AllowOverride bool
    Allow SCM branch override
    Description string
    Optional description of this project.
    LocalPath string
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    Name string
    Name of this project
    ProjectId string
    ScmBranch string
    Specific branch, tag or commit to checkout.
    ScmClean bool
    ScmCredentialId double
    Numeric ID of the scm used credential
    ScmDeleteOnUpdate bool
    ScmUpdateCacheTimeout double
    ScmUpdateOnLaunch bool
    ScmUrl string
    Timeouts ProjectTimeouts
    OrganizationId float64
    Numeric ID of the project organization
    ScmType string
    One of "" (manual), git, hg, svn
    AllowOverride bool
    Allow SCM branch override
    Description string
    Optional description of this project.
    LocalPath string
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    Name string
    Name of this project
    ProjectId string
    ScmBranch string
    Specific branch, tag or commit to checkout.
    ScmClean bool
    ScmCredentialId float64
    Numeric ID of the scm used credential
    ScmDeleteOnUpdate bool
    ScmUpdateCacheTimeout float64
    ScmUpdateOnLaunch bool
    ScmUrl string
    Timeouts ProjectTimeoutsArgs
    organizationId Double
    Numeric ID of the project organization
    scmType String
    One of "" (manual), git, hg, svn
    allowOverride Boolean
    Allow SCM branch override
    description String
    Optional description of this project.
    localPath String
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name String
    Name of this project
    projectId String
    scmBranch String
    Specific branch, tag or commit to checkout.
    scmClean Boolean
    scmCredentialId Double
    Numeric ID of the scm used credential
    scmDeleteOnUpdate Boolean
    scmUpdateCacheTimeout Double
    scmUpdateOnLaunch Boolean
    scmUrl String
    timeouts ProjectTimeouts
    organizationId number
    Numeric ID of the project organization
    scmType string
    One of "" (manual), git, hg, svn
    allowOverride boolean
    Allow SCM branch override
    description string
    Optional description of this project.
    localPath string
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name string
    Name of this project
    projectId string
    scmBranch string
    Specific branch, tag or commit to checkout.
    scmClean boolean
    scmCredentialId number
    Numeric ID of the scm used credential
    scmDeleteOnUpdate boolean
    scmUpdateCacheTimeout number
    scmUpdateOnLaunch boolean
    scmUrl string
    timeouts ProjectTimeouts
    organization_id float
    Numeric ID of the project organization
    scm_type str
    One of "" (manual), git, hg, svn
    allow_override bool
    Allow SCM branch override
    description str
    Optional description of this project.
    local_path str
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name str
    Name of this project
    project_id str
    scm_branch str
    Specific branch, tag or commit to checkout.
    scm_clean bool
    scm_credential_id float
    Numeric ID of the scm used credential
    scm_delete_on_update bool
    scm_update_cache_timeout float
    scm_update_on_launch bool
    scm_url str
    timeouts ProjectTimeoutsArgs
    organizationId Number
    Numeric ID of the project organization
    scmType String
    One of "" (manual), git, hg, svn
    allowOverride Boolean
    Allow SCM branch override
    description String
    Optional description of this project.
    localPath String
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name String
    Name of this project
    projectId String
    scmBranch String
    Specific branch, tag or commit to checkout.
    scmClean Boolean
    scmCredentialId Number
    Numeric ID of the scm used credential
    scmDeleteOnUpdate Boolean
    scmUpdateCacheTimeout Number
    scmUpdateOnLaunch Boolean
    scmUrl String
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Project Resource

    Get an existing Project resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProjectState, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_override: Optional[bool] = None,
            description: Optional[str] = None,
            local_path: Optional[str] = None,
            name: Optional[str] = None,
            organization_id: Optional[float] = None,
            project_id: Optional[str] = None,
            scm_branch: Optional[str] = None,
            scm_clean: Optional[bool] = None,
            scm_credential_id: Optional[float] = None,
            scm_delete_on_update: Optional[bool] = None,
            scm_type: Optional[str] = None,
            scm_update_cache_timeout: Optional[float] = None,
            scm_update_on_launch: Optional[bool] = None,
            scm_url: Optional[str] = None,
            timeouts: Optional[ProjectTimeoutsArgs] = None) -> Project
    func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
    public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
    resources:  _:    type: awx:Project    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AllowOverride bool
    Allow SCM branch override
    Description string
    Optional description of this project.
    LocalPath string
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    Name string
    Name of this project
    OrganizationId double
    Numeric ID of the project organization
    ProjectId string
    ScmBranch string
    Specific branch, tag or commit to checkout.
    ScmClean bool
    ScmCredentialId double
    Numeric ID of the scm used credential
    ScmDeleteOnUpdate bool
    ScmType string
    One of "" (manual), git, hg, svn
    ScmUpdateCacheTimeout double
    ScmUpdateOnLaunch bool
    ScmUrl string
    Timeouts ProjectTimeouts
    AllowOverride bool
    Allow SCM branch override
    Description string
    Optional description of this project.
    LocalPath string
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    Name string
    Name of this project
    OrganizationId float64
    Numeric ID of the project organization
    ProjectId string
    ScmBranch string
    Specific branch, tag or commit to checkout.
    ScmClean bool
    ScmCredentialId float64
    Numeric ID of the scm used credential
    ScmDeleteOnUpdate bool
    ScmType string
    One of "" (manual), git, hg, svn
    ScmUpdateCacheTimeout float64
    ScmUpdateOnLaunch bool
    ScmUrl string
    Timeouts ProjectTimeoutsArgs
    allowOverride Boolean
    Allow SCM branch override
    description String
    Optional description of this project.
    localPath String
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name String
    Name of this project
    organizationId Double
    Numeric ID of the project organization
    projectId String
    scmBranch String
    Specific branch, tag or commit to checkout.
    scmClean Boolean
    scmCredentialId Double
    Numeric ID of the scm used credential
    scmDeleteOnUpdate Boolean
    scmType String
    One of "" (manual), git, hg, svn
    scmUpdateCacheTimeout Double
    scmUpdateOnLaunch Boolean
    scmUrl String
    timeouts ProjectTimeouts
    allowOverride boolean
    Allow SCM branch override
    description string
    Optional description of this project.
    localPath string
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name string
    Name of this project
    organizationId number
    Numeric ID of the project organization
    projectId string
    scmBranch string
    Specific branch, tag or commit to checkout.
    scmClean boolean
    scmCredentialId number
    Numeric ID of the scm used credential
    scmDeleteOnUpdate boolean
    scmType string
    One of "" (manual), git, hg, svn
    scmUpdateCacheTimeout number
    scmUpdateOnLaunch boolean
    scmUrl string
    timeouts ProjectTimeouts
    allow_override bool
    Allow SCM branch override
    description str
    Optional description of this project.
    local_path str
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name str
    Name of this project
    organization_id float
    Numeric ID of the project organization
    project_id str
    scm_branch str
    Specific branch, tag or commit to checkout.
    scm_clean bool
    scm_credential_id float
    Numeric ID of the scm used credential
    scm_delete_on_update bool
    scm_type str
    One of "" (manual), git, hg, svn
    scm_update_cache_timeout float
    scm_update_on_launch bool
    scm_url str
    timeouts ProjectTimeoutsArgs
    allowOverride Boolean
    Allow SCM branch override
    description String
    Optional description of this project.
    localPath String
    Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
    name String
    Name of this project
    organizationId Number
    Numeric ID of the project organization
    projectId String
    scmBranch String
    Specific branch, tag or commit to checkout.
    scmClean Boolean
    scmCredentialId Number
    Numeric ID of the scm used credential
    scmDeleteOnUpdate Boolean
    scmType String
    One of "" (manual), git, hg, svn
    scmUpdateCacheTimeout Number
    scmUpdateOnLaunch Boolean
    scmUrl String
    timeouts Property Map

    Supporting Types

    ProjectTimeouts, ProjectTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Package Details

    Repository
    awx denouche/terraform-provider-awx
    License
    Notes
    This Pulumi package is based on the awx Terraform Provider.
    awx logo
    awx 0.29.1 published on Monday, Apr 14, 2025 by denouche