Create ModuleTest Resource {#create}#
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.
resource "example_module_test" "name" {
# resource properties
}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"),
},
})resource "example_module_test" "moduleTestResource" {
lifecycle {
create_before_destroy = true
}
mod1 = {
val = "string"
}
val = {
mod1 = {
val = "string"
}
mod2 = {
mod1 = {
val = "string"
}
val = "string"
}
val = "string"
}
}var moduleTestResource = new ModuleTest("moduleTestResource", ModuleTestArgs.builder()
.mod1(com.pulumi.example.mod1.inputs.TypArgs.builder()
.val("string")
.build())
.val(com.pulumi.example.inputs.TypArgs.builder()
.mod1(com.pulumi.example.mod1.inputs.TypArgs.builder()
.val("string")
.build())
.mod2(com.pulumi.example.mod2.inputs.TypArgs.builder()
.mod1(com.pulumi.example.mod1.inputs.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: stringModuleTest Resource Properties {#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 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
A test for namespaces (mod main)
- mod1 Property Map
- mod2 Property Map
- val String
Typ, TypArgs
A test for namespaces (mod 1)
- Val string
- Val string
- val string
- val String
- val string
- val str
- val String
Typ, TypArgs
A test for namespaces (mod 2)
- mod1 Property Map
- val String
Package Details
- Repository
- example
- License