awx.Inventory
Explore with Pulumi AI
TBD
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as awx from "@pulumi/awx";
const defaultOrganization = awx.getOrganization({
name: "Default",
});
const defaultInventory = new awx.Inventory("defaultInventory", {
organizationId: defaultOrganization.then(defaultOrganization => defaultOrganization.id),
variables: `---
system_supporters:
- pi
`,
});
import pulumi
import pulumi_awx as awx
default_organization = awx.get_organization(name="Default")
default_inventory = awx.Inventory("defaultInventory",
organization_id=default_organization.id,
variables="""---
system_supporters:
- pi
""")
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 {
defaultOrganization, err := awx.LookupOrganization(ctx, &awx.LookupOrganizationArgs{
Name: pulumi.StringRef("Default"),
}, nil)
if err != nil {
return err
}
_, err = awx.NewInventory(ctx, "defaultInventory", &awx.InventoryArgs{
OrganizationId: pulumi.Float64(defaultOrganization.Id),
Variables: pulumi.String("---\nsystem_supporters:\n - pi\n"),
})
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 defaultOrganization = Awx.GetOrganization.Invoke(new()
{
Name = "Default",
});
var defaultInventory = new Awx.Inventory("defaultInventory", new()
{
OrganizationId = defaultOrganization.Apply(getOrganizationResult => getOrganizationResult.Id),
Variables = @"---
system_supporters:
- pi
",
});
});
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.Inventory;
import com.pulumi.awx.InventoryArgs;
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 defaultOrganization = AwxFunctions.getOrganization(GetOrganizationArgs.builder()
.name("Default")
.build());
var defaultInventory = new Inventory("defaultInventory", InventoryArgs.builder()
.organizationId(defaultOrganization.applyValue(getOrganizationResult -> getOrganizationResult.id()))
.variables("""
---
system_supporters:
- pi
""")
.build());
}
}
resources:
defaultInventory:
type: awx:Inventory
properties:
organizationId: ${defaultOrganization.id}
variables: |
---
system_supporters:
- pi
variables:
defaultOrganization:
fn::invoke:
function: awx:getOrganization
arguments:
name: Default
Create Inventory Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Inventory(name: string, args: InventoryArgs, opts?: CustomResourceOptions);
@overload
def Inventory(resource_name: str,
args: InventoryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Inventory(resource_name: str,
opts: Optional[ResourceOptions] = None,
organization_id: Optional[str] = None,
description: Optional[str] = None,
host_filter: Optional[str] = None,
inventory_id: Optional[str] = None,
kind: Optional[str] = None,
name: Optional[str] = None,
variables: Optional[str] = None)
func NewInventory(ctx *Context, name string, args InventoryArgs, opts ...ResourceOption) (*Inventory, error)
public Inventory(string name, InventoryArgs args, CustomResourceOptions? opts = null)
public Inventory(String name, InventoryArgs args)
public Inventory(String name, InventoryArgs args, CustomResourceOptions options)
type: awx:Inventory
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 InventoryArgs
- 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 InventoryArgs
- 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 InventoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InventoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InventoryArgs
- 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 inventoryResource = new Awx.Inventory("inventoryResource", new()
{
OrganizationId = "string",
Description = "string",
HostFilter = "string",
InventoryId = "string",
Kind = "string",
Name = "string",
Variables = "string",
});
example, err := awx.NewInventory(ctx, "inventoryResource", &awx.InventoryArgs{
OrganizationId: pulumi.String("string"),
Description: pulumi.String("string"),
HostFilter: pulumi.String("string"),
InventoryId: pulumi.String("string"),
Kind: pulumi.String("string"),
Name: pulumi.String("string"),
Variables: pulumi.String("string"),
})
var inventoryResource = new Inventory("inventoryResource", InventoryArgs.builder()
.organizationId("string")
.description("string")
.hostFilter("string")
.inventoryId("string")
.kind("string")
.name("string")
.variables("string")
.build());
inventory_resource = awx.Inventory("inventoryResource",
organization_id="string",
description="string",
host_filter="string",
inventory_id="string",
kind="string",
name="string",
variables="string")
const inventoryResource = new awx.Inventory("inventoryResource", {
organizationId: "string",
description: "string",
hostFilter: "string",
inventoryId: "string",
kind: "string",
name: "string",
variables: "string",
});
type: awx:Inventory
properties:
description: string
hostFilter: string
inventoryId: string
kind: string
name: string
organizationId: string
variables: string
Inventory 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 Inventory resource accepts the following input properties:
- Organization
Id string - Description string
- Host
Filter string - Inventory
Id string - Kind string
- Name string
- Variables string
- Organization
Id string - Description string
- Host
Filter string - Inventory
Id string - Kind string
- Name string
- Variables string
- organization
Id String - description String
- host
Filter String - inventory
Id String - kind String
- name String
- variables String
- organization
Id string - description string
- host
Filter string - inventory
Id string - kind string
- name string
- variables string
- organization_
id str - description str
- host_
filter str - inventory_
id str - kind str
- name str
- variables str
- organization
Id String - description String
- host
Filter String - inventory
Id String - kind String
- name String
- variables String
Outputs
All input properties are implicitly available as output properties. Additionally, the Inventory 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 Inventory Resource
Get an existing Inventory 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?: InventoryState, opts?: CustomResourceOptions): Inventory
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
host_filter: Optional[str] = None,
inventory_id: Optional[str] = None,
kind: Optional[str] = None,
name: Optional[str] = None,
organization_id: Optional[str] = None,
variables: Optional[str] = None) -> Inventory
func GetInventory(ctx *Context, name string, id IDInput, state *InventoryState, opts ...ResourceOption) (*Inventory, error)
public static Inventory Get(string name, Input<string> id, InventoryState? state, CustomResourceOptions? opts = null)
public static Inventory get(String name, Output<String> id, InventoryState state, CustomResourceOptions options)
resources: _: type: awx:Inventory 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.
- Description string
- Host
Filter string - Inventory
Id string - Kind string
- Name string
- Organization
Id string - Variables string
- Description string
- Host
Filter string - Inventory
Id string - Kind string
- Name string
- Organization
Id string - Variables string
- description String
- host
Filter String - inventory
Id String - kind String
- name String
- organization
Id String - variables String
- description string
- host
Filter string - inventory
Id string - kind string
- name string
- organization
Id string - variables string
- description str
- host_
filter str - inventory_
id str - kind str
- name str
- organization_
id str - variables str
- description String
- host
Filter String - inventory
Id String - kind String
- name String
- organization
Id String - variables String
Package Details
- Repository
- awx denouche/terraform-provider-awx
- License
- Notes
- This Pulumi package is based on the
awx
Terraform Provider.