awx.Project
Explore with Pulumi AI
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:
- Organization
Id double - Numeric ID of the project organization
- Scm
Type string - One of "" (manual), git, hg, svn
- Allow
Override bool - Allow SCM branch override
- Description string
- Optional description of this project.
- Local
Path string - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- Name string
- Name of this project
- Project
Id string - Scm
Branch string - Specific branch, tag or commit to checkout.
- Scm
Clean bool - Scm
Credential doubleId - Numeric ID of the scm used credential
- Scm
Delete boolOn Update - Scm
Update doubleCache Timeout - Scm
Update boolOn Launch - Scm
Url string - Timeouts
Project
Timeouts
- Organization
Id float64 - Numeric ID of the project organization
- Scm
Type string - One of "" (manual), git, hg, svn
- Allow
Override bool - Allow SCM branch override
- Description string
- Optional description of this project.
- Local
Path string - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- Name string
- Name of this project
- Project
Id string - Scm
Branch string - Specific branch, tag or commit to checkout.
- Scm
Clean bool - Scm
Credential float64Id - Numeric ID of the scm used credential
- Scm
Delete boolOn Update - Scm
Update float64Cache Timeout - Scm
Update boolOn Launch - Scm
Url string - Timeouts
Project
Timeouts Args
- organization
Id Double - Numeric ID of the project organization
- scm
Type String - One of "" (manual), git, hg, svn
- allow
Override Boolean - Allow SCM branch override
- description String
- Optional description of this project.
- local
Path String - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- name String
- Name of this project
- project
Id String - scm
Branch String - Specific branch, tag or commit to checkout.
- scm
Clean Boolean - scm
Credential DoubleId - Numeric ID of the scm used credential
- scm
Delete BooleanOn Update - scm
Update DoubleCache Timeout - scm
Update BooleanOn Launch - scm
Url String - timeouts
Project
Timeouts
- organization
Id number - Numeric ID of the project organization
- scm
Type string - One of "" (manual), git, hg, svn
- allow
Override boolean - Allow SCM branch override
- description string
- Optional description of this project.
- local
Path string - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- name string
- Name of this project
- project
Id string - scm
Branch string - Specific branch, tag or commit to checkout.
- scm
Clean boolean - scm
Credential numberId - Numeric ID of the scm used credential
- scm
Delete booleanOn Update - scm
Update numberCache Timeout - scm
Update booleanOn Launch - scm
Url string - timeouts
Project
Timeouts
- 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_ floatid - Numeric ID of the scm used credential
- scm_
delete_ boolon_ update - scm_
update_ floatcache_ timeout - scm_
update_ boolon_ launch - scm_
url str - timeouts
Project
Timeouts Args
- organization
Id Number - Numeric ID of the project organization
- scm
Type String - One of "" (manual), git, hg, svn
- allow
Override Boolean - Allow SCM branch override
- description String
- Optional description of this project.
- local
Path String - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- name String
- Name of this project
- project
Id String - scm
Branch String - Specific branch, tag or commit to checkout.
- scm
Clean Boolean - scm
Credential NumberId - Numeric ID of the scm used credential
- scm
Delete BooleanOn Update - scm
Update NumberCache Timeout - scm
Update BooleanOn Launch - scm
Url 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.
- Allow
Override bool - Allow SCM branch override
- Description string
- Optional description of this project.
- Local
Path string - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- Name string
- Name of this project
- Organization
Id double - Numeric ID of the project organization
- Project
Id string - Scm
Branch string - Specific branch, tag or commit to checkout.
- Scm
Clean bool - Scm
Credential doubleId - Numeric ID of the scm used credential
- Scm
Delete boolOn Update - Scm
Type string - One of "" (manual), git, hg, svn
- Scm
Update doubleCache Timeout - Scm
Update boolOn Launch - Scm
Url string - Timeouts
Project
Timeouts
- Allow
Override bool - Allow SCM branch override
- Description string
- Optional description of this project.
- Local
Path string - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- Name string
- Name of this project
- Organization
Id float64 - Numeric ID of the project organization
- Project
Id string - Scm
Branch string - Specific branch, tag or commit to checkout.
- Scm
Clean bool - Scm
Credential float64Id - Numeric ID of the scm used credential
- Scm
Delete boolOn Update - Scm
Type string - One of "" (manual), git, hg, svn
- Scm
Update float64Cache Timeout - Scm
Update boolOn Launch - Scm
Url string - Timeouts
Project
Timeouts Args
- allow
Override Boolean - Allow SCM branch override
- description String
- Optional description of this project.
- local
Path String - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- name String
- Name of this project
- organization
Id Double - Numeric ID of the project organization
- project
Id String - scm
Branch String - Specific branch, tag or commit to checkout.
- scm
Clean Boolean - scm
Credential DoubleId - Numeric ID of the scm used credential
- scm
Delete BooleanOn Update - scm
Type String - One of "" (manual), git, hg, svn
- scm
Update DoubleCache Timeout - scm
Update BooleanOn Launch - scm
Url String - timeouts
Project
Timeouts
- allow
Override boolean - Allow SCM branch override
- description string
- Optional description of this project.
- local
Path string - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- name string
- Name of this project
- organization
Id number - Numeric ID of the project organization
- project
Id string - scm
Branch string - Specific branch, tag or commit to checkout.
- scm
Clean boolean - scm
Credential numberId - Numeric ID of the scm used credential
- scm
Delete booleanOn Update - scm
Type string - One of "" (manual), git, hg, svn
- scm
Update numberCache Timeout - scm
Update booleanOn Launch - scm
Url string - timeouts
Project
Timeouts
- 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_ floatid - Numeric ID of the scm used credential
- scm_
delete_ boolon_ update - scm_
type str - One of "" (manual), git, hg, svn
- scm_
update_ floatcache_ timeout - scm_
update_ boolon_ launch - scm_
url str - timeouts
Project
Timeouts Args
- allow
Override Boolean - Allow SCM branch override
- description String
- Optional description of this project.
- local
Path String - Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
- name String
- Name of this project
- organization
Id Number - Numeric ID of the project organization
- project
Id String - scm
Branch String - Specific branch, tag or commit to checkout.
- scm
Clean Boolean - scm
Credential NumberId - Numeric ID of the scm used credential
- scm
Delete BooleanOn Update - scm
Type String - One of "" (manual), git, hg, svn
- scm
Update NumberCache Timeout - scm
Update BooleanOn Launch - scm
Url String - timeouts Property Map
Supporting Types
ProjectTimeouts, ProjectTimeoutsArgs
Package Details
- Repository
- awx denouche/terraform-provider-awx
- License
- Notes
- This Pulumi package is based on the
awx
Terraform Provider.