Create Nursery Resource {#create}#

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

Constructor syntax#

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

@overload
def Nursery(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            varieties: Optional[Sequence[RubberTreeVariety]] = None,
            sizes: Optional[Mapping[str, TreeSize]] = None)
func NewNursery(ctx *Context, name string, args NurseryArgs, opts ...ResourceOption) (*Nursery, error)
public Nursery(string name, NurseryArgs args, CustomResourceOptions? opts = null)
public Nursery(String name, NurseryArgs args)
public Nursery(String name, NurseryArgs args, CustomResourceOptions options)
type: plant:tree/v1:Nursery
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

resource "plant_tree_v1_nursery" "name" {
    # resource properties
}

Parameters#

name string
The unique name of the resource.
args NurseryArgs
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 NurseryArgs
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 NurseryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args NurseryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args NurseryArgs
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 nurseryResource = new Plant.Tree.V1.Nursery("nurseryResource", new()
{
    Varieties = new[]
    {
        Plant.Tree.V1.RubberTreeVariety.Burgundy,
    },
    Sizes = 
    {
        { "string", Plant.Tree.V1.TreeSize.Small },
    },
});
example, err := v1.NewNursery(ctx, "nurseryResource", &v1.NurseryArgs{
	Varieties: treev1.RubberTreeVarietyArray{
		v1.RubberTreeVarietyBurgundy,
	},
	Sizes: treev1.TreeSizeMap{
		"string": v1.TreeSizeSmall,
	},
})
resource "plant_tree_v1_nursery" "nurseryResource" {
  lifecycle {
    create_before_destroy = true
  }
  varieties = ["Burgundy"]
  sizes = {
    "string" = "small"
  }
}
var nurseryResource = new Nursery("nurseryResource", NurseryArgs.builder()
    .varieties("Burgundy")
    .sizes(Map.of("string", "small"))
    .build());
nursery_resource = plant.tree.v1.Nursery("nurseryResource",
    varieties=[plant.tree.v1.RubberTreeVariety.BURGUNDY],
    sizes={
        "string": plant.tree.v1.TreeSize.SMALL,
    })
const nurseryResource = new plant.tree.v1.Nursery("nurseryResource", {
    varieties: [plant.tree.v1.RubberTreeVariety.Burgundy],
    sizes: {
        string: plant.tree.v1.TreeSize.Small,
    },
});
type: plant:tree/v1:Nursery
properties:
    sizes:
        string: small
    varieties:
        - Burgundy

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

Varieties List<Pulumi.Plant.Tree.V1.RubberTreeVariety>
The varieties available
Sizes Dictionary<string, Pulumi.Plant.Tree.V1.TreeSize>
The sizes of trees available
Varieties []RubberTreeVariety
The varieties available
Sizes map[string]TreeSize
The sizes of trees available
varieties list("Burgundy" | "Ruby" | "Tineke")
The varieties available
sizes map("small" | "medium" | "large")
The sizes of trees available
varieties List<RubberTreeVariety>
The varieties available
sizes Map<String,TreeSize>
The sizes of trees available
varieties RubberTreeVariety[]
The varieties available
sizes {[key: string]: TreeSize}
The sizes of trees available
varieties Sequence[RubberTreeVariety]
The varieties available
sizes Mapping[str, TreeSize]
The sizes of trees available
varieties List<"Burgundy" | "Ruby" | "Tineke">
The varieties available
sizes Map<"small" | "medium" | "large">
The sizes of trees available

Outputs#

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

RubberTreeVariety, RubberTreeVarietyArgs

Burgundy
Burgundy A burgundy rubber tree.
Ruby
Ruby A ruby rubber tree.
Tineke
Tineke A tineke rubber tree.
RubberTreeVarietyBurgundy
Burgundy A burgundy rubber tree.
RubberTreeVarietyRuby
Ruby A ruby rubber tree.
RubberTreeVarietyTineke
Tineke A tineke rubber tree.
"Burgundy"
Burgundy A burgundy rubber tree.
"Ruby"
Ruby A ruby rubber tree.
"Tineke"
Tineke A tineke rubber tree.
Burgundy
Burgundy A burgundy rubber tree.
Ruby
Ruby A ruby rubber tree.
Tineke
Tineke A tineke rubber tree.
Burgundy
Burgundy A burgundy rubber tree.
Ruby
Ruby A ruby rubber tree.
Tineke
Tineke A tineke rubber tree.
BURGUNDY
Burgundy A burgundy rubber tree.
RUBY
Ruby A ruby rubber tree.
TINEKE
Tineke A tineke rubber tree.
"Burgundy"
Burgundy A burgundy rubber tree.
"Ruby"
Ruby A ruby rubber tree.
"Tineke"
Tineke A tineke rubber tree.

TreeSize, TreeSizeArgs

Small
small
Medium
medium
Large
large
TreeSizeSmall
small
TreeSizeMedium
medium
TreeSizeLarge
large
"small"
small
"medium"
medium
"large"
large
Small
small
Medium
medium
Large
large
Small
small
Medium
medium
Large
large
SMALL
small
MEDIUM
medium
LARGE
large
"small"
small
"medium"
medium
"large"
large

Package Details

Repository
plant
License

Was this page helpful?