pulumi/tests/testdata/codegen/plain-object-disable-defaults/docs/moduletest/_index.md

40 KiB


title: "ModuleTest" title_tag: "example.ModuleTest" meta_desc: "Documentation for the example.ModuleTest resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true

Create ModuleTest Resource

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

Constructor syntax

new ModuleTest(name: string, args?: ModuleTestArgs, opts?: CustomResourceOptions);
@overload
def ModuleTest(resource_name: str,
               args: Optional[ModuleTestArgs] = None,
               opts: Optional[ResourceOptions] = None)

@overload
def ModuleTest(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               mod1: Optional[_mod1.TypArgs] = None,
               val: Optional[TypArgs] = None)
func NewModuleTest(ctx *Context, name string, args *ModuleTestArgs, opts ...ResourceOption) (*ModuleTest, error)
public ModuleTest(string name, ModuleTestArgs? args = null, CustomResourceOptions? opts = null)
public ModuleTest(String name, ModuleTestArgs args)
public ModuleTest(String name, ModuleTestArgs args, CustomResourceOptions options)
type: example:moduleTest
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 ModuleTestArgs
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 ModuleTestArgs
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 ModuleTestArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ModuleTestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ModuleTestArgs
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 moduleTestResource = new Example.ModuleTest("moduleTestResource", new()
{
    Mod1 = new Example.Mod1.Inputs.TypArgs
    {
        Val = "string",
    },
    Val = new Example.Inputs.TypArgs
    {
        Mod1 = new Example.Mod1.Inputs.TypArgs
        {
            Val = "string",
        },
        Mod2 = new Example.Mod2.Inputs.TypArgs
        {
            Mod1 = new Example.Mod1.Inputs.TypArgs
            {
                Val = "string",
            },
            Val = "string",
        },
        Val = "string",
    },
});
example, err := example.NewmoduleTest(ctx, "moduleTestResource", &example.moduleTestArgs{
Mod1: &mod1.TypArgs{
Val: pulumi.String("string"),
},
Val: &example.TypArgs{
Mod1: &mod1.TypArgs{
Val: pulumi.String("string"),
},
Mod2: &mod2.TypArgs{
Mod1: &mod1.TypArgs{
Val: pulumi.String("string"),
},
Val: pulumi.String("string"),
},
Val: pulumi.String("string"),
},
})
var moduleTestResource = new ModuleTest("moduleTestResource", ModuleTestArgs.builder()
    .mod1(TypArgs.builder()
        .val("string")
        .build())
    .val(TypArgs.builder()
        .mod1(TypArgs.builder()
            .val("string")
            .build())
        .mod2(TypArgs.builder()
            .mod1(TypArgs.builder()
                .val("string")
                .build())
            .val("string")
            .build())
        .val("string")
        .build())
    .build());
module_test_resource = example.ModuleTest("moduleTestResource",
    mod1={
        "val": "string",
    },
    val={
        "mod1": {
            "val": "string",
        },
        "mod2": {
            "mod1": {
                "val": "string",
            },
            "val": "string",
        },
        "val": "string",
    })
const moduleTestResource = new example.ModuleTest("moduleTestResource", {
    mod1: {
        val: "string",
    },
    val: {
        mod1: {
            val: "string",
        },
        mod2: {
            mod1: {
                val: "string",
            },
            val: "string",
        },
        val: "string",
    },
});
type: example:moduleTest
properties:
    mod1:
        val: string
    val:
        mod1:
            val: string
        mod2:
            mod1:
                val: string
            val: string
        val: string

ModuleTest 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 ModuleTest resource accepts the following input properties:

Outputs

All input properties are implicitly available as output properties. Additionally, the ModuleTest 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.

Supporting Types

Typ, TypArgs

Mod1 Typ
Mod2 Typ
Val string
mod1 Typ
mod2 Typ
val String

Typ, TypArgs

Val string
Val string
val String
val string
val str
val String

Typ, TypArgs

Mod1 Typ
Val string
mod1 Typ
val String
mod1 mod1Typ
val string

Package Details

Repository
example
License