Create OtherResource Resource {#create}#
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax#
new OtherResource(name: string, args?: OtherResourceArgs, opts?: ComponentResourceOptions);@overload
def OtherResource(resource_name: str,
args: Optional[OtherResourceArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def OtherResource(resource_name: str,
opts: Optional[ResourceOptions] = None,
foo: Optional[Resource] = None)func NewOtherResource(ctx *Context, name string, args *OtherResourceArgs, opts ...ResourceOption) (*OtherResource, error)public OtherResource(string name, OtherResourceArgs? args = null, ComponentResourceOptions? opts = null)
public OtherResource(String name, OtherResourceArgs args)
public OtherResource(String name, OtherResourceArgs args, ComponentResourceOptions options)
type: example:OtherResource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "example_other_resource" "name" {
# resource properties
}Parameters#
- name string
- The unique name of the resource.
- args OtherResourceArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args OtherResourceArgs
- 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 OtherResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OtherResourceArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OtherResourceArgs
- The arguments to resource properties.
- options ComponentResourceOptions
- Bag of options to control resource's behavior.
Constructor example#
The following reference example uses placeholder values for all input properties.
var otherResourceResource = new Example.OtherResource("otherResourceResource", new()
{
Foo = resource,
});example, err := example.NewOtherResource(ctx, "otherResourceResource", &example.OtherResourceArgs{
Foo: pulumi.Any(resource),
})resource "example_other_resource" "otherResourceResource" {
lifecycle {
create_before_destroy = true
}
foo = resource
}var otherResourceResource = new OtherResource("otherResourceResource", OtherResourceArgs.builder()
.foo(resource)
.build());other_resource_resource = example.OtherResource("otherResourceResource", foo=resource)const otherResourceResource = new example.OtherResource("otherResourceResource", {foo: resource});type: example:OtherResource
properties:
foo: ${resource}OtherResource 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 OtherResource resource accepts the following input properties:
-
Foo
Pulumi.
Example. Resource
- Foo Resource
-
foo
example_
resource
- foo Resource
- foo Resource
- foo Resource
- foo example:Resource
Outputs#
All input properties are implicitly available as output properties. Additionally, the OtherResource resource produces the following output properties:
Package Details
- Repository
- example
- License