Accommodate - in base segments for baseImportPaths (#8190)

This commit is contained in:
Ian Wahbe 2021-10-12 09:13:13 -07:00 committed by GitHub
parent 28528ba26b
commit b978a9f2d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 6402 additions and 2 deletions

View file

@ -164,8 +164,9 @@ func (pkg *pkgContext) tokenToType(tok string) string {
if mod == "" {
mod = packageRoot(pkg.pkg)
}
mod = strings.Replace(mod, "/", "", -1) + "." + name
return strings.Replace(mod, "-provider", "", -1)
mod = strings.ReplaceAll(mod, "/", "")
mod = strings.ReplaceAll(mod, "-", "") + "." + name
return strings.ReplaceAll(mod, "-provider", "")
}
func (pkg *pkgContext) tokenToEnum(tok string) string {
@ -2520,6 +2521,7 @@ func (pkg *pkgContext) genResourceModule(w io.Writer) {
} else {
pkgName = basePath[strings.LastIndex(basePath, "/")+1:]
}
pkgName = strings.ReplaceAll(pkgName, "-", "")
fmt.Fprintf(w, "\tversion, err := %s.PkgVersion()\n", pkgName)
}
fmt.Fprintf(w, "\tif err != nil {\n")

View file

@ -178,6 +178,11 @@ var sdkTests = []sdkTest{
Description: "Test the fix for pulumi/pulumi#8110 nodejs compilation error",
Skip: codegen.NewStringSet("nodejs/test", "go/test", "python/test", "dotnet/test"),
},
{
Directory: "dashed-import-schema",
Description: "Ensure that we handle all valid go import paths",
Skip: codegen.NewStringSet("nodejs/test", "go/test", "python/test", "dotnet/test"),
},
}
var genSDKOnly bool

View file

@ -0,0 +1,34 @@
---
title: "plant"
title_tag: "plant Package"
meta_desc: ""
menu:
reference:
parent: API Reference
---
<!-- WARNING: this file was generated by test. -->
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
<h2 id="modules">Modules</h2>
<ul class="api">
<li><a href="tree/" title="tree"><span class="symbol module"></span>tree</a></li>
</ul>
<h2 id="resources">Resources</h2>
<ul class="api">
<li><a href="provider" title="Provider"><span class="symbol resource"></span>Provider</a></li>
</ul>
<h2 id="package-details">Package Details</h2>
<dl class="package-details">
<dt>Repository</dt>
<dd><a href=""></a></dd>
<dt>License</dt>
<dd></dd>
<dt>Version</dt>
<dd>0.0.1</dd>
</dl>

View file

@ -0,0 +1,10 @@
{
"emittedFiles": [
"_index.md",
"provider/_index.md",
"tree/_index.md",
"tree/v1/_index.md",
"tree/v1/nursery/_index.md",
"tree/v1/rubbertree/_index.md"
]
}

View file

@ -0,0 +1,239 @@
---
title: "Provider"
title_tag: "plant.Provider"
meta_desc: "Documentation for the plant.Provider resource with examples, input properties, output properties, lookup functions, and supporting types."
---
<!-- WARNING: this file was generated by test. -->
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
## Create a Provider Resource {#create}
{{< chooser language "typescript,python,go,csharp" / >}}
{{% choosable language nodejs %}}
<div class="highlight"><pre class="chroma"><code class="language-typescript" data-lang="typescript"><span class="k">new </span><span class="nx">Provider</span><span class="p">(</span><span class="nx">name</span><span class="p">:</span> <span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p">?:</span> <span class="nx"><a href="#inputs">ProviderArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p">?:</span> <span class="nx"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span><span class="p">);</span></code></pre></div>
{{% /choosable %}}
{{% choosable language python %}}
<div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"><span class=nd>@overload</span>
<span class="k">def </span><span class="nx">Provider</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">)</span>
<span class=nd>@overload</span>
<span class="k">def </span><span class="nx">Provider</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">args</span><span class="p">:</span> <span class="nx"><a href="#inputs">Optional[ProviderArgs]</a></span> = None<span class="p">,</span>
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language go %}}
<div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go"><span class="k">func </span><span class="nx">NewProvider</span><span class="p">(</span><span class="nx">ctx</span><span class="p"> *</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span><span class="p">,</span> <span class="nx">name</span><span class="p"> </span><span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p"> *</span><span class="nx"><a href="#inputs">ProviderArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p"> ...</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span><span class="p">) (*<span class="nx">Provider</span>, error)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language csharp %}}
<div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public </span><span class="nx">Provider</span><span class="p">(</span><span class="nx">string</span><span class="p"> </span><span class="nx">name<span class="p">,</span> <span class="nx"><a href="#inputs">ProviderArgs</a></span><span class="p">? </span><span class="nx">args = null<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span><span class="p">? </span><span class="nx">opts = null<span class="p">)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-optional" title="Optional">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">ProviderArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>resource_name</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-optional" title="Optional">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">ProviderArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">ResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt
class="property-optional" title="Optional">
<span>ctx</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span>
</dt>
<dd>Context object for the current deployment.</dd><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-optional" title="Optional">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">ProviderArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language csharp %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-optional" title="Optional">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">ProviderArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
## Provider Resource Properties {#properties}
To learn more about resource properties and how to use them, see [Inputs and Outputs]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) in the Architecture and Concepts docs.
### Inputs
The Provider resource accepts the following [input]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) properties:
{{% choosable language csharp %}}
<dl class="resources-properties"></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"></dl>
{{% /choosable %}}
### Outputs
All [input](#inputs) properties are implicitly available as output properties. Additionally, the Provider resource produces the following output properties:
{{% choosable language csharp %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_csharp">
<a href="#id_csharp" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_go">
<a href="#id_go" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_nodejs">
<a href="#id_nodejs" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_python">
<a href="#id_python" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
<h2 id="package-details">Package Details</h2>
<dl class="package-details">
<dt>Repository</dt>
<dd><a href=""></a></dd>
<dt>License</dt>
<dd></dd>
</dl>

View file

@ -0,0 +1,26 @@
---
title: "tree"
title_tag: "tree Package"
meta_desc: ""
---
<!-- WARNING: this file was generated by test. -->
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
<h2 id="modules">Modules</h2>
<ul class="api">
<li><a href="v1/" title="v1"><span class="symbol module"></span>v1</a></li>
</ul>
<h2 id="package-details">Package Details</h2>
<dl class="package-details">
<dt>Repository</dt>
<dd><a href=""></a></dd>
<dt>License</dt>
<dd></dd>
<dt>Version</dt>
<dd>0.0.1</dd>
</dl>

View file

@ -0,0 +1,27 @@
---
title: "tree/v1"
title_tag: "plant.tree/v1"
meta_desc: "Explore the resources and functions of the plant.tree/v1 module."
---
<!-- WARNING: this file was generated by test. -->
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
Explore the resources and functions of the plant.tree/v1 module.
<h2 id="resources">Resources</h2>
<ul class="api">
<li><a href="nursery" title="Nursery"><span class="symbol resource"></span>Nursery</a></li>
<li><a href="rubbertree" title="RubberTree"><span class="symbol resource"></span>RubberTree</a></li>
</ul>
<h2 id="package-details">Package Details</h2>
<dl class="package-details">
<dt>Repository</dt>
<dd><a href=""></a></dd>
<dt>License</dt>
<dd></dd>
<dt>Version</dt>
<dd>0.0.1</dd>
</dl>

View file

@ -0,0 +1,369 @@
---
title: "Nursery"
title_tag: "plant.tree/v1.Nursery"
meta_desc: "Documentation for the plant.tree/v1.Nursery resource with examples, input properties, output properties, lookup functions, and supporting types."
---
<!-- WARNING: this file was generated by test. -->
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
## Create a Nursery Resource {#create}
{{< chooser language "typescript,python,go,csharp" / >}}
{{% choosable language nodejs %}}
<div class="highlight"><pre class="chroma"><code class="language-typescript" data-lang="typescript"><span class="k">new </span><span class="nx">Nursery</span><span class="p">(</span><span class="nx">name</span><span class="p">:</span> <span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p">:</span> <span class="nx"><a href="#inputs">NurseryArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p">?:</span> <span class="nx"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span><span class="p">);</span></code></pre></div>
{{% /choosable %}}
{{% choosable language python %}}
<div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"><span class=nd>@overload</span>
<span class="k">def </span><span class="nx">Nursery</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">,</span>
<span class="nx">sizes</span><span class="p">:</span> <span class="nx">Optional[Mapping[str, TreeSize]]</span> = None<span class="p">,</span>
<span class="nx">varieties</span><span class="p">:</span> <span class="nx">Optional[Sequence[RubberTreeVariety]]</span> = None<span class="p">)</span>
<span class=nd>@overload</span>
<span class="k">def </span><span class="nx">Nursery</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">args</span><span class="p">:</span> <span class="nx"><a href="#inputs">NurseryArgs</a></span><span class="p">,</span>
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language go %}}
<div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go"><span class="k">func </span><span class="nx">NewNursery</span><span class="p">(</span><span class="nx">ctx</span><span class="p"> *</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span><span class="p">,</span> <span class="nx">name</span><span class="p"> </span><span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p"> </span><span class="nx"><a href="#inputs">NurseryArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p"> ...</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span><span class="p">) (*<span class="nx">Nursery</span>, error)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language csharp %}}
<div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public </span><span class="nx">Nursery</span><span class="p">(</span><span class="nx">string</span><span class="p"> </span><span class="nx">name<span class="p">,</span> <span class="nx"><a href="#inputs">NurseryArgs</a></span><span class="p"> </span><span class="nx">args<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span><span class="p">? </span><span class="nx">opts = null<span class="p">)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">NurseryArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>resource_name</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">NurseryArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">ResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt
class="property-optional" title="Optional">
<span>ctx</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span>
</dt>
<dd>Context object for the current deployment.</dd><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">NurseryArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language csharp %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">NurseryArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
## Nursery Resource Properties {#properties}
To learn more about resource properties and how to use them, see [Inputs and Outputs]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) in the Architecture and Concepts docs.
### Inputs
The Nursery resource accepts the following [input]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) properties:
{{% choosable language csharp %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="varieties_csharp">
<a href="#varieties_csharp" style="color: inherit; text-decoration: inherit;">Varieties</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">List&lt;Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Rubber<wbr>Tree<wbr>Variety&gt;</a></span>
</dt>
<dd>{{% md %}}The varieties available{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="sizes_csharp">
<a href="#sizes_csharp" style="color: inherit; text-decoration: inherit;">Sizes</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">Dictionary&lt;string, Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Tree<wbr>Size&gt;</span>
</dt>
<dd>{{% md %}}The sizes of trees available{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="varieties_go">
<a href="#varieties_go" style="color: inherit; text-decoration: inherit;">Varieties</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">[]Rubber<wbr>Tree<wbr>Variety</a></span>
</dt>
<dd>{{% md %}}The varieties available{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="sizes_go">
<a href="#sizes_go" style="color: inherit; text-decoration: inherit;">Sizes</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">map[string]Tree<wbr>Size</span>
</dt>
<dd>{{% md %}}The sizes of trees available{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="varieties_nodejs">
<a href="#varieties_nodejs" style="color: inherit; text-decoration: inherit;">varieties</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety[]</a></span>
</dt>
<dd>{{% md %}}The varieties available{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="sizes_nodejs">
<a href="#sizes_nodejs" style="color: inherit; text-decoration: inherit;">sizes</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">{[key: string]: Tree<wbr>Size}</span>
</dt>
<dd>{{% md %}}The sizes of trees available{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="varieties_python">
<a href="#varieties_python" style="color: inherit; text-decoration: inherit;">varieties</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">Sequence[Rubber<wbr>Tree<wbr>Variety]</a></span>
</dt>
<dd>{{% md %}}The varieties available{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="sizes_python">
<a href="#sizes_python" style="color: inherit; text-decoration: inherit;">sizes</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">Mapping[str, Tree<wbr>Size]</span>
</dt>
<dd>{{% md %}}The sizes of trees available{{% /md %}}</dd></dl>
{{% /choosable %}}
### Outputs
All [input](#inputs) properties are implicitly available as output properties. Additionally, the Nursery resource produces the following output properties:
{{% choosable language csharp %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_csharp">
<a href="#id_csharp" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_go">
<a href="#id_go" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_nodejs">
<a href="#id_nodejs" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_python">
<a href="#id_python" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
## Supporting Types
<h4 id="rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Burgundy</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>Ruby</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>Tineke</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Rubber<wbr>Tree<wbr>Variety<wbr>Burgundy</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>Rubber<wbr>Tree<wbr>Variety<wbr>Ruby</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>Rubber<wbr>Tree<wbr>Variety<wbr>Tineke</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Burgundy</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>Ruby</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>Tineke</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>BURGUNDY</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>RUBY</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>TINEKE</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
<h4 id="treesize">Tree<wbr>Size</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Small</dt>
<dd>small</dd><dt>Medium</dt>
<dd>medium</dd><dt>Large</dt>
<dd>large</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Tree<wbr>Size<wbr>Small</dt>
<dd>small</dd><dt>Tree<wbr>Size<wbr>Medium</dt>
<dd>medium</dd><dt>Tree<wbr>Size<wbr>Large</dt>
<dd>large</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Small</dt>
<dd>small</dd><dt>Medium</dt>
<dd>medium</dd><dt>Large</dt>
<dd>large</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>SMALL</dt>
<dd>small</dd><dt>MEDIUM</dt>
<dd>medium</dd><dt>LARGE</dt>
<dd>large</dd></dl>
{{% /choosable %}}
<h2 id="package-details">Package Details</h2>
<dl class="package-details">
<dt>Repository</dt>
<dd><a href=""></a></dd>
<dt>License</dt>
<dd></dd>
</dl>

View file

@ -0,0 +1,925 @@
---
title: "RubberTree"
title_tag: "plant.tree/v1.RubberTree"
meta_desc: "Documentation for the plant.tree/v1.RubberTree resource with examples, input properties, output properties, lookup functions, and supporting types."
---
<!-- WARNING: this file was generated by test. -->
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
## Create a RubberTree Resource {#create}
{{< chooser language "typescript,python,go,csharp" / >}}
{{% choosable language nodejs %}}
<div class="highlight"><pre class="chroma"><code class="language-typescript" data-lang="typescript"><span class="k">new </span><span class="nx">RubberTree</span><span class="p">(</span><span class="nx">name</span><span class="p">:</span> <span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p">:</span> <span class="nx"><a href="#inputs">RubberTreeArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p">?:</span> <span class="nx"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span><span class="p">);</span></code></pre></div>
{{% /choosable %}}
{{% choosable language python %}}
<div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"><span class=nd>@overload</span>
<span class="k">def </span><span class="nx">RubberTree</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">,</span>
<span class="nx">container</span><span class="p">:</span> <span class="nx">Optional[_root_inputs.ContainerArgs]</span> = None<span class="p">,</span>
<span class="nx">diameter</span><span class="p">:</span> <span class="nx">Optional[Diameter]</span> = None<span class="p">,</span>
<span class="nx">farm</span><span class="p">:</span> <span class="nx">Optional[Union[Farm, str]]</span> = None<span class="p">,</span>
<span class="nx">size</span><span class="p">:</span> <span class="nx">Optional[TreeSize]</span> = None<span class="p">,</span>
<span class="nx">type</span><span class="p">:</span> <span class="nx">Optional[RubberTreeVariety]</span> = None<span class="p">)</span>
<span class=nd>@overload</span>
<span class="k">def </span><span class="nx">RubberTree</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">args</span><span class="p">:</span> <span class="nx"><a href="#inputs">RubberTreeArgs</a></span><span class="p">,</span>
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language go %}}
<div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go"><span class="k">func </span><span class="nx">NewRubberTree</span><span class="p">(</span><span class="nx">ctx</span><span class="p"> *</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span><span class="p">,</span> <span class="nx">name</span><span class="p"> </span><span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p"> </span><span class="nx"><a href="#inputs">RubberTreeArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p"> ...</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span><span class="p">) (*<span class="nx">RubberTree</span>, error)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language csharp %}}
<div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public </span><span class="nx">RubberTree</span><span class="p">(</span><span class="nx">string</span><span class="p"> </span><span class="nx">name<span class="p">,</span> <span class="nx"><a href="#inputs">RubberTreeArgs</a></span><span class="p"> </span><span class="nx">args<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span><span class="p">? </span><span class="nx">opts = null<span class="p">)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">RubberTreeArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>resource_name</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">RubberTreeArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">ResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt
class="property-optional" title="Optional">
<span>ctx</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span>
</dt>
<dd>Context object for the current deployment.</dd><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">RubberTreeArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
{{% choosable language csharp %}}
<dl class="resources-properties"><dt
class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>The unique name of the resource.</dd><dt
class="property-required" title="Required">
<span>args</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#inputs">RubberTreeArgs</a></span>
</dt>
<dd>The arguments to resource properties.</dd><dt
class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span>
</dt>
<dd>Bag of options to control resource&#39;s behavior.</dd></dl>
{{% /choosable %}}
## RubberTree Resource Properties {#properties}
To learn more about resource properties and how to use them, see [Inputs and Outputs]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) in the Architecture and Concepts docs.
### Inputs
The RubberTree resource accepts the following [input]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) properties:
{{% choosable language csharp %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="diameter_csharp">
<a href="#diameter_csharp" style="color: inherit; text-decoration: inherit;">Diameter</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#diameter">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Diameter</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
title="Required">
<span id="type_csharp">
<a href="#type_csharp" style="color: inherit; text-decoration: inherit;">Type</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Rubber<wbr>Tree<wbr>Variety</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="container_csharp">
<a href="#container_csharp" style="color: inherit; text-decoration: inherit;">Container</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#container">Pulumi.<wbr>Plant.<wbr>Inputs.<wbr>Container<wbr>Args</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="farm_csharp">
<a href="#farm_csharp" style="color: inherit; text-decoration: inherit;">Farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Farm</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="size_csharp">
<a href="#size_csharp" style="color: inherit; text-decoration: inherit;">Size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#treesize">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Tree<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="diameter_go">
<a href="#diameter_go" style="color: inherit; text-decoration: inherit;">Diameter</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#diameter">Diameter</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
title="Required">
<span id="type_go">
<a href="#type_go" style="color: inherit; text-decoration: inherit;">Type</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="container_go">
<a href="#container_go" style="color: inherit; text-decoration: inherit;">Container</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#container">Container<wbr>Args</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="farm_go">
<a href="#farm_go" style="color: inherit; text-decoration: inherit;">Farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Farm</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="size_go">
<a href="#size_go" style="color: inherit; text-decoration: inherit;">Size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#treesize">Tree<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="diameter_nodejs">
<a href="#diameter_nodejs" style="color: inherit; text-decoration: inherit;">diameter</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#diameter">Diameter</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
title="Required">
<span id="type_nodejs">
<a href="#type_nodejs" style="color: inherit; text-decoration: inherit;">type</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="container_nodejs">
<a href="#container_nodejs" style="color: inherit; text-decoration: inherit;">container</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#container">Container<wbr>Args</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="farm_nodejs">
<a href="#farm_nodejs" style="color: inherit; text-decoration: inherit;">farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Farm</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="size_nodejs">
<a href="#size_nodejs" style="color: inherit; text-decoration: inherit;">size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#treesize">Tree<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="diameter_python">
<a href="#diameter_python" style="color: inherit; text-decoration: inherit;">diameter</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#diameter">Diameter</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
title="Required">
<span id="type_python">
<a href="#type_python" style="color: inherit; text-decoration: inherit;">type</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="container_python">
<a href="#container_python" style="color: inherit; text-decoration: inherit;">container</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#container">Container<wbr>Args</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="farm_python">
<a href="#farm_python" style="color: inherit; text-decoration: inherit;">farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Farm</a> | str</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="size_python">
<a href="#size_python" style="color: inherit; text-decoration: inherit;">size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#treesize">Tree<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
### Outputs
All [input](#inputs) properties are implicitly available as output properties. Additionally, the RubberTree resource produces the following output properties:
{{% choosable language csharp %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_csharp">
<a href="#id_csharp" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_go">
<a href="#id_go" style="color: inherit; text-decoration: inherit;">Id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_nodejs">
<a href="#id_nodejs" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt class="property-"
title="">
<span id="id_python">
<a href="#id_python" style="color: inherit; text-decoration: inherit;">id</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd>{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}</dd></dl>
{{% /choosable %}}
## Look up an Existing RubberTree Resource {#look-up}
Get an existing RubberTree resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
{{< chooser language "typescript,python,go,csharp" / >}}
{{% choosable language nodejs %}}
<div class="highlight"><pre class="chroma"><code class="language-typescript" data-lang="typescript"><span class="k">public static </span><span class="nf">get</span><span class="p">(</span><span class="nx">name</span><span class="p">:</span> <span class="nx">string</span><span class="p">,</span> <span class="nx">id</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#ID">Input&lt;ID&gt;</a></span><span class="p">,</span> <span class="nx">state</span><span class="p">?:</span> <span class="nx">RubberTreeState</span><span class="p">,</span> <span class="nx">opts</span><span class="p">?:</span> <span class="nx"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span><span class="p">): </span><span class="nx">RubberTree</span></code></pre></div>
{{% /choosable %}}
{{% choosable language python %}}
<div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"><span class=nd>@staticmethod</span>
<span class="k">def </span><span class="nf">get</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">id</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">,</span>
<span class="nx">farm</span><span class="p">:</span> <span class="nx">Optional[Union[Farm, str]]</span> = None<span class="p">) -&gt;</span> RubberTree</code></pre></div>
{{% /choosable %}}
{{% choosable language go %}}
<div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go"><span class="k">func </span>GetRubberTree<span class="p">(</span><span class="nx">ctx</span><span class="p"> *</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span><span class="p">,</span> <span class="nx">name</span><span class="p"> </span><span class="nx">string</span><span class="p">,</span> <span class="nx">id</span><span class="p"> </span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#IDInput">IDInput</a></span><span class="p">,</span> <span class="nx">state</span><span class="p"> *</span><span class="nx">RubberTreeState</span><span class="p">,</span> <span class="nx">opts</span><span class="p"> ...</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span><span class="p">) (*<span class="nx">RubberTree</span>, error)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language csharp %}}
<div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public static </span><span class="nx">RubberTree</span><span class="nf"> Get</span><span class="p">(</span><span class="nx">string</span><span class="p"> </span><span class="nx">name<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.Input-1.html">Input&lt;string&gt;</a></span><span class="p"> </span><span class="nx">id<span class="p">,</span> <span class="nx">RubberTreeState</span><span class="p">? </span><span class="nx">state<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span><span class="p">? </span><span class="nx">opts = null<span class="p">)</span></code></pre></div>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties">
<dt class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
</dt>
<dd>The unique name of the resulting resource.</dd>
<dt class="property-required" title="Required">
<span>id</span>
<span class="property-indicator"></span>
</dt>
<dd>The <em>unique</em> provider ID of the resource to lookup.</dd>
<dt class="property-optional" title="Optional">
<span>state</span>
<span class="property-indicator"></span>
</dt>
<dd>Any extra arguments used during the lookup.</dd>
<dt class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
</dt>
<dd>A bag of options that control this resource's behavior.</dd>
</dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties">
<dt class="property-required" title="Required">
<span>resource_name</span>
<span class="property-indicator"></span>
</dt>
<dd>The unique name of the resulting resource.</dd>
<dt class="property-required" title="Optional">
<span>id</span>
<span class="property-indicator"></span>
</dt>
<dd>The <em>unique</em> provider ID of the resource to lookup.</dd>
</dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties">
<dt class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
</dt>
<dd>The unique name of the resulting resource.</dd>
<dt class="property-required" title="Required">
<span>id</span>
<span class="property-indicator"></span>
</dt>
<dd>The <em>unique</em> provider ID of the resource to lookup.</dd>
<dt class="property-optional" title="Optional">
<span>state</span>
<span class="property-indicator"></span>
</dt>
<dd>Any extra arguments used during the lookup.</dd>
<dt class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
</dt>
<dd>A bag of options that control this resource's behavior.</dd>
</dl>
{{% /choosable %}}
{{% choosable language csharp %}}
<dl class="resources-properties">
<dt class="property-required" title="Required">
<span>name</span>
<span class="property-indicator"></span>
</dt>
<dd>The unique name of the resulting resource.</dd>
<dt class="property-required" title="Required">
<span>id</span>
<span class="property-indicator"></span>
</dt>
<dd>The <em>unique</em> provider ID of the resource to lookup.</dd>
<dt class="property-optional" title="Optional">
<span>state</span>
<span class="property-indicator"></span>
</dt>
<dd>Any extra arguments used during the lookup.</dd>
<dt class="property-optional" title="Optional">
<span>opts</span>
<span class="property-indicator"></span>
</dt>
<dd>A bag of options that control this resource's behavior.</dd>
</dl>
{{% /choosable %}}
The following state arguments are supported:
{{% choosable language csharp %}}
<dl class="resources-properties"><dt class="property-optional"
title="Optional">
<span id="state_farm_csharp">
<a href="#state_farm_csharp" style="color: inherit; text-decoration: inherit;">Farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Farm</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt class="property-optional"
title="Optional">
<span id="state_farm_go">
<a href="#state_farm_go" style="color: inherit; text-decoration: inherit;">Farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Farm</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt class="property-optional"
title="Optional">
<span id="state_farm_nodejs">
<a href="#state_farm_nodejs" style="color: inherit; text-decoration: inherit;">farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Farm</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt class="property-optional"
title="Optional">
<span id="state_farm_python">
<a href="#state_farm_python" style="color: inherit; text-decoration: inherit;">farm</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#farm">Farm</a> | str</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
## Supporting Types
<h4 id="container">Container</h4>
{{% choosable language csharp %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="size_csharp">
<a href="#size_csharp" style="color: inherit; text-decoration: inherit;">Size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containersize">Pulumi.<wbr>Plant.<wbr>Container<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="brightness_csharp">
<a href="#brightness_csharp" style="color: inherit; text-decoration: inherit;">Brightness</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containerbrightness">Pulumi.<wbr>Plant.<wbr>Container<wbr>Brightness</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="color_csharp">
<a href="#color_csharp" style="color: inherit; text-decoration: inherit;">Color</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containercolor">Pulumi.<wbr>Plant.<wbr>Container<wbr>Color</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="material_csharp">
<a href="#material_csharp" style="color: inherit; text-decoration: inherit;">Material</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="size_go">
<a href="#size_go" style="color: inherit; text-decoration: inherit;">Size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containersize">Container<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="brightness_go">
<a href="#brightness_go" style="color: inherit; text-decoration: inherit;">Brightness</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containerbrightness">Container<wbr>Brightness</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="color_go">
<a href="#color_go" style="color: inherit; text-decoration: inherit;">Color</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containercolor">Container<wbr>Color</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="material_go">
<a href="#material_go" style="color: inherit; text-decoration: inherit;">Material</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="size_nodejs">
<a href="#size_nodejs" style="color: inherit; text-decoration: inherit;">size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containersize">Container<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="brightness_nodejs">
<a href="#brightness_nodejs" style="color: inherit; text-decoration: inherit;">brightness</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containerbrightness">Container<wbr>Brightness</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="color_nodejs">
<a href="#color_nodejs" style="color: inherit; text-decoration: inherit;">color</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containercolor">Container<wbr>Color</a> | string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="material_nodejs">
<a href="#material_nodejs" style="color: inherit; text-decoration: inherit;">material</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">string</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="resources-properties"><dt class="property-required"
title="Required">
<span id="size_python">
<a href="#size_python" style="color: inherit; text-decoration: inherit;">size</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containersize">Container<wbr>Size</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="brightness_python">
<a href="#brightness_python" style="color: inherit; text-decoration: inherit;">brightness</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containerbrightness">Container<wbr>Brightness</a></span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="color_python">
<a href="#color_python" style="color: inherit; text-decoration: inherit;">color</a>
</span>
<span class="property-indicator"></span>
<span class="property-type"><a href="#containercolor">Container<wbr>Color</a> | str</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
title="Optional">
<span id="material_python">
<a href="#material_python" style="color: inherit; text-decoration: inherit;">material</a>
</span>
<span class="property-indicator"></span>
<span class="property-type">str</span>
</dt>
<dd>{{% md %}}{{% /md %}}</dd></dl>
{{% /choosable %}}
<h4 id="containerbrightness">Container<wbr>Brightness</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Zero<wbr>Point<wbr>One</dt>
<dd>0.1</dd><dt>One</dt>
<dd>1</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Container<wbr>Brightness<wbr>Zero<wbr>Point<wbr>One</dt>
<dd>0.1</dd><dt>Container<wbr>Brightness<wbr>One</dt>
<dd>1</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Zero<wbr>Point<wbr>One</dt>
<dd>0.1</dd><dt>One</dt>
<dd>1</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>ZERO_POINT_ONE</dt>
<dd>0.1</dd><dt>ONE</dt>
<dd>1</dd></dl>
{{% /choosable %}}
<h4 id="containercolor">Container<wbr>Color</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Red</dt>
<dd>red</dd><dt>Blue</dt>
<dd>blue</dd><dt>Yellow</dt>
<dd>yellow</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Container<wbr>Color<wbr>Red</dt>
<dd>red</dd><dt>Container<wbr>Color<wbr>Blue</dt>
<dd>blue</dd><dt>Container<wbr>Color<wbr>Yellow</dt>
<dd>yellow</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Red</dt>
<dd>red</dd><dt>Blue</dt>
<dd>blue</dd><dt>Yellow</dt>
<dd>yellow</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>RED</dt>
<dd>red</dd><dt>BLUE</dt>
<dd>blue</dd><dt>YELLOW</dt>
<dd>yellow</dd></dl>
{{% /choosable %}}
<h4 id="containersize">Container<wbr>Size</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Four<wbr>Inch</dt>
<dd>4</dd><dt>Six<wbr>Inch</dt>
<dd>6</dd><dt>Eight<wbr>Inch</dt>
<dd>8<p class="property-message">Deprecated: {{% md %}}Eight inch pots are no longer supported.{{% /md %}}</p></dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Container<wbr>Size<wbr>Four<wbr>Inch</dt>
<dd>4</dd><dt>Container<wbr>Size<wbr>Six<wbr>Inch</dt>
<dd>6</dd><dt>Container<wbr>Size<wbr>Eight<wbr>Inch</dt>
<dd>8<p class="property-message">Deprecated: {{% md %}}Eight inch pots are no longer supported.{{% /md %}}</p></dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Four<wbr>Inch</dt>
<dd>4</dd><dt>Six<wbr>Inch</dt>
<dd>6</dd><dt>Eight<wbr>Inch</dt>
<dd>8<p class="property-message">Deprecated: {{% md %}}Eight inch pots are no longer supported.{{% /md %}}</p></dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>FOUR_INCH</dt>
<dd>4</dd><dt>SIX_INCH</dt>
<dd>6</dd><dt>EIGHT_INCH</dt>
<dd>8<p class="property-message">Deprecated: {{% md %}}Eight inch pots are no longer supported.{{% /md %}}</p></dd></dl>
{{% /choosable %}}
<h4 id="diameter">Diameter</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Sixinch</dt>
<dd>6</dd><dt>Twelveinch</dt>
<dd>12</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Diameter<wbr>Sixinch</dt>
<dd>6</dd><dt>Diameter<wbr>Twelveinch</dt>
<dd>12</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Sixinch</dt>
<dd>6</dd><dt>Twelveinch</dt>
<dd>12</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>SIXINCH</dt>
<dd>6</dd><dt>TWELVEINCH</dt>
<dd>12</dd></dl>
{{% /choosable %}}
<h4 id="farm">Farm</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Pulumi_Planters_Inc_</dt>
<dd>Pulumi Planters Inc.</dd><dt>Plants_R_Us</dt>
<dd>Plants'R'Us</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Farm_Pulumi_Planters_Inc_</dt>
<dd>Pulumi Planters Inc.</dd><dt>Farm_Plants_R_Us</dt>
<dd>Plants'R'Us</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Pulumi_Planters_Inc_</dt>
<dd>Pulumi Planters Inc.</dd><dt>Plants_R_Us</dt>
<dd>Plants'R'Us</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>PULUMI_PLANTERS_INC_</dt>
<dd>Pulumi Planters Inc.</dd><dt>PLANTS_R_US</dt>
<dd>Plants'R'Us</dd></dl>
{{% /choosable %}}
<h4 id="rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Burgundy</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>Ruby</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>Tineke</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Rubber<wbr>Tree<wbr>Variety<wbr>Burgundy</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>Rubber<wbr>Tree<wbr>Variety<wbr>Ruby</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>Rubber<wbr>Tree<wbr>Variety<wbr>Tineke</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Burgundy</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>Ruby</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>Tineke</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>BURGUNDY</dt>
<dd>Burgundy{{% md %}}A burgundy rubber tree.{{% /md %}}</dd><dt>RUBY</dt>
<dd>Ruby{{% md %}}A ruby rubber tree.{{% /md %}}</dd><dt>TINEKE</dt>
<dd>Tineke{{% md %}}A tineke rubber tree.{{% /md %}}</dd></dl>
{{% /choosable %}}
<h4 id="treesize">Tree<wbr>Size</h4>
{{% choosable language csharp %}}
<dl class="tabular"><dt>Small</dt>
<dd>small</dd><dt>Medium</dt>
<dd>medium</dd><dt>Large</dt>
<dd>large</dd></dl>
{{% /choosable %}}
{{% choosable language go %}}
<dl class="tabular"><dt>Tree<wbr>Size<wbr>Small</dt>
<dd>small</dd><dt>Tree<wbr>Size<wbr>Medium</dt>
<dd>medium</dd><dt>Tree<wbr>Size<wbr>Large</dt>
<dd>large</dd></dl>
{{% /choosable %}}
{{% choosable language nodejs %}}
<dl class="tabular"><dt>Small</dt>
<dd>small</dd><dt>Medium</dt>
<dd>medium</dd><dt>Large</dt>
<dd>large</dd></dl>
{{% /choosable %}}
{{% choosable language python %}}
<dl class="tabular"><dt>SMALL</dt>
<dd>small</dd><dt>MEDIUM</dt>
<dd>medium</dd><dt>LARGE</dt>
<dd>large</dd></dl>
{{% /choosable %}}
<h2 id="package-details">Package Details</h2>
<dl class="package-details">
<dt>Repository</dt>
<dd><a href=""></a></dd>
<dt>License</dt>
<dd></dd>
</dl>

View file

@ -0,0 +1,125 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.ComponentModel;
using Pulumi;
namespace Pulumi.Plant
{
/// <summary>
/// The log_name to populate in the Cloud Audit Record. This is added to regress pulumi/pulumi issue #7913
/// </summary>
[EnumType]
public readonly struct CloudAuditOptionsLogName : IEquatable<CloudAuditOptionsLogName>
{
private readonly string _value;
private CloudAuditOptionsLogName(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
/// <summary>
/// Default. Should not be used.
/// </summary>
public static CloudAuditOptionsLogName UnspecifiedLogName { get; } = new CloudAuditOptionsLogName("UNSPECIFIED_LOG_NAME");
/// <summary>
/// Corresponds to "cloudaudit.googleapis.com/activity"
/// </summary>
public static CloudAuditOptionsLogName AdminActivity { get; } = new CloudAuditOptionsLogName("ADMIN_ACTIVITY");
/// <summary>
/// Corresponds to "cloudaudit.googleapis.com/data_access"
/// </summary>
public static CloudAuditOptionsLogName DataAccess { get; } = new CloudAuditOptionsLogName("DATA_ACCESS");
/// <summary>
/// What if triple quotes """ are used in the description
/// </summary>
public static CloudAuditOptionsLogName Synthetic { get; } = new CloudAuditOptionsLogName("SYNTHETIC");
public static bool operator ==(CloudAuditOptionsLogName left, CloudAuditOptionsLogName right) => left.Equals(right);
public static bool operator !=(CloudAuditOptionsLogName left, CloudAuditOptionsLogName right) => !left.Equals(right);
public static explicit operator string(CloudAuditOptionsLogName value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is CloudAuditOptionsLogName other && Equals(other);
public bool Equals(CloudAuditOptionsLogName other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
[EnumType]
public readonly struct ContainerBrightness : IEquatable<ContainerBrightness>
{
private readonly double _value;
private ContainerBrightness(double value)
{
_value = value;
}
public static ContainerBrightness ZeroPointOne { get; } = new ContainerBrightness(0.1);
public static ContainerBrightness One { get; } = new ContainerBrightness(1);
public static bool operator ==(ContainerBrightness left, ContainerBrightness right) => left.Equals(right);
public static bool operator !=(ContainerBrightness left, ContainerBrightness right) => !left.Equals(right);
public static explicit operator double(ContainerBrightness value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is ContainerBrightness other && Equals(other);
public bool Equals(ContainerBrightness other) => _value == other._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value.GetHashCode();
public override string ToString() => _value.ToString();
}
/// <summary>
/// plant container colors
/// </summary>
[EnumType]
public readonly struct ContainerColor : IEquatable<ContainerColor>
{
private readonly string _value;
private ContainerColor(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
public static ContainerColor Red { get; } = new ContainerColor("red");
public static ContainerColor Blue { get; } = new ContainerColor("blue");
public static ContainerColor Yellow { get; } = new ContainerColor("yellow");
public static bool operator ==(ContainerColor left, ContainerColor right) => left.Equals(right);
public static bool operator !=(ContainerColor left, ContainerColor right) => !left.Equals(right);
public static explicit operator string(ContainerColor value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is ContainerColor other && Equals(other);
public bool Equals(ContainerColor other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
/// <summary>
/// plant container sizes
/// </summary>
public enum ContainerSize
{
FourInch = 4,
SixInch = 6,
[Obsolete(@"Eight inch pots are no longer supported.")]
EightInch = 8,
}
}

View file

@ -0,0 +1,32 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Plant.Inputs
{
public sealed class ContainerArgs : Pulumi.ResourceArgs
{
[Input("brightness")]
public Input<Pulumi.Plant.ContainerBrightness>? Brightness { get; set; }
[Input("color")]
public InputUnion<Pulumi.Plant.ContainerColor, string>? Color { get; set; }
[Input("material")]
public Input<string>? Material { get; set; }
[Input("size", required: true)]
public Input<Pulumi.Plant.ContainerSize> Size { get; set; } = null!;
public ContainerArgs()
{
Brightness = Pulumi.Plant.ContainerBrightness.One;
}
}
}

View file

@ -0,0 +1,37 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Plant.Outputs
{
[OutputType]
public sealed class Container
{
public readonly Pulumi.Plant.ContainerBrightness? Brightness;
public readonly string? Color;
public readonly string? Material;
public readonly Pulumi.Plant.ContainerSize Size;
[OutputConstructor]
private Container(
Pulumi.Plant.ContainerBrightness? brightness,
string? color,
string? material,
Pulumi.Plant.ContainerSize size)
{
Brightness = brightness;
Color = color;
Material = material;
Size = size;
}
}
}

View file

@ -0,0 +1,46 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Plant
{
[PlantResourceType("pulumi:providers:plant")]
public partial class Provider : Pulumi.ProviderResource
{
/// <summary>
/// Create a Provider resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null)
: base("plant", name, args ?? new ProviderArgs(), MakeResourceOptions(options, ""))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
}
public sealed class ProviderArgs : Pulumi.ResourceArgs
{
public ProviderArgs()
{
}
}
}

View file

@ -0,0 +1,53 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Pulumi Corp.</Authors>
<Company>Pulumi Corp.</Company>
<Description></Description>
<PackageLicenseExpression></PackageLicenseExpression>
<PackageProjectUrl></PackageProjectUrl>
<RepositoryUrl></RepositoryUrl>
<PackageIcon>logo.png</PackageIcon>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Nullable>enable</Nullable>
<UseSharedCompilation>false</UseSharedCompilation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="version.txt" />
<None Include="version.txt" Pack="True" PackagePath="content" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Pulumi" Version="3.12" />
</ItemGroup>
<ItemGroup>
<None Include="logo.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>

View file

@ -0,0 +1,135 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.ComponentModel;
using Pulumi;
namespace Pulumi.Plant.Tree.V1
{
[EnumType]
public readonly struct Diameter : IEquatable<Diameter>
{
private readonly double _value;
private Diameter(double value)
{
_value = value;
}
public static Diameter Sixinch { get; } = new Diameter(6);
public static Diameter Twelveinch { get; } = new Diameter(12);
public static bool operator ==(Diameter left, Diameter right) => left.Equals(right);
public static bool operator !=(Diameter left, Diameter right) => !left.Equals(right);
public static explicit operator double(Diameter value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is Diameter other && Equals(other);
public bool Equals(Diameter other) => _value == other._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value.GetHashCode();
public override string ToString() => _value.ToString();
}
[EnumType]
public readonly struct Farm : IEquatable<Farm>
{
private readonly string _value;
private Farm(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
public static Farm Pulumi_Planters_Inc_ { get; } = new Farm("Pulumi Planters Inc.");
public static Farm Plants_R_Us { get; } = new Farm("Plants'R'Us");
public static bool operator ==(Farm left, Farm right) => left.Equals(right);
public static bool operator !=(Farm left, Farm right) => !left.Equals(right);
public static explicit operator string(Farm value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is Farm other && Equals(other);
public bool Equals(Farm other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
/// <summary>
/// types of rubber trees
/// </summary>
[EnumType]
public readonly struct RubberTreeVariety : IEquatable<RubberTreeVariety>
{
private readonly string _value;
private RubberTreeVariety(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
/// <summary>
/// A burgundy rubber tree.
/// </summary>
public static RubberTreeVariety Burgundy { get; } = new RubberTreeVariety("Burgundy");
/// <summary>
/// A ruby rubber tree.
/// </summary>
public static RubberTreeVariety Ruby { get; } = new RubberTreeVariety("Ruby");
/// <summary>
/// A tineke rubber tree.
/// </summary>
public static RubberTreeVariety Tineke { get; } = new RubberTreeVariety("Tineke");
public static bool operator ==(RubberTreeVariety left, RubberTreeVariety right) => left.Equals(right);
public static bool operator !=(RubberTreeVariety left, RubberTreeVariety right) => !left.Equals(right);
public static explicit operator string(RubberTreeVariety value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is RubberTreeVariety other && Equals(other);
public bool Equals(RubberTreeVariety other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
[EnumType]
public readonly struct TreeSize : IEquatable<TreeSize>
{
private readonly string _value;
private TreeSize(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
public static TreeSize Small { get; } = new TreeSize("small");
public static TreeSize Medium { get; } = new TreeSize("medium");
public static TreeSize Large { get; } = new TreeSize("large");
public static bool operator ==(TreeSize left, TreeSize right) => left.Equals(right);
public static bool operator !=(TreeSize left, TreeSize right) => !left.Equals(right);
public static explicit operator string(TreeSize value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is TreeSize other && Equals(other);
public bool Equals(TreeSize other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
}

View file

@ -0,0 +1,87 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Plant.Tree.V1
{
[PlantResourceType("plant:tree/v1:Nursery")]
public partial class Nursery : Pulumi.CustomResource
{
/// <summary>
/// Create a Nursery resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public Nursery(string name, NurseryArgs args, CustomResourceOptions? options = null)
: base("plant:tree/v1:Nursery", name, args ?? new NurseryArgs(), MakeResourceOptions(options, ""))
{
}
private Nursery(string name, Input<string> id, CustomResourceOptions? options = null)
: base("plant:tree/v1:Nursery", name, null, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing Nursery resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static Nursery Get(string name, Input<string> id, CustomResourceOptions? options = null)
{
return new Nursery(name, id, options);
}
}
public sealed class NurseryArgs : Pulumi.ResourceArgs
{
[Input("sizes")]
private InputMap<Pulumi.Plant.Tree.V1.TreeSize>? _sizes;
/// <summary>
/// The sizes of trees available
/// </summary>
public InputMap<Pulumi.Plant.Tree.V1.TreeSize> Sizes
{
get => _sizes ?? (_sizes = new InputMap<Pulumi.Plant.Tree.V1.TreeSize>());
set => _sizes = value;
}
[Input("varieties", required: true)]
private InputList<Pulumi.Plant.Tree.V1.RubberTreeVariety>? _varieties;
/// <summary>
/// The varieties available
/// </summary>
public InputList<Pulumi.Plant.Tree.V1.RubberTreeVariety> Varieties
{
get => _varieties ?? (_varieties = new InputList<Pulumi.Plant.Tree.V1.RubberTreeVariety>());
set => _varieties = value;
}
public NurseryArgs()
{
}
}
}

View file

@ -0,0 +1,110 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Plant.Tree.V1
{
[PlantResourceType("plant:tree/v1:RubberTree")]
public partial class RubberTree : Pulumi.CustomResource
{
[Output("container")]
public Output<Pulumi.Plant.Outputs.Container?> Container { get; private set; } = null!;
[Output("diameter")]
public Output<Pulumi.Plant.Tree.V1.Diameter> Diameter { get; private set; } = null!;
[Output("farm")]
public Output<string?> Farm { get; private set; } = null!;
[Output("size")]
public Output<Pulumi.Plant.Tree.V1.TreeSize?> Size { get; private set; } = null!;
[Output("type")]
public Output<Pulumi.Plant.Tree.V1.RubberTreeVariety> Type { get; private set; } = null!;
/// <summary>
/// Create a RubberTree resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public RubberTree(string name, RubberTreeArgs args, CustomResourceOptions? options = null)
: base("plant:tree/v1:RubberTree", name, args ?? new RubberTreeArgs(), MakeResourceOptions(options, ""))
{
}
private RubberTree(string name, Input<string> id, RubberTreeState? state = null, CustomResourceOptions? options = null)
: base("plant:tree/v1:RubberTree", name, state, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing RubberTree resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="state">Any extra arguments used during the lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static RubberTree Get(string name, Input<string> id, RubberTreeState? state = null, CustomResourceOptions? options = null)
{
return new RubberTree(name, id, state, options);
}
}
public sealed class RubberTreeArgs : Pulumi.ResourceArgs
{
[Input("container")]
public Input<Pulumi.Plant.Inputs.ContainerArgs>? Container { get; set; }
[Input("diameter", required: true)]
public Input<Pulumi.Plant.Tree.V1.Diameter> Diameter { get; set; } = null!;
[Input("farm")]
public InputUnion<Pulumi.Plant.Tree.V1.Farm, string>? Farm { get; set; }
[Input("size")]
public Input<Pulumi.Plant.Tree.V1.TreeSize>? Size { get; set; }
[Input("type", required: true)]
public Input<Pulumi.Plant.Tree.V1.RubberTreeVariety> Type { get; set; } = null!;
public RubberTreeArgs()
{
Diameter = Pulumi.Plant.Tree.V1.Diameter.Sixinch;
Farm = "(unknown)";
Size = Pulumi.Plant.Tree.V1.TreeSize.Medium;
Type = Pulumi.Plant.Tree.V1.RubberTreeVariety.Burgundy;
}
}
public sealed class RubberTreeState : Pulumi.ResourceArgs
{
[Input("farm")]
public InputUnion<Pulumi.Plant.Tree.V1.Farm, string>? Farm { get; set; }
public RubberTreeState()
{
Farm = "(unknown)";
}
}
}

View file

@ -0,0 +1,87 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.IO;
using System.Reflection;
using Pulumi;
namespace Pulumi.Plant
{
static class Utilities
{
public static string? GetEnv(params string[] names)
{
foreach (var n in names)
{
var value = Environment.GetEnvironmentVariable(n);
if (value != null)
{
return value;
}
}
return null;
}
static string[] trueValues = { "1", "t", "T", "true", "TRUE", "True" };
static string[] falseValues = { "0", "f", "F", "false", "FALSE", "False" };
public static bool? GetEnvBoolean(params string[] names)
{
var s = GetEnv(names);
if (s != null)
{
if (Array.IndexOf(trueValues, s) != -1)
{
return true;
}
if (Array.IndexOf(falseValues, s) != -1)
{
return false;
}
}
return null;
}
public static int? GetEnvInt32(params string[] names) => int.TryParse(GetEnv(names), out int v) ? (int?)v : null;
public static double? GetEnvDouble(params string[] names) => double.TryParse(GetEnv(names), out double v) ? (double?)v : null;
public static InvokeOptions WithVersion(this InvokeOptions? options)
{
if (options?.Version != null)
{
return options;
}
return new InvokeOptions
{
Parent = options?.Parent,
Provider = options?.Provider,
Version = Version,
};
}
private readonly static string version;
public static string Version => version;
static Utilities()
{
var assembly = typeof(Utilities).GetTypeInfo().Assembly;
using var stream = assembly.GetManifestResourceStream("Pulumi.Plant.version.txt");
using var reader = new StreamReader(stream ?? throw new NotSupportedException("Missing embedded version.txt file"));
version = reader.ReadToEnd().Trim();
var parts = version.Split("\n");
if (parts.Length == 2)
{
// The first part is the provider name.
version = parts[1].Trim();
}
}
}
internal sealed class PlantResourceTypeAttribute : Pulumi.ResourceTypeAttribute
{
public PlantResourceTypeAttribute(string type) : base(type, Utilities.Version)
{
}
}
}

View file

@ -0,0 +1,17 @@
{
"emittedFiles": [
"Enums.cs",
"Inputs/ContainerArgs.cs",
"Outputs/Container.cs",
"Provider.cs",
"Pulumi.Plant.csproj",
"README.md",
"Tree/README.md",
"Tree/V1/Enums.cs",
"Tree/V1/Nursery.cs",
"Tree/V1/README.md",
"Tree/V1/RubberTree.cs",
"Utilities.cs",
"logo.png"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

@ -0,0 +1,14 @@
{
"emittedFiles": [
"plant-provider/doc.go",
"plant-provider/init.go",
"plant-provider/provider.go",
"plant-provider/pulumiEnums.go",
"plant-provider/pulumiTypes.go",
"plant-provider/pulumiUtilities.go",
"plant-provider/tree/v1/init.go",
"plant-provider/tree/v1/nursery.go",
"plant-provider/tree/v1/pulumiEnums.go",
"plant-provider/tree/v1/rubberTree.go"
]
}

View file

@ -0,0 +1,3 @@
// Package plant exports types, functions, subpackages for provisioning plant resources.
//
package plantprovider

View file

@ -0,0 +1,40 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package plantprovider
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type pkg struct {
version semver.Version
}
func (p *pkg) Version() semver.Version {
return p.version
}
func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) {
if typ != "pulumi:providers:plant" {
return nil, fmt.Errorf("unknown provider type: %s", typ)
}
r := &Provider{}
err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return r, err
}
func init() {
version, err := PkgVersion()
if err != nil {
fmt.Printf("failed to determine package version. defaulting to v1: %v\n", err)
}
pulumi.RegisterResourcePackage(
"plant",
&pkg{version},
)
}

View file

@ -0,0 +1,78 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package plantprovider
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Provider struct {
pulumi.ProviderResourceState
}
// NewProvider registers a new resource with the given unique name, arguments, and options.
func NewProvider(ctx *pulumi.Context,
name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
if args == nil {
args = &ProviderArgs{}
}
var resource Provider
err := ctx.RegisterResource("pulumi:providers:plant", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type providerArgs struct {
}
// The set of arguments for constructing a Provider resource.
type ProviderArgs struct {
}
func (ProviderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*providerArgs)(nil)).Elem()
}
type ProviderInput interface {
pulumi.Input
ToProviderOutput() ProviderOutput
ToProviderOutputWithContext(ctx context.Context) ProviderOutput
}
func (*Provider) ElementType() reflect.Type {
return reflect.TypeOf((*Provider)(nil))
}
func (i *Provider) ToProviderOutput() ProviderOutput {
return i.ToProviderOutputWithContext(context.Background())
}
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput)
}
type ProviderOutput struct{ *pulumi.OutputState }
func (ProviderOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Provider)(nil))
}
func (o ProviderOutput) ToProviderOutput() ProviderOutput {
return o
}
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return o
}
func init() {
pulumi.RegisterOutputType(ProviderOutput{})
}

View file

@ -0,0 +1,690 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package plantprovider
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The log_name to populate in the Cloud Audit Record. This is added to regress pulumi/pulumi issue #7913
type CloudAuditOptionsLogName string
const (
// Default. Should not be used.
CloudAuditOptionsLogNameUnspecifiedLogName = CloudAuditOptionsLogName("UNSPECIFIED_LOG_NAME")
// Corresponds to "cloudaudit.googleapis.com/activity"
CloudAuditOptionsLogNameAdminActivity = CloudAuditOptionsLogName("ADMIN_ACTIVITY")
// Corresponds to "cloudaudit.googleapis.com/data_access"
CloudAuditOptionsLogNameDataAccess = CloudAuditOptionsLogName("DATA_ACCESS")
// What if triple quotes """ are used in the description
CloudAuditOptionsLogNameSynthetic = CloudAuditOptionsLogName("SYNTHETIC")
)
func (CloudAuditOptionsLogName) ElementType() reflect.Type {
return reflect.TypeOf((*CloudAuditOptionsLogName)(nil)).Elem()
}
func (e CloudAuditOptionsLogName) ToCloudAuditOptionsLogNameOutput() CloudAuditOptionsLogNameOutput {
return pulumi.ToOutput(e).(CloudAuditOptionsLogNameOutput)
}
func (e CloudAuditOptionsLogName) ToCloudAuditOptionsLogNameOutputWithContext(ctx context.Context) CloudAuditOptionsLogNameOutput {
return pulumi.ToOutputWithContext(ctx, e).(CloudAuditOptionsLogNameOutput)
}
func (e CloudAuditOptionsLogName) ToCloudAuditOptionsLogNamePtrOutput() CloudAuditOptionsLogNamePtrOutput {
return e.ToCloudAuditOptionsLogNamePtrOutputWithContext(context.Background())
}
func (e CloudAuditOptionsLogName) ToCloudAuditOptionsLogNamePtrOutputWithContext(ctx context.Context) CloudAuditOptionsLogNamePtrOutput {
return CloudAuditOptionsLogName(e).ToCloudAuditOptionsLogNameOutputWithContext(ctx).ToCloudAuditOptionsLogNamePtrOutputWithContext(ctx)
}
func (e CloudAuditOptionsLogName) ToStringOutput() pulumi.StringOutput {
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
}
func (e CloudAuditOptionsLogName) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
}
func (e CloudAuditOptionsLogName) ToStringPtrOutput() pulumi.StringPtrOutput {
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
}
func (e CloudAuditOptionsLogName) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
}
type CloudAuditOptionsLogNameOutput struct{ *pulumi.OutputState }
func (CloudAuditOptionsLogNameOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CloudAuditOptionsLogName)(nil)).Elem()
}
func (o CloudAuditOptionsLogNameOutput) ToCloudAuditOptionsLogNameOutput() CloudAuditOptionsLogNameOutput {
return o
}
func (o CloudAuditOptionsLogNameOutput) ToCloudAuditOptionsLogNameOutputWithContext(ctx context.Context) CloudAuditOptionsLogNameOutput {
return o
}
func (o CloudAuditOptionsLogNameOutput) ToCloudAuditOptionsLogNamePtrOutput() CloudAuditOptionsLogNamePtrOutput {
return o.ToCloudAuditOptionsLogNamePtrOutputWithContext(context.Background())
}
func (o CloudAuditOptionsLogNameOutput) ToCloudAuditOptionsLogNamePtrOutputWithContext(ctx context.Context) CloudAuditOptionsLogNamePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CloudAuditOptionsLogName) *CloudAuditOptionsLogName {
return &v
}).(CloudAuditOptionsLogNamePtrOutput)
}
func (o CloudAuditOptionsLogNameOutput) ToStringOutput() pulumi.StringOutput {
return o.ToStringOutputWithContext(context.Background())
}
func (o CloudAuditOptionsLogNameOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e CloudAuditOptionsLogName) string {
return string(e)
}).(pulumi.StringOutput)
}
func (o CloudAuditOptionsLogNameOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o CloudAuditOptionsLogNameOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e CloudAuditOptionsLogName) *string {
v := string(e)
return &v
}).(pulumi.StringPtrOutput)
}
type CloudAuditOptionsLogNamePtrOutput struct{ *pulumi.OutputState }
func (CloudAuditOptionsLogNamePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CloudAuditOptionsLogName)(nil)).Elem()
}
func (o CloudAuditOptionsLogNamePtrOutput) ToCloudAuditOptionsLogNamePtrOutput() CloudAuditOptionsLogNamePtrOutput {
return o
}
func (o CloudAuditOptionsLogNamePtrOutput) ToCloudAuditOptionsLogNamePtrOutputWithContext(ctx context.Context) CloudAuditOptionsLogNamePtrOutput {
return o
}
func (o CloudAuditOptionsLogNamePtrOutput) Elem() CloudAuditOptionsLogNameOutput {
return o.ApplyT(func(v *CloudAuditOptionsLogName) CloudAuditOptionsLogName {
if v != nil {
return *v
}
var ret CloudAuditOptionsLogName
return ret
}).(CloudAuditOptionsLogNameOutput)
}
func (o CloudAuditOptionsLogNamePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o CloudAuditOptionsLogNamePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *CloudAuditOptionsLogName) *string {
if e == nil {
return nil
}
v := string(*e)
return &v
}).(pulumi.StringPtrOutput)
}
// CloudAuditOptionsLogNameInput is an input type that accepts CloudAuditOptionsLogNameArgs and CloudAuditOptionsLogNameOutput values.
// You can construct a concrete instance of `CloudAuditOptionsLogNameInput` via:
//
// CloudAuditOptionsLogNameArgs{...}
type CloudAuditOptionsLogNameInput interface {
pulumi.Input
ToCloudAuditOptionsLogNameOutput() CloudAuditOptionsLogNameOutput
ToCloudAuditOptionsLogNameOutputWithContext(context.Context) CloudAuditOptionsLogNameOutput
}
var cloudAuditOptionsLogNamePtrType = reflect.TypeOf((**CloudAuditOptionsLogName)(nil)).Elem()
type CloudAuditOptionsLogNamePtrInput interface {
pulumi.Input
ToCloudAuditOptionsLogNamePtrOutput() CloudAuditOptionsLogNamePtrOutput
ToCloudAuditOptionsLogNamePtrOutputWithContext(context.Context) CloudAuditOptionsLogNamePtrOutput
}
type cloudAuditOptionsLogNamePtr string
func CloudAuditOptionsLogNamePtr(v string) CloudAuditOptionsLogNamePtrInput {
return (*cloudAuditOptionsLogNamePtr)(&v)
}
func (*cloudAuditOptionsLogNamePtr) ElementType() reflect.Type {
return cloudAuditOptionsLogNamePtrType
}
func (in *cloudAuditOptionsLogNamePtr) ToCloudAuditOptionsLogNamePtrOutput() CloudAuditOptionsLogNamePtrOutput {
return pulumi.ToOutput(in).(CloudAuditOptionsLogNamePtrOutput)
}
func (in *cloudAuditOptionsLogNamePtr) ToCloudAuditOptionsLogNamePtrOutputWithContext(ctx context.Context) CloudAuditOptionsLogNamePtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(CloudAuditOptionsLogNamePtrOutput)
}
type ContainerBrightness float64
const (
ContainerBrightnessZeroPointOne = ContainerBrightness(0.1)
ContainerBrightnessOne = ContainerBrightness(1)
)
func (ContainerBrightness) ElementType() reflect.Type {
return reflect.TypeOf((*ContainerBrightness)(nil)).Elem()
}
func (e ContainerBrightness) ToContainerBrightnessOutput() ContainerBrightnessOutput {
return pulumi.ToOutput(e).(ContainerBrightnessOutput)
}
func (e ContainerBrightness) ToContainerBrightnessOutputWithContext(ctx context.Context) ContainerBrightnessOutput {
return pulumi.ToOutputWithContext(ctx, e).(ContainerBrightnessOutput)
}
func (e ContainerBrightness) ToContainerBrightnessPtrOutput() ContainerBrightnessPtrOutput {
return e.ToContainerBrightnessPtrOutputWithContext(context.Background())
}
func (e ContainerBrightness) ToContainerBrightnessPtrOutputWithContext(ctx context.Context) ContainerBrightnessPtrOutput {
return ContainerBrightness(e).ToContainerBrightnessOutputWithContext(ctx).ToContainerBrightnessPtrOutputWithContext(ctx)
}
func (e ContainerBrightness) ToFloat64Output() pulumi.Float64Output {
return pulumi.ToOutput(pulumi.Float64(e)).(pulumi.Float64Output)
}
func (e ContainerBrightness) ToFloat64OutputWithContext(ctx context.Context) pulumi.Float64Output {
return pulumi.ToOutputWithContext(ctx, pulumi.Float64(e)).(pulumi.Float64Output)
}
func (e ContainerBrightness) ToFloat64PtrOutput() pulumi.Float64PtrOutput {
return pulumi.Float64(e).ToFloat64PtrOutputWithContext(context.Background())
}
func (e ContainerBrightness) ToFloat64PtrOutputWithContext(ctx context.Context) pulumi.Float64PtrOutput {
return pulumi.Float64(e).ToFloat64OutputWithContext(ctx).ToFloat64PtrOutputWithContext(ctx)
}
type ContainerBrightnessOutput struct{ *pulumi.OutputState }
func (ContainerBrightnessOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ContainerBrightness)(nil)).Elem()
}
func (o ContainerBrightnessOutput) ToContainerBrightnessOutput() ContainerBrightnessOutput {
return o
}
func (o ContainerBrightnessOutput) ToContainerBrightnessOutputWithContext(ctx context.Context) ContainerBrightnessOutput {
return o
}
func (o ContainerBrightnessOutput) ToContainerBrightnessPtrOutput() ContainerBrightnessPtrOutput {
return o.ToContainerBrightnessPtrOutputWithContext(context.Background())
}
func (o ContainerBrightnessOutput) ToContainerBrightnessPtrOutputWithContext(ctx context.Context) ContainerBrightnessPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ContainerBrightness) *ContainerBrightness {
return &v
}).(ContainerBrightnessPtrOutput)
}
func (o ContainerBrightnessOutput) ToFloat64Output() pulumi.Float64Output {
return o.ToFloat64OutputWithContext(context.Background())
}
func (o ContainerBrightnessOutput) ToFloat64OutputWithContext(ctx context.Context) pulumi.Float64Output {
return o.ApplyTWithContext(ctx, func(_ context.Context, e ContainerBrightness) float64 {
return float64(e)
}).(pulumi.Float64Output)
}
func (o ContainerBrightnessOutput) ToFloat64PtrOutput() pulumi.Float64PtrOutput {
return o.ToFloat64PtrOutputWithContext(context.Background())
}
func (o ContainerBrightnessOutput) ToFloat64PtrOutputWithContext(ctx context.Context) pulumi.Float64PtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e ContainerBrightness) *float64 {
v := float64(e)
return &v
}).(pulumi.Float64PtrOutput)
}
type ContainerBrightnessPtrOutput struct{ *pulumi.OutputState }
func (ContainerBrightnessPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ContainerBrightness)(nil)).Elem()
}
func (o ContainerBrightnessPtrOutput) ToContainerBrightnessPtrOutput() ContainerBrightnessPtrOutput {
return o
}
func (o ContainerBrightnessPtrOutput) ToContainerBrightnessPtrOutputWithContext(ctx context.Context) ContainerBrightnessPtrOutput {
return o
}
func (o ContainerBrightnessPtrOutput) Elem() ContainerBrightnessOutput {
return o.ApplyT(func(v *ContainerBrightness) ContainerBrightness {
if v != nil {
return *v
}
var ret ContainerBrightness
return ret
}).(ContainerBrightnessOutput)
}
func (o ContainerBrightnessPtrOutput) ToFloat64PtrOutput() pulumi.Float64PtrOutput {
return o.ToFloat64PtrOutputWithContext(context.Background())
}
func (o ContainerBrightnessPtrOutput) ToFloat64PtrOutputWithContext(ctx context.Context) pulumi.Float64PtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *ContainerBrightness) *float64 {
if e == nil {
return nil
}
v := float64(*e)
return &v
}).(pulumi.Float64PtrOutput)
}
// ContainerBrightnessInput is an input type that accepts ContainerBrightnessArgs and ContainerBrightnessOutput values.
// You can construct a concrete instance of `ContainerBrightnessInput` via:
//
// ContainerBrightnessArgs{...}
type ContainerBrightnessInput interface {
pulumi.Input
ToContainerBrightnessOutput() ContainerBrightnessOutput
ToContainerBrightnessOutputWithContext(context.Context) ContainerBrightnessOutput
}
var containerBrightnessPtrType = reflect.TypeOf((**ContainerBrightness)(nil)).Elem()
type ContainerBrightnessPtrInput interface {
pulumi.Input
ToContainerBrightnessPtrOutput() ContainerBrightnessPtrOutput
ToContainerBrightnessPtrOutputWithContext(context.Context) ContainerBrightnessPtrOutput
}
type containerBrightnessPtr float64
func ContainerBrightnessPtr(v float64) ContainerBrightnessPtrInput {
return (*containerBrightnessPtr)(&v)
}
func (*containerBrightnessPtr) ElementType() reflect.Type {
return containerBrightnessPtrType
}
func (in *containerBrightnessPtr) ToContainerBrightnessPtrOutput() ContainerBrightnessPtrOutput {
return pulumi.ToOutput(in).(ContainerBrightnessPtrOutput)
}
func (in *containerBrightnessPtr) ToContainerBrightnessPtrOutputWithContext(ctx context.Context) ContainerBrightnessPtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(ContainerBrightnessPtrOutput)
}
// plant container colors
type ContainerColor string
const (
ContainerColorRed = ContainerColor("red")
ContainerColorBlue = ContainerColor("blue")
ContainerColorYellow = ContainerColor("yellow")
)
func (ContainerColor) ElementType() reflect.Type {
return reflect.TypeOf((*ContainerColor)(nil)).Elem()
}
func (e ContainerColor) ToContainerColorOutput() ContainerColorOutput {
return pulumi.ToOutput(e).(ContainerColorOutput)
}
func (e ContainerColor) ToContainerColorOutputWithContext(ctx context.Context) ContainerColorOutput {
return pulumi.ToOutputWithContext(ctx, e).(ContainerColorOutput)
}
func (e ContainerColor) ToContainerColorPtrOutput() ContainerColorPtrOutput {
return e.ToContainerColorPtrOutputWithContext(context.Background())
}
func (e ContainerColor) ToContainerColorPtrOutputWithContext(ctx context.Context) ContainerColorPtrOutput {
return ContainerColor(e).ToContainerColorOutputWithContext(ctx).ToContainerColorPtrOutputWithContext(ctx)
}
func (e ContainerColor) ToStringOutput() pulumi.StringOutput {
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
}
func (e ContainerColor) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
}
func (e ContainerColor) ToStringPtrOutput() pulumi.StringPtrOutput {
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
}
func (e ContainerColor) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
}
type ContainerColorOutput struct{ *pulumi.OutputState }
func (ContainerColorOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ContainerColor)(nil)).Elem()
}
func (o ContainerColorOutput) ToContainerColorOutput() ContainerColorOutput {
return o
}
func (o ContainerColorOutput) ToContainerColorOutputWithContext(ctx context.Context) ContainerColorOutput {
return o
}
func (o ContainerColorOutput) ToContainerColorPtrOutput() ContainerColorPtrOutput {
return o.ToContainerColorPtrOutputWithContext(context.Background())
}
func (o ContainerColorOutput) ToContainerColorPtrOutputWithContext(ctx context.Context) ContainerColorPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ContainerColor) *ContainerColor {
return &v
}).(ContainerColorPtrOutput)
}
func (o ContainerColorOutput) ToStringOutput() pulumi.StringOutput {
return o.ToStringOutputWithContext(context.Background())
}
func (o ContainerColorOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e ContainerColor) string {
return string(e)
}).(pulumi.StringOutput)
}
func (o ContainerColorOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o ContainerColorOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e ContainerColor) *string {
v := string(e)
return &v
}).(pulumi.StringPtrOutput)
}
type ContainerColorPtrOutput struct{ *pulumi.OutputState }
func (ContainerColorPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ContainerColor)(nil)).Elem()
}
func (o ContainerColorPtrOutput) ToContainerColorPtrOutput() ContainerColorPtrOutput {
return o
}
func (o ContainerColorPtrOutput) ToContainerColorPtrOutputWithContext(ctx context.Context) ContainerColorPtrOutput {
return o
}
func (o ContainerColorPtrOutput) Elem() ContainerColorOutput {
return o.ApplyT(func(v *ContainerColor) ContainerColor {
if v != nil {
return *v
}
var ret ContainerColor
return ret
}).(ContainerColorOutput)
}
func (o ContainerColorPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o ContainerColorPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *ContainerColor) *string {
if e == nil {
return nil
}
v := string(*e)
return &v
}).(pulumi.StringPtrOutput)
}
// ContainerColorInput is an input type that accepts ContainerColorArgs and ContainerColorOutput values.
// You can construct a concrete instance of `ContainerColorInput` via:
//
// ContainerColorArgs{...}
type ContainerColorInput interface {
pulumi.Input
ToContainerColorOutput() ContainerColorOutput
ToContainerColorOutputWithContext(context.Context) ContainerColorOutput
}
var containerColorPtrType = reflect.TypeOf((**ContainerColor)(nil)).Elem()
type ContainerColorPtrInput interface {
pulumi.Input
ToContainerColorPtrOutput() ContainerColorPtrOutput
ToContainerColorPtrOutputWithContext(context.Context) ContainerColorPtrOutput
}
type containerColorPtr string
func ContainerColorPtr(v string) ContainerColorPtrInput {
return (*containerColorPtr)(&v)
}
func (*containerColorPtr) ElementType() reflect.Type {
return containerColorPtrType
}
func (in *containerColorPtr) ToContainerColorPtrOutput() ContainerColorPtrOutput {
return pulumi.ToOutput(in).(ContainerColorPtrOutput)
}
func (in *containerColorPtr) ToContainerColorPtrOutputWithContext(ctx context.Context) ContainerColorPtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(ContainerColorPtrOutput)
}
// plant container sizes
type ContainerSize int
const (
ContainerSizeFourInch = ContainerSize(4)
ContainerSizeSixInch = ContainerSize(6)
// Deprecated: Eight inch pots are no longer supported.
ContainerSizeEightInch = ContainerSize(8)
)
func (ContainerSize) ElementType() reflect.Type {
return reflect.TypeOf((*ContainerSize)(nil)).Elem()
}
func (e ContainerSize) ToContainerSizeOutput() ContainerSizeOutput {
return pulumi.ToOutput(e).(ContainerSizeOutput)
}
func (e ContainerSize) ToContainerSizeOutputWithContext(ctx context.Context) ContainerSizeOutput {
return pulumi.ToOutputWithContext(ctx, e).(ContainerSizeOutput)
}
func (e ContainerSize) ToContainerSizePtrOutput() ContainerSizePtrOutput {
return e.ToContainerSizePtrOutputWithContext(context.Background())
}
func (e ContainerSize) ToContainerSizePtrOutputWithContext(ctx context.Context) ContainerSizePtrOutput {
return ContainerSize(e).ToContainerSizeOutputWithContext(ctx).ToContainerSizePtrOutputWithContext(ctx)
}
func (e ContainerSize) ToIntOutput() pulumi.IntOutput {
return pulumi.ToOutput(pulumi.Int(e)).(pulumi.IntOutput)
}
func (e ContainerSize) ToIntOutputWithContext(ctx context.Context) pulumi.IntOutput {
return pulumi.ToOutputWithContext(ctx, pulumi.Int(e)).(pulumi.IntOutput)
}
func (e ContainerSize) ToIntPtrOutput() pulumi.IntPtrOutput {
return pulumi.Int(e).ToIntPtrOutputWithContext(context.Background())
}
func (e ContainerSize) ToIntPtrOutputWithContext(ctx context.Context) pulumi.IntPtrOutput {
return pulumi.Int(e).ToIntOutputWithContext(ctx).ToIntPtrOutputWithContext(ctx)
}
type ContainerSizeOutput struct{ *pulumi.OutputState }
func (ContainerSizeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ContainerSize)(nil)).Elem()
}
func (o ContainerSizeOutput) ToContainerSizeOutput() ContainerSizeOutput {
return o
}
func (o ContainerSizeOutput) ToContainerSizeOutputWithContext(ctx context.Context) ContainerSizeOutput {
return o
}
func (o ContainerSizeOutput) ToContainerSizePtrOutput() ContainerSizePtrOutput {
return o.ToContainerSizePtrOutputWithContext(context.Background())
}
func (o ContainerSizeOutput) ToContainerSizePtrOutputWithContext(ctx context.Context) ContainerSizePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ContainerSize) *ContainerSize {
return &v
}).(ContainerSizePtrOutput)
}
func (o ContainerSizeOutput) ToIntOutput() pulumi.IntOutput {
return o.ToIntOutputWithContext(context.Background())
}
func (o ContainerSizeOutput) ToIntOutputWithContext(ctx context.Context) pulumi.IntOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e ContainerSize) int {
return int(e)
}).(pulumi.IntOutput)
}
func (o ContainerSizeOutput) ToIntPtrOutput() pulumi.IntPtrOutput {
return o.ToIntPtrOutputWithContext(context.Background())
}
func (o ContainerSizeOutput) ToIntPtrOutputWithContext(ctx context.Context) pulumi.IntPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e ContainerSize) *int {
v := int(e)
return &v
}).(pulumi.IntPtrOutput)
}
type ContainerSizePtrOutput struct{ *pulumi.OutputState }
func (ContainerSizePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ContainerSize)(nil)).Elem()
}
func (o ContainerSizePtrOutput) ToContainerSizePtrOutput() ContainerSizePtrOutput {
return o
}
func (o ContainerSizePtrOutput) ToContainerSizePtrOutputWithContext(ctx context.Context) ContainerSizePtrOutput {
return o
}
func (o ContainerSizePtrOutput) Elem() ContainerSizeOutput {
return o.ApplyT(func(v *ContainerSize) ContainerSize {
if v != nil {
return *v
}
var ret ContainerSize
return ret
}).(ContainerSizeOutput)
}
func (o ContainerSizePtrOutput) ToIntPtrOutput() pulumi.IntPtrOutput {
return o.ToIntPtrOutputWithContext(context.Background())
}
func (o ContainerSizePtrOutput) ToIntPtrOutputWithContext(ctx context.Context) pulumi.IntPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *ContainerSize) *int {
if e == nil {
return nil
}
v := int(*e)
return &v
}).(pulumi.IntPtrOutput)
}
// ContainerSizeInput is an input type that accepts ContainerSizeArgs and ContainerSizeOutput values.
// You can construct a concrete instance of `ContainerSizeInput` via:
//
// ContainerSizeArgs{...}
type ContainerSizeInput interface {
pulumi.Input
ToContainerSizeOutput() ContainerSizeOutput
ToContainerSizeOutputWithContext(context.Context) ContainerSizeOutput
}
var containerSizePtrType = reflect.TypeOf((**ContainerSize)(nil)).Elem()
type ContainerSizePtrInput interface {
pulumi.Input
ToContainerSizePtrOutput() ContainerSizePtrOutput
ToContainerSizePtrOutputWithContext(context.Context) ContainerSizePtrOutput
}
type containerSizePtr int
func ContainerSizePtr(v int) ContainerSizePtrInput {
return (*containerSizePtr)(&v)
}
func (*containerSizePtr) ElementType() reflect.Type {
return containerSizePtrType
}
func (in *containerSizePtr) ToContainerSizePtrOutput() ContainerSizePtrOutput {
return pulumi.ToOutput(in).(ContainerSizePtrOutput)
}
func (in *containerSizePtr) ToContainerSizePtrOutputWithContext(ctx context.Context) ContainerSizePtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(ContainerSizePtrOutput)
}
func init() {
pulumi.RegisterOutputType(CloudAuditOptionsLogNameOutput{})
pulumi.RegisterOutputType(CloudAuditOptionsLogNamePtrOutput{})
pulumi.RegisterOutputType(ContainerBrightnessOutput{})
pulumi.RegisterOutputType(ContainerBrightnessPtrOutput{})
pulumi.RegisterOutputType(ContainerColorOutput{})
pulumi.RegisterOutputType(ContainerColorPtrOutput{})
pulumi.RegisterOutputType(ContainerSizeOutput{})
pulumi.RegisterOutputType(ContainerSizePtrOutput{})
}

View file

@ -0,0 +1,196 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package plantprovider
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Container struct {
Brightness *ContainerBrightness `pulumi:"brightness"`
Color *string `pulumi:"color"`
Material *string `pulumi:"material"`
Size ContainerSize `pulumi:"size"`
}
// ContainerInput is an input type that accepts ContainerArgs and ContainerOutput values.
// You can construct a concrete instance of `ContainerInput` via:
//
// ContainerArgs{...}
type ContainerInput interface {
pulumi.Input
ToContainerOutput() ContainerOutput
ToContainerOutputWithContext(context.Context) ContainerOutput
}
type ContainerArgs struct {
Brightness ContainerBrightnessPtrInput `pulumi:"brightness"`
Color pulumi.StringPtrInput `pulumi:"color"`
Material pulumi.StringPtrInput `pulumi:"material"`
Size ContainerSizeInput `pulumi:"size"`
}
func (ContainerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*Container)(nil)).Elem()
}
func (i ContainerArgs) ToContainerOutput() ContainerOutput {
return i.ToContainerOutputWithContext(context.Background())
}
func (i ContainerArgs) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerOutput)
}
func (i ContainerArgs) ToContainerPtrOutput() ContainerPtrOutput {
return i.ToContainerPtrOutputWithContext(context.Background())
}
func (i ContainerArgs) ToContainerPtrOutputWithContext(ctx context.Context) ContainerPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerOutput).ToContainerPtrOutputWithContext(ctx)
}
// ContainerPtrInput is an input type that accepts ContainerArgs, ContainerPtr and ContainerPtrOutput values.
// You can construct a concrete instance of `ContainerPtrInput` via:
//
// ContainerArgs{...}
//
// or:
//
// nil
type ContainerPtrInput interface {
pulumi.Input
ToContainerPtrOutput() ContainerPtrOutput
ToContainerPtrOutputWithContext(context.Context) ContainerPtrOutput
}
type containerPtrType ContainerArgs
func ContainerPtr(v *ContainerArgs) ContainerPtrInput {
return (*containerPtrType)(v)
}
func (*containerPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**Container)(nil)).Elem()
}
func (i *containerPtrType) ToContainerPtrOutput() ContainerPtrOutput {
return i.ToContainerPtrOutputWithContext(context.Background())
}
func (i *containerPtrType) ToContainerPtrOutputWithContext(ctx context.Context) ContainerPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerPtrOutput)
}
type ContainerOutput struct{ *pulumi.OutputState }
func (ContainerOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Container)(nil)).Elem()
}
func (o ContainerOutput) ToContainerOutput() ContainerOutput {
return o
}
func (o ContainerOutput) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
return o
}
func (o ContainerOutput) ToContainerPtrOutput() ContainerPtrOutput {
return o.ToContainerPtrOutputWithContext(context.Background())
}
func (o ContainerOutput) ToContainerPtrOutputWithContext(ctx context.Context) ContainerPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v Container) *Container {
return &v
}).(ContainerPtrOutput)
}
func (o ContainerOutput) Brightness() ContainerBrightnessPtrOutput {
return o.ApplyT(func(v Container) *ContainerBrightness { return v.Brightness }).(ContainerBrightnessPtrOutput)
}
func (o ContainerOutput) Color() pulumi.StringPtrOutput {
return o.ApplyT(func(v Container) *string { return v.Color }).(pulumi.StringPtrOutput)
}
func (o ContainerOutput) Material() pulumi.StringPtrOutput {
return o.ApplyT(func(v Container) *string { return v.Material }).(pulumi.StringPtrOutput)
}
func (o ContainerOutput) Size() ContainerSizeOutput {
return o.ApplyT(func(v Container) ContainerSize { return v.Size }).(ContainerSizeOutput)
}
type ContainerPtrOutput struct{ *pulumi.OutputState }
func (ContainerPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Container)(nil)).Elem()
}
func (o ContainerPtrOutput) ToContainerPtrOutput() ContainerPtrOutput {
return o
}
func (o ContainerPtrOutput) ToContainerPtrOutputWithContext(ctx context.Context) ContainerPtrOutput {
return o
}
func (o ContainerPtrOutput) Elem() ContainerOutput {
return o.ApplyT(func(v *Container) Container {
if v != nil {
return *v
}
var ret Container
return ret
}).(ContainerOutput)
}
func (o ContainerPtrOutput) Brightness() ContainerBrightnessPtrOutput {
return o.ApplyT(func(v *Container) *ContainerBrightness {
if v == nil {
return nil
}
return v.Brightness
}).(ContainerBrightnessPtrOutput)
}
func (o ContainerPtrOutput) Color() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) *string {
if v == nil {
return nil
}
return v.Color
}).(pulumi.StringPtrOutput)
}
func (o ContainerPtrOutput) Material() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) *string {
if v == nil {
return nil
}
return v.Material
}).(pulumi.StringPtrOutput)
}
func (o ContainerPtrOutput) Size() ContainerSizePtrOutput {
return o.ApplyT(func(v *Container) *ContainerSize {
if v == nil {
return nil
}
return &v.Size
}).(ContainerSizePtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContainerInput)(nil)).Elem(), ContainerArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ContainerPtrInput)(nil)).Elem(), ContainerArgs{})
pulumi.RegisterOutputType(ContainerOutput{})
pulumi.RegisterOutputType(ContainerPtrOutput{})
}

View file

@ -0,0 +1,77 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package plantprovider
import (
"fmt"
"os"
"reflect"
"regexp"
"strconv"
"strings"
"github.com/blang/semver"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type envParser func(v string) interface{}
func parseEnvBool(v string) interface{} {
b, err := strconv.ParseBool(v)
if err != nil {
return nil
}
return b
}
func parseEnvInt(v string) interface{} {
i, err := strconv.ParseInt(v, 0, 0)
if err != nil {
return nil
}
return int(i)
}
func parseEnvFloat(v string) interface{} {
f, err := strconv.ParseFloat(v, 64)
if err != nil {
return nil
}
return f
}
func parseEnvStringArray(v string) interface{} {
var result pulumi.StringArray
for _, item := range strings.Split(v, ";") {
result = append(result, pulumi.String(item))
}
return result
}
func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} {
for _, v := range vars {
if value := os.Getenv(v); value != "" {
if parser != nil {
return parser(value)
}
return value
}
}
return def
}
// PkgVersion uses reflection to determine the version of the current package.
func PkgVersion() (semver.Version, error) {
type sentinal struct{}
pkgPath := reflect.TypeOf(sentinal{}).PkgPath()
re := regexp.MustCompile("^.*/pulumi-plant/sdk(/v\\d+)?")
if match := re.FindStringSubmatch(pkgPath); match != nil {
vStr := match[1]
if len(vStr) == 0 { // If the version capture group was empty, default to v1.
return semver.Version{Major: 1}, nil
}
return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil
}
return semver.Version{}, fmt.Errorf("failed to determine the package version from %s", pkgPath)
}

View file

@ -0,0 +1,46 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"fmt"
"dashed-import-schema/plant-provider"
"github.com/blang/semver"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "plant:tree/v1:Nursery":
r = &Nursery{}
case "plant:tree/v1:RubberTree":
r = &RubberTree{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := plantprovider.PkgVersion()
if err != nil {
fmt.Printf("failed to determine package version. defaulting to v1: %v\n", err)
}
pulumi.RegisterResourceModule(
"plant",
"tree/v1",
&module{version},
)
}

View file

@ -0,0 +1,113 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Nursery struct {
pulumi.CustomResourceState
}
// NewNursery registers a new resource with the given unique name, arguments, and options.
func NewNursery(ctx *pulumi.Context,
name string, args *NurseryArgs, opts ...pulumi.ResourceOption) (*Nursery, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Varieties == nil {
return nil, errors.New("invalid value for required argument 'Varieties'")
}
var resource Nursery
err := ctx.RegisterResource("plant:tree/v1:Nursery", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNursery gets an existing Nursery resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetNursery(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NurseryState, opts ...pulumi.ResourceOption) (*Nursery, error) {
var resource Nursery
err := ctx.ReadResource("plant:tree/v1:Nursery", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Nursery resources.
type nurseryState struct {
}
type NurseryState struct {
}
func (NurseryState) ElementType() reflect.Type {
return reflect.TypeOf((*nurseryState)(nil)).Elem()
}
type nurseryArgs struct {
// The sizes of trees available
Sizes map[string]TreeSize `pulumi:"sizes"`
// The varieties available
Varieties []RubberTreeVariety `pulumi:"varieties"`
}
// The set of arguments for constructing a Nursery resource.
type NurseryArgs struct {
// The sizes of trees available
Sizes TreeSizeMapInput
// The varieties available
Varieties RubberTreeVarietyArrayInput
}
func (NurseryArgs) ElementType() reflect.Type {
return reflect.TypeOf((*nurseryArgs)(nil)).Elem()
}
type NurseryInput interface {
pulumi.Input
ToNurseryOutput() NurseryOutput
ToNurseryOutputWithContext(ctx context.Context) NurseryOutput
}
func (*Nursery) ElementType() reflect.Type {
return reflect.TypeOf((*Nursery)(nil))
}
func (i *Nursery) ToNurseryOutput() NurseryOutput {
return i.ToNurseryOutputWithContext(context.Background())
}
func (i *Nursery) ToNurseryOutputWithContext(ctx context.Context) NurseryOutput {
return pulumi.ToOutputWithContext(ctx, i).(NurseryOutput)
}
type NurseryOutput struct{ *pulumi.OutputState }
func (NurseryOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Nursery)(nil))
}
func (o NurseryOutput) ToNurseryOutput() NurseryOutput {
return o
}
func (o NurseryOutput) ToNurseryOutputWithContext(ctx context.Context) NurseryOutput {
return o
}
func init() {
pulumi.RegisterOutputType(NurseryOutput{})
}

View file

@ -0,0 +1,776 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type Diameter float64
const (
DiameterSixinch = Diameter(6)
DiameterTwelveinch = Diameter(12)
)
func (Diameter) ElementType() reflect.Type {
return reflect.TypeOf((*Diameter)(nil)).Elem()
}
func (e Diameter) ToDiameterOutput() DiameterOutput {
return pulumi.ToOutput(e).(DiameterOutput)
}
func (e Diameter) ToDiameterOutputWithContext(ctx context.Context) DiameterOutput {
return pulumi.ToOutputWithContext(ctx, e).(DiameterOutput)
}
func (e Diameter) ToDiameterPtrOutput() DiameterPtrOutput {
return e.ToDiameterPtrOutputWithContext(context.Background())
}
func (e Diameter) ToDiameterPtrOutputWithContext(ctx context.Context) DiameterPtrOutput {
return Diameter(e).ToDiameterOutputWithContext(ctx).ToDiameterPtrOutputWithContext(ctx)
}
func (e Diameter) ToFloat64Output() pulumi.Float64Output {
return pulumi.ToOutput(pulumi.Float64(e)).(pulumi.Float64Output)
}
func (e Diameter) ToFloat64OutputWithContext(ctx context.Context) pulumi.Float64Output {
return pulumi.ToOutputWithContext(ctx, pulumi.Float64(e)).(pulumi.Float64Output)
}
func (e Diameter) ToFloat64PtrOutput() pulumi.Float64PtrOutput {
return pulumi.Float64(e).ToFloat64PtrOutputWithContext(context.Background())
}
func (e Diameter) ToFloat64PtrOutputWithContext(ctx context.Context) pulumi.Float64PtrOutput {
return pulumi.Float64(e).ToFloat64OutputWithContext(ctx).ToFloat64PtrOutputWithContext(ctx)
}
type DiameterOutput struct{ *pulumi.OutputState }
func (DiameterOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Diameter)(nil)).Elem()
}
func (o DiameterOutput) ToDiameterOutput() DiameterOutput {
return o
}
func (o DiameterOutput) ToDiameterOutputWithContext(ctx context.Context) DiameterOutput {
return o
}
func (o DiameterOutput) ToDiameterPtrOutput() DiameterPtrOutput {
return o.ToDiameterPtrOutputWithContext(context.Background())
}
func (o DiameterOutput) ToDiameterPtrOutputWithContext(ctx context.Context) DiameterPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v Diameter) *Diameter {
return &v
}).(DiameterPtrOutput)
}
func (o DiameterOutput) ToFloat64Output() pulumi.Float64Output {
return o.ToFloat64OutputWithContext(context.Background())
}
func (o DiameterOutput) ToFloat64OutputWithContext(ctx context.Context) pulumi.Float64Output {
return o.ApplyTWithContext(ctx, func(_ context.Context, e Diameter) float64 {
return float64(e)
}).(pulumi.Float64Output)
}
func (o DiameterOutput) ToFloat64PtrOutput() pulumi.Float64PtrOutput {
return o.ToFloat64PtrOutputWithContext(context.Background())
}
func (o DiameterOutput) ToFloat64PtrOutputWithContext(ctx context.Context) pulumi.Float64PtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e Diameter) *float64 {
v := float64(e)
return &v
}).(pulumi.Float64PtrOutput)
}
type DiameterPtrOutput struct{ *pulumi.OutputState }
func (DiameterPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Diameter)(nil)).Elem()
}
func (o DiameterPtrOutput) ToDiameterPtrOutput() DiameterPtrOutput {
return o
}
func (o DiameterPtrOutput) ToDiameterPtrOutputWithContext(ctx context.Context) DiameterPtrOutput {
return o
}
func (o DiameterPtrOutput) Elem() DiameterOutput {
return o.ApplyT(func(v *Diameter) Diameter {
if v != nil {
return *v
}
var ret Diameter
return ret
}).(DiameterOutput)
}
func (o DiameterPtrOutput) ToFloat64PtrOutput() pulumi.Float64PtrOutput {
return o.ToFloat64PtrOutputWithContext(context.Background())
}
func (o DiameterPtrOutput) ToFloat64PtrOutputWithContext(ctx context.Context) pulumi.Float64PtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *Diameter) *float64 {
if e == nil {
return nil
}
v := float64(*e)
return &v
}).(pulumi.Float64PtrOutput)
}
// DiameterInput is an input type that accepts DiameterArgs and DiameterOutput values.
// You can construct a concrete instance of `DiameterInput` via:
//
// DiameterArgs{...}
type DiameterInput interface {
pulumi.Input
ToDiameterOutput() DiameterOutput
ToDiameterOutputWithContext(context.Context) DiameterOutput
}
var diameterPtrType = reflect.TypeOf((**Diameter)(nil)).Elem()
type DiameterPtrInput interface {
pulumi.Input
ToDiameterPtrOutput() DiameterPtrOutput
ToDiameterPtrOutputWithContext(context.Context) DiameterPtrOutput
}
type diameterPtr float64
func DiameterPtr(v float64) DiameterPtrInput {
return (*diameterPtr)(&v)
}
func (*diameterPtr) ElementType() reflect.Type {
return diameterPtrType
}
func (in *diameterPtr) ToDiameterPtrOutput() DiameterPtrOutput {
return pulumi.ToOutput(in).(DiameterPtrOutput)
}
func (in *diameterPtr) ToDiameterPtrOutputWithContext(ctx context.Context) DiameterPtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(DiameterPtrOutput)
}
type Farm string
const (
Farm_Pulumi_Planters_Inc_ = Farm("Pulumi Planters Inc.")
Farm_Plants_R_Us = Farm("Plants'R'Us")
)
func (Farm) ElementType() reflect.Type {
return reflect.TypeOf((*Farm)(nil)).Elem()
}
func (e Farm) ToFarmOutput() FarmOutput {
return pulumi.ToOutput(e).(FarmOutput)
}
func (e Farm) ToFarmOutputWithContext(ctx context.Context) FarmOutput {
return pulumi.ToOutputWithContext(ctx, e).(FarmOutput)
}
func (e Farm) ToFarmPtrOutput() FarmPtrOutput {
return e.ToFarmPtrOutputWithContext(context.Background())
}
func (e Farm) ToFarmPtrOutputWithContext(ctx context.Context) FarmPtrOutput {
return Farm(e).ToFarmOutputWithContext(ctx).ToFarmPtrOutputWithContext(ctx)
}
func (e Farm) ToStringOutput() pulumi.StringOutput {
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
}
func (e Farm) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
}
func (e Farm) ToStringPtrOutput() pulumi.StringPtrOutput {
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
}
func (e Farm) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
}
type FarmOutput struct{ *pulumi.OutputState }
func (FarmOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Farm)(nil)).Elem()
}
func (o FarmOutput) ToFarmOutput() FarmOutput {
return o
}
func (o FarmOutput) ToFarmOutputWithContext(ctx context.Context) FarmOutput {
return o
}
func (o FarmOutput) ToFarmPtrOutput() FarmPtrOutput {
return o.ToFarmPtrOutputWithContext(context.Background())
}
func (o FarmOutput) ToFarmPtrOutputWithContext(ctx context.Context) FarmPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v Farm) *Farm {
return &v
}).(FarmPtrOutput)
}
func (o FarmOutput) ToStringOutput() pulumi.StringOutput {
return o.ToStringOutputWithContext(context.Background())
}
func (o FarmOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e Farm) string {
return string(e)
}).(pulumi.StringOutput)
}
func (o FarmOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o FarmOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e Farm) *string {
v := string(e)
return &v
}).(pulumi.StringPtrOutput)
}
type FarmPtrOutput struct{ *pulumi.OutputState }
func (FarmPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Farm)(nil)).Elem()
}
func (o FarmPtrOutput) ToFarmPtrOutput() FarmPtrOutput {
return o
}
func (o FarmPtrOutput) ToFarmPtrOutputWithContext(ctx context.Context) FarmPtrOutput {
return o
}
func (o FarmPtrOutput) Elem() FarmOutput {
return o.ApplyT(func(v *Farm) Farm {
if v != nil {
return *v
}
var ret Farm
return ret
}).(FarmOutput)
}
func (o FarmPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o FarmPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *Farm) *string {
if e == nil {
return nil
}
v := string(*e)
return &v
}).(pulumi.StringPtrOutput)
}
// FarmInput is an input type that accepts FarmArgs and FarmOutput values.
// You can construct a concrete instance of `FarmInput` via:
//
// FarmArgs{...}
type FarmInput interface {
pulumi.Input
ToFarmOutput() FarmOutput
ToFarmOutputWithContext(context.Context) FarmOutput
}
var farmPtrType = reflect.TypeOf((**Farm)(nil)).Elem()
type FarmPtrInput interface {
pulumi.Input
ToFarmPtrOutput() FarmPtrOutput
ToFarmPtrOutputWithContext(context.Context) FarmPtrOutput
}
type farmPtr string
func FarmPtr(v string) FarmPtrInput {
return (*farmPtr)(&v)
}
func (*farmPtr) ElementType() reflect.Type {
return farmPtrType
}
func (in *farmPtr) ToFarmPtrOutput() FarmPtrOutput {
return pulumi.ToOutput(in).(FarmPtrOutput)
}
func (in *farmPtr) ToFarmPtrOutputWithContext(ctx context.Context) FarmPtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(FarmPtrOutput)
}
// types of rubber trees
type RubberTreeVariety string
const (
// A burgundy rubber tree.
RubberTreeVarietyBurgundy = RubberTreeVariety("Burgundy")
// A ruby rubber tree.
RubberTreeVarietyRuby = RubberTreeVariety("Ruby")
// A tineke rubber tree.
RubberTreeVarietyTineke = RubberTreeVariety("Tineke")
)
func (RubberTreeVariety) ElementType() reflect.Type {
return reflect.TypeOf((*RubberTreeVariety)(nil)).Elem()
}
func (e RubberTreeVariety) ToRubberTreeVarietyOutput() RubberTreeVarietyOutput {
return pulumi.ToOutput(e).(RubberTreeVarietyOutput)
}
func (e RubberTreeVariety) ToRubberTreeVarietyOutputWithContext(ctx context.Context) RubberTreeVarietyOutput {
return pulumi.ToOutputWithContext(ctx, e).(RubberTreeVarietyOutput)
}
func (e RubberTreeVariety) ToRubberTreeVarietyPtrOutput() RubberTreeVarietyPtrOutput {
return e.ToRubberTreeVarietyPtrOutputWithContext(context.Background())
}
func (e RubberTreeVariety) ToRubberTreeVarietyPtrOutputWithContext(ctx context.Context) RubberTreeVarietyPtrOutput {
return RubberTreeVariety(e).ToRubberTreeVarietyOutputWithContext(ctx).ToRubberTreeVarietyPtrOutputWithContext(ctx)
}
func (e RubberTreeVariety) ToStringOutput() pulumi.StringOutput {
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
}
func (e RubberTreeVariety) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
}
func (e RubberTreeVariety) ToStringPtrOutput() pulumi.StringPtrOutput {
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
}
func (e RubberTreeVariety) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
}
type RubberTreeVarietyOutput struct{ *pulumi.OutputState }
func (RubberTreeVarietyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*RubberTreeVariety)(nil)).Elem()
}
func (o RubberTreeVarietyOutput) ToRubberTreeVarietyOutput() RubberTreeVarietyOutput {
return o
}
func (o RubberTreeVarietyOutput) ToRubberTreeVarietyOutputWithContext(ctx context.Context) RubberTreeVarietyOutput {
return o
}
func (o RubberTreeVarietyOutput) ToRubberTreeVarietyPtrOutput() RubberTreeVarietyPtrOutput {
return o.ToRubberTreeVarietyPtrOutputWithContext(context.Background())
}
func (o RubberTreeVarietyOutput) ToRubberTreeVarietyPtrOutputWithContext(ctx context.Context) RubberTreeVarietyPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v RubberTreeVariety) *RubberTreeVariety {
return &v
}).(RubberTreeVarietyPtrOutput)
}
func (o RubberTreeVarietyOutput) ToStringOutput() pulumi.StringOutput {
return o.ToStringOutputWithContext(context.Background())
}
func (o RubberTreeVarietyOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e RubberTreeVariety) string {
return string(e)
}).(pulumi.StringOutput)
}
func (o RubberTreeVarietyOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o RubberTreeVarietyOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e RubberTreeVariety) *string {
v := string(e)
return &v
}).(pulumi.StringPtrOutput)
}
type RubberTreeVarietyPtrOutput struct{ *pulumi.OutputState }
func (RubberTreeVarietyPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RubberTreeVariety)(nil)).Elem()
}
func (o RubberTreeVarietyPtrOutput) ToRubberTreeVarietyPtrOutput() RubberTreeVarietyPtrOutput {
return o
}
func (o RubberTreeVarietyPtrOutput) ToRubberTreeVarietyPtrOutputWithContext(ctx context.Context) RubberTreeVarietyPtrOutput {
return o
}
func (o RubberTreeVarietyPtrOutput) Elem() RubberTreeVarietyOutput {
return o.ApplyT(func(v *RubberTreeVariety) RubberTreeVariety {
if v != nil {
return *v
}
var ret RubberTreeVariety
return ret
}).(RubberTreeVarietyOutput)
}
func (o RubberTreeVarietyPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o RubberTreeVarietyPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *RubberTreeVariety) *string {
if e == nil {
return nil
}
v := string(*e)
return &v
}).(pulumi.StringPtrOutput)
}
// RubberTreeVarietyInput is an input type that accepts RubberTreeVarietyArgs and RubberTreeVarietyOutput values.
// You can construct a concrete instance of `RubberTreeVarietyInput` via:
//
// RubberTreeVarietyArgs{...}
type RubberTreeVarietyInput interface {
pulumi.Input
ToRubberTreeVarietyOutput() RubberTreeVarietyOutput
ToRubberTreeVarietyOutputWithContext(context.Context) RubberTreeVarietyOutput
}
var rubberTreeVarietyPtrType = reflect.TypeOf((**RubberTreeVariety)(nil)).Elem()
type RubberTreeVarietyPtrInput interface {
pulumi.Input
ToRubberTreeVarietyPtrOutput() RubberTreeVarietyPtrOutput
ToRubberTreeVarietyPtrOutputWithContext(context.Context) RubberTreeVarietyPtrOutput
}
type rubberTreeVarietyPtr string
func RubberTreeVarietyPtr(v string) RubberTreeVarietyPtrInput {
return (*rubberTreeVarietyPtr)(&v)
}
func (*rubberTreeVarietyPtr) ElementType() reflect.Type {
return rubberTreeVarietyPtrType
}
func (in *rubberTreeVarietyPtr) ToRubberTreeVarietyPtrOutput() RubberTreeVarietyPtrOutput {
return pulumi.ToOutput(in).(RubberTreeVarietyPtrOutput)
}
func (in *rubberTreeVarietyPtr) ToRubberTreeVarietyPtrOutputWithContext(ctx context.Context) RubberTreeVarietyPtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(RubberTreeVarietyPtrOutput)
}
// RubberTreeVarietyArrayInput is an input type that accepts RubberTreeVarietyArray and RubberTreeVarietyArrayOutput values.
// You can construct a concrete instance of `RubberTreeVarietyArrayInput` via:
//
// RubberTreeVarietyArray{ RubberTreeVarietyArgs{...} }
type RubberTreeVarietyArrayInput interface {
pulumi.Input
ToRubberTreeVarietyArrayOutput() RubberTreeVarietyArrayOutput
ToRubberTreeVarietyArrayOutputWithContext(context.Context) RubberTreeVarietyArrayOutput
}
type RubberTreeVarietyArray []RubberTreeVariety
func (RubberTreeVarietyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]RubberTreeVariety)(nil)).Elem()
}
func (i RubberTreeVarietyArray) ToRubberTreeVarietyArrayOutput() RubberTreeVarietyArrayOutput {
return i.ToRubberTreeVarietyArrayOutputWithContext(context.Background())
}
func (i RubberTreeVarietyArray) ToRubberTreeVarietyArrayOutputWithContext(ctx context.Context) RubberTreeVarietyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RubberTreeVarietyArrayOutput)
}
type RubberTreeVarietyArrayOutput struct{ *pulumi.OutputState }
func (RubberTreeVarietyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]RubberTreeVariety)(nil)).Elem()
}
func (o RubberTreeVarietyArrayOutput) ToRubberTreeVarietyArrayOutput() RubberTreeVarietyArrayOutput {
return o
}
func (o RubberTreeVarietyArrayOutput) ToRubberTreeVarietyArrayOutputWithContext(ctx context.Context) RubberTreeVarietyArrayOutput {
return o
}
func (o RubberTreeVarietyArrayOutput) Index(i pulumi.IntInput) RubberTreeVarietyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) RubberTreeVariety {
return vs[0].([]RubberTreeVariety)[vs[1].(int)]
}).(RubberTreeVarietyOutput)
}
type TreeSize string
const (
TreeSizeSmall = TreeSize("small")
TreeSizeMedium = TreeSize("medium")
TreeSizeLarge = TreeSize("large")
)
func (TreeSize) ElementType() reflect.Type {
return reflect.TypeOf((*TreeSize)(nil)).Elem()
}
func (e TreeSize) ToTreeSizeOutput() TreeSizeOutput {
return pulumi.ToOutput(e).(TreeSizeOutput)
}
func (e TreeSize) ToTreeSizeOutputWithContext(ctx context.Context) TreeSizeOutput {
return pulumi.ToOutputWithContext(ctx, e).(TreeSizeOutput)
}
func (e TreeSize) ToTreeSizePtrOutput() TreeSizePtrOutput {
return e.ToTreeSizePtrOutputWithContext(context.Background())
}
func (e TreeSize) ToTreeSizePtrOutputWithContext(ctx context.Context) TreeSizePtrOutput {
return TreeSize(e).ToTreeSizeOutputWithContext(ctx).ToTreeSizePtrOutputWithContext(ctx)
}
func (e TreeSize) ToStringOutput() pulumi.StringOutput {
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
}
func (e TreeSize) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
}
func (e TreeSize) ToStringPtrOutput() pulumi.StringPtrOutput {
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
}
func (e TreeSize) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
}
type TreeSizeOutput struct{ *pulumi.OutputState }
func (TreeSizeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TreeSize)(nil)).Elem()
}
func (o TreeSizeOutput) ToTreeSizeOutput() TreeSizeOutput {
return o
}
func (o TreeSizeOutput) ToTreeSizeOutputWithContext(ctx context.Context) TreeSizeOutput {
return o
}
func (o TreeSizeOutput) ToTreeSizePtrOutput() TreeSizePtrOutput {
return o.ToTreeSizePtrOutputWithContext(context.Background())
}
func (o TreeSizeOutput) ToTreeSizePtrOutputWithContext(ctx context.Context) TreeSizePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v TreeSize) *TreeSize {
return &v
}).(TreeSizePtrOutput)
}
func (o TreeSizeOutput) ToStringOutput() pulumi.StringOutput {
return o.ToStringOutputWithContext(context.Background())
}
func (o TreeSizeOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e TreeSize) string {
return string(e)
}).(pulumi.StringOutput)
}
func (o TreeSizeOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o TreeSizeOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e TreeSize) *string {
v := string(e)
return &v
}).(pulumi.StringPtrOutput)
}
type TreeSizePtrOutput struct{ *pulumi.OutputState }
func (TreeSizePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TreeSize)(nil)).Elem()
}
func (o TreeSizePtrOutput) ToTreeSizePtrOutput() TreeSizePtrOutput {
return o
}
func (o TreeSizePtrOutput) ToTreeSizePtrOutputWithContext(ctx context.Context) TreeSizePtrOutput {
return o
}
func (o TreeSizePtrOutput) Elem() TreeSizeOutput {
return o.ApplyT(func(v *TreeSize) TreeSize {
if v != nil {
return *v
}
var ret TreeSize
return ret
}).(TreeSizeOutput)
}
func (o TreeSizePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
return o.ToStringPtrOutputWithContext(context.Background())
}
func (o TreeSizePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, e *TreeSize) *string {
if e == nil {
return nil
}
v := string(*e)
return &v
}).(pulumi.StringPtrOutput)
}
// TreeSizeInput is an input type that accepts TreeSizeArgs and TreeSizeOutput values.
// You can construct a concrete instance of `TreeSizeInput` via:
//
// TreeSizeArgs{...}
type TreeSizeInput interface {
pulumi.Input
ToTreeSizeOutput() TreeSizeOutput
ToTreeSizeOutputWithContext(context.Context) TreeSizeOutput
}
var treeSizePtrType = reflect.TypeOf((**TreeSize)(nil)).Elem()
type TreeSizePtrInput interface {
pulumi.Input
ToTreeSizePtrOutput() TreeSizePtrOutput
ToTreeSizePtrOutputWithContext(context.Context) TreeSizePtrOutput
}
type treeSizePtr string
func TreeSizePtr(v string) TreeSizePtrInput {
return (*treeSizePtr)(&v)
}
func (*treeSizePtr) ElementType() reflect.Type {
return treeSizePtrType
}
func (in *treeSizePtr) ToTreeSizePtrOutput() TreeSizePtrOutput {
return pulumi.ToOutput(in).(TreeSizePtrOutput)
}
func (in *treeSizePtr) ToTreeSizePtrOutputWithContext(ctx context.Context) TreeSizePtrOutput {
return pulumi.ToOutputWithContext(ctx, in).(TreeSizePtrOutput)
}
// TreeSizeMapInput is an input type that accepts TreeSizeMap and TreeSizeMapOutput values.
// You can construct a concrete instance of `TreeSizeMapInput` via:
//
// TreeSizeMap{ "key": TreeSizeArgs{...} }
type TreeSizeMapInput interface {
pulumi.Input
ToTreeSizeMapOutput() TreeSizeMapOutput
ToTreeSizeMapOutputWithContext(context.Context) TreeSizeMapOutput
}
type TreeSizeMap map[string]TreeSize
func (TreeSizeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]TreeSize)(nil)).Elem()
}
func (i TreeSizeMap) ToTreeSizeMapOutput() TreeSizeMapOutput {
return i.ToTreeSizeMapOutputWithContext(context.Background())
}
func (i TreeSizeMap) ToTreeSizeMapOutputWithContext(ctx context.Context) TreeSizeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TreeSizeMapOutput)
}
type TreeSizeMapOutput struct{ *pulumi.OutputState }
func (TreeSizeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]TreeSize)(nil)).Elem()
}
func (o TreeSizeMapOutput) ToTreeSizeMapOutput() TreeSizeMapOutput {
return o
}
func (o TreeSizeMapOutput) ToTreeSizeMapOutputWithContext(ctx context.Context) TreeSizeMapOutput {
return o
}
func (o TreeSizeMapOutput) MapIndex(k pulumi.StringInput) TreeSizeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) TreeSize {
return vs[0].(map[string]TreeSize)[vs[1].(string)]
}).(TreeSizeOutput)
}
func init() {
pulumi.RegisterOutputType(DiameterOutput{})
pulumi.RegisterOutputType(DiameterPtrOutput{})
pulumi.RegisterOutputType(FarmOutput{})
pulumi.RegisterOutputType(FarmPtrOutput{})
pulumi.RegisterOutputType(RubberTreeVarietyOutput{})
pulumi.RegisterOutputType(RubberTreeVarietyPtrOutput{})
pulumi.RegisterOutputType(RubberTreeVarietyArrayOutput{})
pulumi.RegisterOutputType(TreeSizeOutput{})
pulumi.RegisterOutputType(TreeSizePtrOutput{})
pulumi.RegisterOutputType(TreeSizeMapOutput{})
}

View file

@ -0,0 +1,133 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"dashed-import-schema/plant-provider"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type RubberTree struct {
pulumi.CustomResourceState
Container plantprovider.ContainerPtrOutput `pulumi:"container"`
Diameter DiameterOutput `pulumi:"diameter"`
Farm pulumi.StringPtrOutput `pulumi:"farm"`
Size TreeSizePtrOutput `pulumi:"size"`
Type RubberTreeVarietyOutput `pulumi:"type"`
}
// NewRubberTree registers a new resource with the given unique name, arguments, and options.
func NewRubberTree(ctx *pulumi.Context,
name string, args *RubberTreeArgs, opts ...pulumi.ResourceOption) (*RubberTree, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Diameter == nil {
args.Diameter = Diameter(6)
}
if args.Farm == nil {
args.Farm = pulumi.StringPtr("(unknown)")
}
if args.Size == nil {
args.Size = TreeSize("medium")
}
if args.Type == nil {
args.Type = RubberTreeVariety("Burgundy")
}
var resource RubberTree
err := ctx.RegisterResource("plant:tree/v1:RubberTree", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRubberTree gets an existing RubberTree resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetRubberTree(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RubberTreeState, opts ...pulumi.ResourceOption) (*RubberTree, error) {
var resource RubberTree
err := ctx.ReadResource("plant:tree/v1:RubberTree", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RubberTree resources.
type rubberTreeState struct {
Farm *string `pulumi:"farm"`
}
type RubberTreeState struct {
Farm pulumi.StringPtrInput
}
func (RubberTreeState) ElementType() reflect.Type {
return reflect.TypeOf((*rubberTreeState)(nil)).Elem()
}
type rubberTreeArgs struct {
Container *plantprovider.Container `pulumi:"container"`
Diameter Diameter `pulumi:"diameter"`
Farm *string `pulumi:"farm"`
Size *TreeSize `pulumi:"size"`
Type RubberTreeVariety `pulumi:"type"`
}
// The set of arguments for constructing a RubberTree resource.
type RubberTreeArgs struct {
Container plantprovider.ContainerPtrInput
Diameter DiameterInput
Farm pulumi.StringPtrInput
Size TreeSizePtrInput
Type RubberTreeVarietyInput
}
func (RubberTreeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*rubberTreeArgs)(nil)).Elem()
}
type RubberTreeInput interface {
pulumi.Input
ToRubberTreeOutput() RubberTreeOutput
ToRubberTreeOutputWithContext(ctx context.Context) RubberTreeOutput
}
func (*RubberTree) ElementType() reflect.Type {
return reflect.TypeOf((*RubberTree)(nil))
}
func (i *RubberTree) ToRubberTreeOutput() RubberTreeOutput {
return i.ToRubberTreeOutputWithContext(context.Background())
}
func (i *RubberTree) ToRubberTreeOutputWithContext(ctx context.Context) RubberTreeOutput {
return pulumi.ToOutputWithContext(ctx, i).(RubberTreeOutput)
}
type RubberTreeOutput struct{ *pulumi.OutputState }
func (RubberTreeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*RubberTree)(nil))
}
func (o RubberTreeOutput) ToRubberTreeOutput() RubberTreeOutput {
return o
}
func (o RubberTreeOutput) ToRubberTreeOutputWithContext(ctx context.Context) RubberTreeOutput {
return o
}
func init() {
pulumi.RegisterOutputType(RubberTreeOutput{})
}

View file

@ -0,0 +1,20 @@
{
"emittedFiles": [
"README.md",
"index.ts",
"package.json",
"provider.ts",
"tree/index.ts",
"tree/v1/index.ts",
"tree/v1/nursery.ts",
"tree/v1/rubberTree.ts",
"tsconfig.json",
"types/enums/index.ts",
"types/enums/tree/index.ts",
"types/enums/tree/v1/index.ts",
"types/index.ts",
"types/input.ts",
"types/output.ts",
"utilities.ts"
]
}

View file

@ -0,0 +1,32 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
// Export members:
export * from "./provider";
// Export enums:
export * from "./types/enums";
// Export sub-modules:
import * as tree from "./tree";
import * as types from "./types";
export {
tree,
types,
};
import { Provider } from "./provider";
pulumi.runtime.registerResourcePackage("plant", {
version: utilities.getVersion(),
constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => {
if (type !== "pulumi:providers:plant") {
throw new Error(`unknown provider type ${type}`);
}
return new Provider(name, <any>undefined, { urn });
},
});

View file

@ -0,0 +1,16 @@
{
"name": "@pulumi/plant",
"version": "${VERSION}",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@pulumi/pulumi": "^3.12"
},
"devDependencies": {
"typescript": "^3.7.0"
},
"pulumi": {
"resource": true
}
}

View file

@ -0,0 +1,46 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
export class Provider extends pulumi.ProviderResource {
/** @internal */
public static readonly __pulumiType = 'plant';
/**
* Returns true if the given object is an instance of Provider. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is Provider {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Provider.__pulumiType;
}
/**
* Create a Provider resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) {
let inputs: pulumi.Inputs = {};
opts = opts || {};
{
}
if (!opts.version) {
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
}
super(Provider.__pulumiType, name, inputs, opts);
}
}
/**
* The set of arguments for constructing a Provider resource.
*/
export interface ProviderArgs {
}

View file

@ -0,0 +1,9 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// Export sub-modules:
import * as v1 from "./v1";
export {
v1,
};

View file

@ -0,0 +1,31 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../../utilities";
// Export members:
export * from "./nursery";
export * from "./rubberTree";
// Export enums:
export * from "../../types/enums/tree/v1";
// Import resources to register:
import { Nursery } from "./nursery";
import { RubberTree } from "./rubberTree";
const _module = {
version: utilities.getVersion(),
construct: (name: string, type: string, urn: string): pulumi.Resource => {
switch (type) {
case "plant:tree/v1:Nursery":
return new Nursery(name, <any>undefined, { urn })
case "plant:tree/v1:RubberTree":
return new RubberTree(name, <any>undefined, { urn })
default:
throw new Error(`unknown resource type ${type}`);
}
},
};
pulumi.runtime.registerResourceModule("plant", "tree/v1", _module)

View file

@ -0,0 +1,73 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs, enums } from "../../types";
import * as utilities from "../../utilities";
export class Nursery extends pulumi.CustomResource {
/**
* Get an existing Nursery resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Nursery {
return new Nursery(name, undefined as any, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'plant:tree/v1:Nursery';
/**
* Returns true if the given object is an instance of Nursery. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is Nursery {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Nursery.__pulumiType;
}
/**
* Create a Nursery resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: NurseryArgs, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
opts = opts || {};
if (!opts.id) {
if ((!args || args.varieties === undefined) && !opts.urn) {
throw new Error("Missing required property 'varieties'");
}
inputs["sizes"] = args ? args.sizes : undefined;
inputs["varieties"] = args ? args.varieties : undefined;
} else {
}
if (!opts.version) {
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
}
super(Nursery.__pulumiType, name, inputs, opts);
}
}
/**
* The set of arguments for constructing a Nursery resource.
*/
export interface NurseryArgs {
/**
* The sizes of trees available
*/
sizes?: pulumi.Input<{[key: string]: pulumi.Input<enums.tree.v1.TreeSize>}>;
/**
* The varieties available
*/
varieties: pulumi.Input<pulumi.Input<enums.tree.v1.RubberTreeVariety>[]>;
}

View file

@ -0,0 +1,90 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs, enums } from "../../types";
import * as utilities from "../../utilities";
export class RubberTree extends pulumi.CustomResource {
/**
* Get an existing RubberTree resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RubberTreeState, opts?: pulumi.CustomResourceOptions): RubberTree {
return new RubberTree(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'plant:tree/v1:RubberTree';
/**
* Returns true if the given object is an instance of RubberTree. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is RubberTree {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === RubberTree.__pulumiType;
}
public readonly container!: pulumi.Output<outputs.Container | undefined>;
public readonly diameter!: pulumi.Output<enums.tree.v1.Diameter>;
public readonly farm!: pulumi.Output<enums.tree.v1.Farm | string | undefined>;
public readonly size!: pulumi.Output<enums.tree.v1.TreeSize | undefined>;
public readonly type!: pulumi.Output<enums.tree.v1.RubberTreeVariety>;
/**
* Create a RubberTree resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RubberTreeArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: RubberTreeArgs | RubberTreeState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as RubberTreeState | undefined;
inputs["farm"] = state ? state.farm : undefined;
} else {
const args = argsOrState as RubberTreeArgs | undefined;
if ((!args || args.diameter === undefined) && !opts.urn) {
throw new Error("Missing required property 'diameter'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
inputs["container"] = args ? args.container : undefined;
inputs["diameter"] = (args ? args.diameter : undefined) ?? 6;
inputs["farm"] = (args ? args.farm : undefined) ?? "(unknown)";
inputs["size"] = (args ? args.size : undefined) ?? "medium";
inputs["type"] = (args ? args.type : undefined) ?? "Burgundy";
}
if (!opts.version) {
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
}
super(RubberTree.__pulumiType, name, inputs, opts);
}
}
export interface RubberTreeState {
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
}
/**
* The set of arguments for constructing a RubberTree resource.
*/
export interface RubberTreeArgs {
container?: pulumi.Input<inputs.ContainerArgs>;
diameter: pulumi.Input<enums.tree.v1.Diameter>;
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
size?: pulumi.Input<enums.tree.v1.TreeSize>;
type: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
}

View file

@ -0,0 +1,30 @@
{
"compilerOptions": {
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"stripInternal": true,
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"strict": true
},
"files": [
"index.ts",
"provider.ts",
"tree/index.ts",
"tree/v1/index.ts",
"tree/v1/nursery.ts",
"tree/v1/rubberTree.ts",
"types/enums/index.ts",
"types/enums/tree/index.ts",
"types/enums/tree/v1/index.ts",
"types/index.ts",
"types/input.ts",
"types/output.ts",
"utilities.ts"
]
}

View file

@ -0,0 +1,65 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// Export sub-modules:
import * as tree from "./tree";
export {
tree,
};
export const CloudAuditOptionsLogName = {
/**
* Default. Should not be used.
*/
UnspecifiedLogName: "UNSPECIFIED_LOG_NAME",
/**
* Corresponds to "cloudaudit.googleapis.com/activity"
*/
AdminActivity: "ADMIN_ACTIVITY",
/**
* Corresponds to "cloudaudit.googleapis.com/data_access"
*/
DataAccess: "DATA_ACCESS",
/**
* What if triple quotes """ are used in the description
*/
Synthetic: "SYNTHETIC",
} as const;
/**
* The log_name to populate in the Cloud Audit Record. This is added to regress pulumi/pulumi issue #7913
*/
export type CloudAuditOptionsLogName = (typeof CloudAuditOptionsLogName)[keyof typeof CloudAuditOptionsLogName];
export const ContainerBrightness = {
ZeroPointOne: 0.1,
One: 1,
} as const;
export type ContainerBrightness = (typeof ContainerBrightness)[keyof typeof ContainerBrightness];
export const ContainerColor = {
Red: "red",
Blue: "blue",
Yellow: "yellow",
} as const;
/**
* plant container colors
*/
export type ContainerColor = (typeof ContainerColor)[keyof typeof ContainerColor];
export const ContainerSize = {
FourInch: 4,
SixInch: 6,
/**
* @deprecated Eight inch pots are no longer supported.
*/
EightInch: 8,
} as const;
/**
* plant container sizes
*/
export type ContainerSize = (typeof ContainerSize)[keyof typeof ContainerSize];

View file

@ -0,0 +1,9 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// Export sub-modules:
import * as v1 from "./v1";
export {
v1,
};

View file

@ -0,0 +1,45 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
export const Diameter = {
Sixinch: 6,
Twelveinch: 12,
} as const;
export type Diameter = (typeof Diameter)[keyof typeof Diameter];
export const Farm = {
Pulumi_Planters_Inc_: "Pulumi Planters Inc.",
Plants_R_Us: "Plants'R'Us",
} as const;
export type Farm = (typeof Farm)[keyof typeof Farm];
export const RubberTreeVariety = {
/**
* A burgundy rubber tree.
*/
Burgundy: "Burgundy",
/**
* A ruby rubber tree.
*/
Ruby: "Ruby",
/**
* A tineke rubber tree.
*/
Tineke: "Tineke",
} as const;
/**
* types of rubber trees
*/
export type RubberTreeVariety = (typeof RubberTreeVariety)[keyof typeof RubberTreeVariety];
export const TreeSize = {
Small: "small",
Medium: "medium",
Large: "large",
} as const;
export type TreeSize = (typeof TreeSize)[keyof typeof TreeSize];

View file

@ -0,0 +1,13 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// Export sub-modules:
import * as enums from "./enums";
import * as input from "./input";
import * as output from "./output";
export {
enums,
input,
output,
};

View file

@ -0,0 +1,12 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs, enums } from "../types";
export interface ContainerArgs {
brightness?: pulumi.Input<enums.ContainerBrightness>;
color?: pulumi.Input<enums.ContainerColor | string>;
material?: pulumi.Input<string>;
size: pulumi.Input<enums.ContainerSize>;
}

View file

@ -0,0 +1,13 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs, enums } from "../types";
export interface Container {
brightness?: enums.ContainerBrightness;
color?: enums.ContainerColor | string;
material?: string;
size: enums.ContainerSize;
}

View file

@ -0,0 +1,49 @@
// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
export function getEnv(...vars: string[]): string | undefined {
for (const v of vars) {
const value = process.env[v];
if (value) {
return value;
}
}
return undefined;
}
export function getEnvBoolean(...vars: string[]): boolean | undefined {
const s = getEnv(...vars);
if (s !== undefined) {
// NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
// Terraform uses internally when parsing boolean values.
if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
return true;
}
if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
return false;
}
}
return undefined;
}
export function getEnvNumber(...vars: string[]): number | undefined {
const s = getEnv(...vars);
if (s !== undefined) {
const f = parseFloat(s);
if (!isNaN(f)) {
return f;
}
}
return undefined;
}
export function getVersion(): string {
let version = require('./package.json').version;
// Node allows for the version to be prefixed by a "v", while semver doesn't.
// If there is a v, strip it off.
if (version.indexOf('v') === 0) {
version = version.slice(1);
}
return version;
}

View file

@ -0,0 +1,18 @@
{
"emittedFiles": [
"pulumi_plant/README.md",
"pulumi_plant/__init__.py",
"pulumi_plant/_enums.py",
"pulumi_plant/_inputs.py",
"pulumi_plant/_utilities.py",
"pulumi_plant/outputs.py",
"pulumi_plant/provider.py",
"pulumi_plant/py.typed",
"pulumi_plant/tree/__init__.py",
"pulumi_plant/tree/v1/__init__.py",
"pulumi_plant/tree/v1/_enums.py",
"pulumi_plant/tree/v1/nursery.py",
"pulumi_plant/tree/v1/rubber_tree.py",
"setup.py"
]
}

View file

@ -0,0 +1,44 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from . import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .provider import *
from ._inputs import *
from . import outputs
# Make subpackages available:
if typing.TYPE_CHECKING:
import pulumi_plant.tree as __tree
tree = __tree
else:
tree = _utilities.lazy_import('pulumi_plant.tree')
_utilities.register(
resource_modules="""
[
{
"pkg": "plant",
"mod": "tree/v1",
"fqn": "pulumi_plant.tree.v1",
"classes": {
"plant:tree/v1:Nursery": "Nursery",
"plant:tree/v1:RubberTree": "RubberTree"
}
}
]
""",
resource_packages="""
[
{
"pkg": "plant",
"token": "pulumi:providers:plant",
"fqn": "pulumi_plant",
"class": "Provider"
}
]
"""
)

View file

@ -0,0 +1,57 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'CloudAuditOptionsLogName',
'ContainerBrightness',
'ContainerColor',
'ContainerSize',
]
class CloudAuditOptionsLogName(str, Enum):
"""
The log_name to populate in the Cloud Audit Record. This is added to regress pulumi/pulumi issue #7913
"""
UNSPECIFIED_LOG_NAME = "UNSPECIFIED_LOG_NAME"
"""
Default. Should not be used.
"""
ADMIN_ACTIVITY = "ADMIN_ACTIVITY"
"""
Corresponds to "cloudaudit.googleapis.com/activity"
"""
DATA_ACCESS = "DATA_ACCESS"
"""
Corresponds to "cloudaudit.googleapis.com/data_access"
"""
SYNTHETIC = "SYNTHETIC"
"""
What if triple quotes \"\"\" are used in the description
"""
class ContainerBrightness(float, Enum):
ZERO_POINT_ONE = 0.1
ONE = 1
class ContainerColor(str, Enum):
"""
plant container colors
"""
RED = "red"
BLUE = "blue"
YELLOW = "yellow"
class ContainerSize(int, Enum):
"""
plant container sizes
"""
FOUR_INCH = 4
SIX_INCH = 6
EIGHT_INCH = 8

View file

@ -0,0 +1,69 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from ._enums import *
__all__ = [
'ContainerArgs',
]
@pulumi.input_type
class ContainerArgs:
def __init__(__self__, *,
size: pulumi.Input['ContainerSize'],
brightness: Optional[pulumi.Input['ContainerBrightness']] = None,
color: Optional[pulumi.Input[Union['ContainerColor', str]]] = None,
material: Optional[pulumi.Input[str]] = None):
pulumi.set(__self__, "size", size)
if brightness is None:
brightness = 1
if brightness is not None:
pulumi.set(__self__, "brightness", brightness)
if color is not None:
pulumi.set(__self__, "color", color)
if material is not None:
pulumi.set(__self__, "material", material)
@property
@pulumi.getter
def size(self) -> pulumi.Input['ContainerSize']:
return pulumi.get(self, "size")
@size.setter
def size(self, value: pulumi.Input['ContainerSize']):
pulumi.set(self, "size", value)
@property
@pulumi.getter
def brightness(self) -> Optional[pulumi.Input['ContainerBrightness']]:
return pulumi.get(self, "brightness")
@brightness.setter
def brightness(self, value: Optional[pulumi.Input['ContainerBrightness']]):
pulumi.set(self, "brightness", value)
@property
@pulumi.getter
def color(self) -> Optional[pulumi.Input[Union['ContainerColor', str]]]:
return pulumi.get(self, "color")
@color.setter
def color(self, value: Optional[pulumi.Input[Union['ContainerColor', str]]]):
pulumi.set(self, "color", value)
@property
@pulumi.getter
def material(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "material")
@material.setter
def material(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "material", value)

View file

@ -0,0 +1,235 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import importlib.util
import inspect
import json
import os
import pkg_resources
import sys
import typing
import pulumi
import pulumi.runtime
from semver import VersionInfo as SemverVersion
from parver import Version as PEP440Version
def get_env(*args):
for v in args:
value = os.getenv(v)
if value is not None:
return value
return None
def get_env_bool(*args):
str = get_env(*args)
if str is not None:
# NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
# Terraform uses internally when parsing boolean values.
if str in ["1", "t", "T", "true", "TRUE", "True"]:
return True
if str in ["0", "f", "F", "false", "FALSE", "False"]:
return False
return None
def get_env_int(*args):
str = get_env(*args)
if str is not None:
try:
return int(str)
except:
return None
return None
def get_env_float(*args):
str = get_env(*args)
if str is not None:
try:
return float(str)
except:
return None
return None
def _get_semver_version():
# __name__ is set to the fully-qualified name of the current module, In our case, it will be
# <some module>._utilities. <some module> is the module we want to query the version for.
root_package, *rest = __name__.split('.')
# pkg_resources uses setuptools to inspect the set of installed packages. We use it here to ask
# for the currently installed version of the root package (i.e. us) and get its version.
# Unfortunately, PEP440 and semver differ slightly in incompatible ways. The Pulumi engine expects
# to receive a valid semver string when receiving requests from the language host, so it's our
# responsibility as the library to convert our own PEP440 version into a valid semver string.
pep440_version_string = pkg_resources.require(root_package)[0].version
pep440_version = PEP440Version.parse(pep440_version_string)
(major, minor, patch) = pep440_version.release
prerelease = None
if pep440_version.pre_tag == 'a':
prerelease = f"alpha.{pep440_version.pre}"
elif pep440_version.pre_tag == 'b':
prerelease = f"beta.{pep440_version.pre}"
elif pep440_version.pre_tag == 'rc':
prerelease = f"rc.{pep440_version.pre}"
elif pep440_version.dev is not None:
prerelease = f"dev.{pep440_version.dev}"
# The only significant difference between PEP440 and semver as it pertains to us is that PEP440 has explicit support
# for dev builds, while semver encodes them as "prerelease" versions. In order to bridge between the two, we convert
# our dev build version into a prerelease tag. This matches what all of our other packages do when constructing
# their own semver string.
return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
# Determine the version once and cache the value, which measurably improves program performance.
_version = _get_semver_version()
_version_str = str(_version)
def get_version():
return _version_str
def get_resource_args_opts(resource_args_type, resource_options_type, *args, **kwargs):
"""
Return the resource args and options given the *args and **kwargs of a resource's
__init__ method.
"""
resource_args, opts = None, None
# If the first item is the resource args type, save it and remove it from the args list.
if args and isinstance(args[0], resource_args_type):
resource_args, args = args[0], args[1:]
# Now look at the first item in the args list again.
# If the first item is the resource options class, save it.
if args and isinstance(args[0], resource_options_type):
opts = args[0]
# If resource_args is None, see if "args" is in kwargs, and, if so, if it's typed as the
# the resource args type.
if resource_args is None:
a = kwargs.get("args")
if isinstance(a, resource_args_type):
resource_args = a
# If opts is None, look it up in kwargs.
if opts is None:
opts = kwargs.get("opts")
return resource_args, opts
# Temporary: just use pulumi._utils.lazy_import once everyone upgrades.
def lazy_import(fullname):
import pulumi._utils as u
f = getattr(u, 'lazy_import', None)
if f is None:
f = _lazy_import_temp
return f(fullname)
# Copied from pulumi._utils.lazy_import, see comments there.
def _lazy_import_temp(fullname):
m = sys.modules.get(fullname, None)
if m is not None:
return m
spec = importlib.util.find_spec(fullname)
m = sys.modules.get(fullname, None)
if m is not None:
return m
loader = importlib.util.LazyLoader(spec.loader)
spec.loader = loader
module = importlib.util.module_from_spec(spec)
m = sys.modules.get(fullname, None)
if m is not None:
return m
sys.modules[fullname] = module
loader.exec_module(module)
return module
class Package(pulumi.runtime.ResourcePackage):
def __init__(self, pkg_info):
super().__init__()
self.pkg_info = pkg_info
def version(self):
return _version
def construct_provider(self, name: str, typ: str, urn: str) -> pulumi.ProviderResource:
if typ != self.pkg_info['token']:
raise Exception(f"unknown provider type {typ}")
Provider = getattr(lazy_import(self.pkg_info['fqn']), self.pkg_info['class'])
return Provider(name, pulumi.ResourceOptions(urn=urn))
class Module(pulumi.runtime.ResourceModule):
def __init__(self, mod_info):
super().__init__()
self.mod_info = mod_info
def version(self):
return _version
def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
class_name = self.mod_info['classes'].get(typ, None)
if class_name is None:
raise Exception(f"unknown resource type {typ}")
TheClass = getattr(lazy_import(self.mod_info['fqn']), class_name)
return TheClass(name, pulumi.ResourceOptions(urn=urn))
def register(resource_modules, resource_packages):
resource_modules = json.loads(resource_modules)
resource_packages = json.loads(resource_packages)
for pkg_info in resource_packages:
pulumi.runtime.register_resource_package(pkg_info['pkg'], Package(pkg_info))
for mod_info in resource_modules:
pulumi.runtime.register_resource_module(
mod_info['pkg'],
mod_info['mod'],
Module(mod_info))
_F = typing.TypeVar('_F', bound=typing.Callable[..., typing.Any])
def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
"""Decorator internally used on {fn}_output lifted function versions
to implement them automatically from the un-lifted function."""
func_sig = inspect.signature(func)
def lifted_func(*args, opts=None, **kwargs):
bound_args = func_sig.bind(*args, **kwargs)
return pulumi.Output.from_input({
'args': bound_args.args,
'kwargs': bound_args.kwargs
}).apply(lambda resolved_args: func(*resolved_args['args'],
opts=opts,
**resolved_args['kwargs']))
return (lambda _: lifted_func)

View file

@ -0,0 +1,53 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from ._enums import *
__all__ = [
'Container',
]
@pulumi.output_type
class Container(dict):
def __init__(__self__, *,
size: 'ContainerSize',
brightness: Optional['ContainerBrightness'] = None,
color: Optional[str] = None,
material: Optional[str] = None):
pulumi.set(__self__, "size", size)
if brightness is None:
brightness = 1
if brightness is not None:
pulumi.set(__self__, "brightness", brightness)
if color is not None:
pulumi.set(__self__, "color", color)
if material is not None:
pulumi.set(__self__, "material", material)
@property
@pulumi.getter
def size(self) -> 'ContainerSize':
return pulumi.get(self, "size")
@property
@pulumi.getter
def brightness(self) -> Optional['ContainerBrightness']:
return pulumi.get(self, "brightness")
@property
@pulumi.getter
def color(self) -> Optional[str]:
return pulumi.get(self, "color")
@property
@pulumi.getter
def material(self) -> Optional[str]:
return pulumi.get(self, "material")

View file

@ -0,0 +1,73 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['ProviderArgs', 'Provider']
@pulumi.input_type
class ProviderArgs:
def __init__(__self__):
"""
The set of arguments for constructing a Provider resource.
"""
pass
class Provider(pulumi.ProviderResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
__props__=None):
"""
Create a Plant resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[ProviderArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Create a Plant resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param ProviderArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ProviderArgs.__new__(ProviderArgs)
super(Provider, __self__).__init__(
'plant',
resource_name,
__props__,
opts)

View file

@ -0,0 +1,14 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from .. import _utilities
import typing
# Make subpackages available:
if typing.TYPE_CHECKING:
import pulumi_plant.tree.v1 as __v1
v1 = __v1
else:
v1 = _utilities.lazy_import('pulumi_plant.tree.v1')

View file

@ -0,0 +1,10 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from ... import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .nursery import *
from .rubber_tree import *

View file

@ -0,0 +1,46 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'Diameter',
'Farm',
'RubberTreeVariety',
'TreeSize',
]
class Diameter(float, Enum):
SIXINCH = 6
TWELVEINCH = 12
class Farm(str, Enum):
PULUMI_PLANTERS_INC_ = "Pulumi Planters Inc."
PLANTS_R_US = "Plants'R'Us"
class RubberTreeVariety(str, Enum):
"""
types of rubber trees
"""
BURGUNDY = "Burgundy"
"""
A burgundy rubber tree.
"""
RUBY = "Ruby"
"""
A ruby rubber tree.
"""
TINEKE = "Tineke"
"""
A tineke rubber tree.
"""
class TreeSize(str, Enum):
SMALL = "small"
MEDIUM = "medium"
LARGE = "large"

View file

@ -0,0 +1,132 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from ._enums import *
__all__ = ['NurseryArgs', 'Nursery']
@pulumi.input_type
class NurseryArgs:
def __init__(__self__, *,
varieties: pulumi.Input[Sequence[pulumi.Input['RubberTreeVariety']]],
sizes: Optional[pulumi.Input[Mapping[str, pulumi.Input['TreeSize']]]] = None):
"""
The set of arguments for constructing a Nursery resource.
:param pulumi.Input[Sequence[pulumi.Input['RubberTreeVariety']]] varieties: The varieties available
:param pulumi.Input[Mapping[str, pulumi.Input['TreeSize']]] sizes: The sizes of trees available
"""
pulumi.set(__self__, "varieties", varieties)
if sizes is not None:
pulumi.set(__self__, "sizes", sizes)
@property
@pulumi.getter
def varieties(self) -> pulumi.Input[Sequence[pulumi.Input['RubberTreeVariety']]]:
"""
The varieties available
"""
return pulumi.get(self, "varieties")
@varieties.setter
def varieties(self, value: pulumi.Input[Sequence[pulumi.Input['RubberTreeVariety']]]):
pulumi.set(self, "varieties", value)
@property
@pulumi.getter
def sizes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input['TreeSize']]]]:
"""
The sizes of trees available
"""
return pulumi.get(self, "sizes")
@sizes.setter
def sizes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input['TreeSize']]]]):
pulumi.set(self, "sizes", value)
class Nursery(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
sizes: Optional[pulumi.Input[Mapping[str, pulumi.Input['TreeSize']]]] = None,
varieties: Optional[pulumi.Input[Sequence[pulumi.Input['RubberTreeVariety']]]] = None,
__props__=None):
"""
Create a Nursery resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Mapping[str, pulumi.Input['TreeSize']]] sizes: The sizes of trees available
:param pulumi.Input[Sequence[pulumi.Input['RubberTreeVariety']]] varieties: The varieties available
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: NurseryArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Create a Nursery resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param NurseryArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(NurseryArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
sizes: Optional[pulumi.Input[Mapping[str, pulumi.Input['TreeSize']]]] = None,
varieties: Optional[pulumi.Input[Sequence[pulumi.Input['RubberTreeVariety']]]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = NurseryArgs.__new__(NurseryArgs)
__props__.__dict__["sizes"] = sizes
if varieties is None and not opts.urn:
raise TypeError("Missing required property 'varieties'")
__props__.__dict__["varieties"] = varieties
super(Nursery, __self__).__init__(
'plant:tree/v1:Nursery',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'Nursery':
"""
Get an existing Nursery resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = NurseryArgs.__new__(NurseryArgs)
return Nursery(resource_name, opts=opts, __props__=__props__)

View file

@ -0,0 +1,240 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from ... import _enums as _root_enums
from ... import _inputs as _root_inputs
from ... import outputs as _root_outputs
from ._enums import *
__all__ = ['RubberTreeArgs', 'RubberTree']
@pulumi.input_type
class RubberTreeArgs:
def __init__(__self__, *,
diameter: pulumi.Input['Diameter'],
type: pulumi.Input['RubberTreeVariety'],
container: Optional[pulumi.Input['_root_inputs.ContainerArgs']] = None,
farm: Optional[pulumi.Input[Union['Farm', str]]] = None,
size: Optional[pulumi.Input['TreeSize']] = None):
"""
The set of arguments for constructing a RubberTree resource.
"""
if diameter is None:
diameter = 6
pulumi.set(__self__, "diameter", diameter)
if type is None:
type = 'Burgundy'
pulumi.set(__self__, "type", type)
if container is not None:
pulumi.set(__self__, "container", container)
if farm is None:
farm = '(unknown)'
if farm is not None:
pulumi.set(__self__, "farm", farm)
if size is None:
size = 'medium'
if size is not None:
pulumi.set(__self__, "size", size)
@property
@pulumi.getter
def diameter(self) -> pulumi.Input['Diameter']:
return pulumi.get(self, "diameter")
@diameter.setter
def diameter(self, value: pulumi.Input['Diameter']):
pulumi.set(self, "diameter", value)
@property
@pulumi.getter
def type(self) -> pulumi.Input['RubberTreeVariety']:
return pulumi.get(self, "type")
@type.setter
def type(self, value: pulumi.Input['RubberTreeVariety']):
pulumi.set(self, "type", value)
@property
@pulumi.getter
def container(self) -> Optional[pulumi.Input['_root_inputs.ContainerArgs']]:
return pulumi.get(self, "container")
@container.setter
def container(self, value: Optional[pulumi.Input['_root_inputs.ContainerArgs']]):
pulumi.set(self, "container", value)
@property
@pulumi.getter
def farm(self) -> Optional[pulumi.Input[Union['Farm', str]]]:
return pulumi.get(self, "farm")
@farm.setter
def farm(self, value: Optional[pulumi.Input[Union['Farm', str]]]):
pulumi.set(self, "farm", value)
@property
@pulumi.getter
def size(self) -> Optional[pulumi.Input['TreeSize']]:
return pulumi.get(self, "size")
@size.setter
def size(self, value: Optional[pulumi.Input['TreeSize']]):
pulumi.set(self, "size", value)
@pulumi.input_type
class _RubberTreeState:
def __init__(__self__, *,
farm: Optional[pulumi.Input[Union['Farm', str]]] = None):
"""
Input properties used for looking up and filtering RubberTree resources.
"""
if farm is None:
farm = '(unknown)'
if farm is not None:
pulumi.set(__self__, "farm", farm)
@property
@pulumi.getter
def farm(self) -> Optional[pulumi.Input[Union['Farm', str]]]:
return pulumi.get(self, "farm")
@farm.setter
def farm(self, value: Optional[pulumi.Input[Union['Farm', str]]]):
pulumi.set(self, "farm", value)
class RubberTree(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
container: Optional[pulumi.Input[pulumi.InputType['_root_inputs.ContainerArgs']]] = None,
diameter: Optional[pulumi.Input['Diameter']] = None,
farm: Optional[pulumi.Input[Union['Farm', str]]] = None,
size: Optional[pulumi.Input['TreeSize']] = None,
type: Optional[pulumi.Input['RubberTreeVariety']] = None,
__props__=None):
"""
Create a RubberTree resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: RubberTreeArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Create a RubberTree resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param RubberTreeArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(RubberTreeArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
container: Optional[pulumi.Input[pulumi.InputType['_root_inputs.ContainerArgs']]] = None,
diameter: Optional[pulumi.Input['Diameter']] = None,
farm: Optional[pulumi.Input[Union['Farm', str]]] = None,
size: Optional[pulumi.Input['TreeSize']] = None,
type: Optional[pulumi.Input['RubberTreeVariety']] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = RubberTreeArgs.__new__(RubberTreeArgs)
__props__.__dict__["container"] = container
if diameter is None:
diameter = 6
if diameter is None and not opts.urn:
raise TypeError("Missing required property 'diameter'")
__props__.__dict__["diameter"] = diameter
if farm is None:
farm = '(unknown)'
__props__.__dict__["farm"] = farm
if size is None:
size = 'medium'
__props__.__dict__["size"] = size
if type is None:
type = 'Burgundy'
if type is None and not opts.urn:
raise TypeError("Missing required property 'type'")
__props__.__dict__["type"] = type
super(RubberTree, __self__).__init__(
'plant:tree/v1:RubberTree',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
farm: Optional[pulumi.Input[Union['Farm', str]]] = None) -> 'RubberTree':
"""
Get an existing RubberTree resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _RubberTreeState.__new__(_RubberTreeState)
__props__.__dict__["farm"] = farm
__props__.__dict__["container"] = None
__props__.__dict__["diameter"] = None
__props__.__dict__["size"] = None
__props__.__dict__["type"] = None
return RubberTree(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def container(self) -> pulumi.Output[Optional['_root_outputs.Container']]:
return pulumi.get(self, "container")
@property
@pulumi.getter
def diameter(self) -> pulumi.Output['Diameter']:
return pulumi.get(self, "diameter")
@property
@pulumi.getter
def farm(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "farm")
@property
@pulumi.getter
def size(self) -> pulumi.Output[Optional['TreeSize']]:
return pulumi.get(self, "size")
@property
@pulumi.getter
def type(self) -> pulumi.Output['RubberTreeVariety']:
return pulumi.get(self, "type")

View file

@ -0,0 +1,58 @@
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import errno
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import check_call
VERSION = "0.0.0"
PLUGIN_VERSION = "0.0.0"
class InstallPluginCommand(install):
def run(self):
install.run(self)
try:
check_call(['pulumi', 'plugin', 'install', 'resource', 'plant', PLUGIN_VERSION])
except OSError as error:
if error.errno == errno.ENOENT:
print(f"""
There was an error installing the plant resource provider plugin.
It looks like `pulumi` is not installed on your system.
Please visit https://pulumi.com/ to install the Pulumi CLI.
You may try manually installing the plugin by running
`pulumi plugin install resource plant {PLUGIN_VERSION}`
""")
else:
raise
def readme():
try:
with open('README.md', encoding='utf-8') as f:
return f.read()
except FileNotFoundError:
return "plant Pulumi Package - Development Version"
setup(name='pulumi_plant',
version=VERSION,
long_description=readme(),
long_description_content_type='text/markdown',
cmdclass={
'install': InstallPluginCommand,
},
packages=find_packages(),
package_data={
'pulumi_plant': [
'py.typed',
]
},
install_requires=[
'parver>=0.2.1',
'pulumi',
'semver>=2.8.1'
],
zip_safe=False)

View file

@ -0,0 +1,266 @@
{
"version": "0.0.1",
"name": "plant",
"resources": {
"plant:tree/v1:Nursery": {
"inputProperties": {
"varieties": {
"type": "array",
"items": {
"$ref": "#/types/plant:tree/v1:RubberTreeVariety"
},
"description": "The varieties available"
},
"sizes": {
"type": "object",
"additionalProperties": {
"$ref": "#/types/plant:tree/v1:TreeSize"
},
"description": "The sizes of trees available"
}
},
"requiredInputs": ["varieties"]
},
"plant:tree/v1:RubberTree": {
"inputProperties": {
"container": {
"$ref": "#/types/plant::Container"
},
"type": {
"$ref": "#/types/plant:tree/v1:RubberTreeVariety",
"default": "Burgundy"
},
"farm": {
"oneOf": [
{ "$ref": "#/types/plant:tree/v1:Farm" },
{ "type": "string" }
],
"default": "(unknown)"
},
"size": {
"$ref": "#/types/plant:tree/v1:TreeSize",
"default": "medium"
},
"diameter": {
"$ref": "#/types/plant:tree/v1:Diameter",
"default": 6
}
},
"stateInputs": {
"properties": {
"farm": {
"oneOf": [
{ "$ref": "#/types/plant:tree/v1:Farm" },
{ "type": "string" }
],
"default": "(unknown)"
}
}
},
"properties": {
"container": {
"$ref": "#/types/plant::Container"
},
"type": {
"$ref": "#/types/plant:tree/v1:RubberTreeVariety"
},
"farm": {
"oneOf": [
{ "$ref": "#/types/plant:tree/v1:Farm" },
{ "type": "string" }
]
},
"size": {
"$ref": "#/types/plant:tree/v1:TreeSize",
"default": "medium"
},
"diameter": {
"$ref": "#/types/plant:tree/v1:Diameter",
"default": 6
}
},
"required": ["type", "diameter"],
"requiredInputs": ["type", "diameter"]
}
},
"types": {
"plant::CloudAuditOptionsLogName": {
"description": "The log_name to populate in the Cloud Audit Record. This is added to regress pulumi/pulumi issue #7913",
"type": "string",
"enum": [
{
"name": "UnspecifiedLogName",
"description": "Default. Should not be used.",
"value": "UNSPECIFIED_LOG_NAME"
},
{
"name": "AdminActivity",
"description": "Corresponds to \"cloudaudit.googleapis.com/activity\"",
"value": "ADMIN_ACTIVITY"
},
{
"name": "DataAccess",
"description": "Corresponds to \"cloudaudit.googleapis.com/data_access\"",
"value": "DATA_ACCESS"
},
{
"name": "Synthetic",
"description": "What if triple quotes \"\"\" are used in the description",
"value": "SYNTHETIC"
}
]
},
"plant::Container": {
"type": "object",
"properties": {
"size": {
"$ref": "#/types/plant::ContainerSize"
},
"material": {
"type": "string"
},
"color": {
"oneOf": [
{ "$ref": "#/types/plant::ContainerColor" },
{ "type": "string" }
]
},
"brightness": {
"$ref": "#/types/plant::ContainerBrightness",
"default": 1.0
}
},
"required": ["size"]
},
"plant::ContainerSize": {
"type": "integer",
"description": "plant container sizes",
"enum": [
{
"value": 4,
"name": "FourInch"
},
{
"value": 6,
"name": "SixInch"
},
{
"value": 8,
"name": "EightInch",
"deprecationMessage": "Eight inch pots are no longer supported."
}
]
},
"plant::ContainerColor": {
"type": "string",
"description": "plant container colors",
"enum": [
{
"value": "red"
},
{
"value": "blue"
},
{
"value": "yellow"
}
]
},
"plant::ContainerBrightness": {
"type": "number",
"enum": [
{
"name": "ZeroPointOne",
"value": 0.1
},
{
"name": "One",
"value": 1.0
}
]
},
"plant:tree/v1:RubberTreeVariety": {
"type": "string",
"description": "types of rubber trees",
"enum": [
{
"value": "Burgundy",
"description": "A burgundy rubber tree."
},
{
"value": "Ruby",
"description": "A ruby rubber tree."
},
{
"value": "Tineke",
"description": "A tineke rubber tree."
}
]
},
"plant:tree/v1:Farm": {
"type": "string",
"enum": [
{
"value": "Pulumi Planters Inc."
},
{
"value": "Plants'R'Us"
}
]
},
"plant:tree/v1:TreeSize": {
"type": "string",
"enum": [
{
"value": "small"
},
{
"value": "medium"
},
{
"value": "large"
}
]
},
"plant:tree/v1:Diameter": {
"type": "number",
"enum": [
{
"name": "sixinch",
"value": 6
},
{
"name": "twelveinch",
"value": 12
}
]
}
},
"language": {
"csharp": {
"namespaces": {
"plant": "Plant",
"tree/v1": "Tree.V1"
},
"packageReferences": {
"Pulumi": "3.12"
}
},
"go": {
"importBasePath": "dashed-import-schema/plant-provider"
},
"nodejs": {
"dependencies": {
"@pulumi/pulumi": "^3.12"
},
"devDependencies": {
"typescript": "^3.7.0"
}
},
"python": {
"moduleNameOverrides": {
"tree/v1": "tree/v1"
}
}
}
}