4b7985384c
* Add test case * Fix tests * Add test dependencies correctly * Feed through error handling * Include test output * Get types to line up * Add remaining test files * Update changelog * Correctly find type paths * Handle transitive objects * Handle required fields * Add feature flag for go * Add required+default test case * Don't `<any>` cast known types. * Add more flags. I realize this should really wait for PR#8400 to merge. * Add plain object to env-helper test This test fails right now. My next problem is fixing it. * Handle plain types * Handle function inputs * Fix the indentation * Handle output types correctly * Remove unnecessary `!` * Add test case * Fix tests * Add test dependencies correctly * Feed through error handling * Include test output * Get types to line up * Add remaining test files * Update changelog * Correctly find type paths * Handle transitive objects * Handle required fields * Add required+default test case * Don't `<any>` cast known types. * Add plain object to env-helper test This test fails right now. My next problem is fixing it. * Handle plain types * Handle function inputs * Fix the indentation * Handle output types correctly * Remove unnecessary `!` * Start on `genPlainObjectDefaultFunc` * Add missing change to fix test * Run tests with merge * Refactor out assign * Merge in next _index.md diff * Change method name to `Defaults` * Handle enums correctly * Another attempt at _index.md * Make module generation deterministic * Add checks for old values * Insert defaults in resources * Fix docs generation Credit to @praneetloke * Progress on adding defaults to Resource arguments * Handle resource argument defaults * Don't create defaults if disableObjectDefaults * Rename test folder * Add test for disable flag * Fix disable test * Update docs * Abstract out nil comparisons * Use reflection to test for empty values * Simplify Ptr and pulumi.Any type handling * Remove unused function * Apply defaults to functions * Update new test with master codegen * Tests + nil check
395 lines
18 KiB
Markdown
395 lines
18 KiB
Markdown
|
|
---
|
|
title: "Provider"
|
|
title_tag: "example.Provider"
|
|
meta_desc: "Documentation for the example.Provider resource with examples, input properties, output properties, lookup functions, and supporting types."
|
|
layout: api
|
|
no_edit_this_page: true
|
|
---
|
|
|
|
|
|
|
|
<!-- WARNING: this file was generated by test. -->
|
|
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
|
|
|
|
The provider type for the kubernetes package.
|
|
|
|
|
|
|
|
|
|
## 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="nx">helm_release_settings</span><span class="p">:</span> <span class="nx">Optional[HelmReleaseSettingsArgs]</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'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'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'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'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"><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="helmreleasesettings_csharp">
|
|
<a href="#helmreleasesettings_csharp" style="color: inherit; text-decoration: inherit;">Helm<wbr>Release<wbr>Settings</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings<wbr>Args</a></span>
|
|
</dt>
|
|
<dd>{{% md %}}BETA FEATURE - Options to configure the Helm Release resource.{{% /md %}}</dd></dl>
|
|
{{% /choosable %}}
|
|
|
|
{{% choosable language go %}}
|
|
<dl class="resources-properties"><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="helmreleasesettings_go">
|
|
<a href="#helmreleasesettings_go" style="color: inherit; text-decoration: inherit;">Helm<wbr>Release<wbr>Settings</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings<wbr>Args</a></span>
|
|
</dt>
|
|
<dd>{{% md %}}BETA FEATURE - Options to configure the Helm Release resource.{{% /md %}}</dd></dl>
|
|
{{% /choosable %}}
|
|
|
|
{{% choosable language nodejs %}}
|
|
<dl class="resources-properties"><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="helmreleasesettings_nodejs">
|
|
<a href="#helmreleasesettings_nodejs" style="color: inherit; text-decoration: inherit;">helm<wbr>Release<wbr>Settings</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings<wbr>Args</a></span>
|
|
</dt>
|
|
<dd>{{% md %}}BETA FEATURE - Options to configure the Helm Release resource.{{% /md %}}</dd></dl>
|
|
{{% /choosable %}}
|
|
|
|
{{% choosable language python %}}
|
|
<dl class="resources-properties"><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="helm_release_settings_python">
|
|
<a href="#helm_release_settings_python" style="color: inherit; text-decoration: inherit;">helm_<wbr>release_<wbr>settings</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings<wbr>Args</a></span>
|
|
</dt>
|
|
<dd>{{% md %}}BETA FEATURE - Options to configure the Helm Release resource.{{% /md %}}</dd></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 %}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Supporting Types
|
|
|
|
|
|
|
|
<h4 id="helmreleasesettings">Helm<wbr>Release<wbr>Settings</h4>
|
|
|
|
{{% choosable language csharp %}}
|
|
<dl class="resources-properties"><dt class="property-required"
|
|
title="Required">
|
|
<span id="requiredarg_csharp">
|
|
<a href="#requiredarg_csharp" style="color: inherit; text-decoration: inherit;">Required<wbr>Arg</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}to test required args{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="driver_csharp">
|
|
<a href="#driver_csharp" style="color: inherit; text-decoration: inherit;">Driver</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}The backend storage driver for Helm. Values are: configmap, secret, memory, sql.{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="pluginspath_csharp">
|
|
<a href="#pluginspath_csharp" style="color: inherit; text-decoration: inherit;">Plugins<wbr>Path</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}The path to the helm plugins directory.{{% /md %}}</dd></dl>
|
|
{{% /choosable %}}
|
|
|
|
{{% choosable language go %}}
|
|
<dl class="resources-properties"><dt class="property-required"
|
|
title="Required">
|
|
<span id="requiredarg_go">
|
|
<a href="#requiredarg_go" style="color: inherit; text-decoration: inherit;">Required<wbr>Arg</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}to test required args{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="driver_go">
|
|
<a href="#driver_go" style="color: inherit; text-decoration: inherit;">Driver</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}The backend storage driver for Helm. Values are: configmap, secret, memory, sql.{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="pluginspath_go">
|
|
<a href="#pluginspath_go" style="color: inherit; text-decoration: inherit;">Plugins<wbr>Path</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}The path to the helm plugins directory.{{% /md %}}</dd></dl>
|
|
{{% /choosable %}}
|
|
|
|
{{% choosable language nodejs %}}
|
|
<dl class="resources-properties"><dt class="property-required"
|
|
title="Required">
|
|
<span id="requiredarg_nodejs">
|
|
<a href="#requiredarg_nodejs" style="color: inherit; text-decoration: inherit;">required<wbr>Arg</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}to test required args{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="driver_nodejs">
|
|
<a href="#driver_nodejs" style="color: inherit; text-decoration: inherit;">driver</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}The backend storage driver for Helm. Values are: configmap, secret, memory, sql.{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="pluginspath_nodejs">
|
|
<a href="#pluginspath_nodejs" style="color: inherit; text-decoration: inherit;">plugins<wbr>Path</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>{{% md %}}The path to the helm plugins directory.{{% /md %}}</dd></dl>
|
|
{{% /choosable %}}
|
|
|
|
{{% choosable language python %}}
|
|
<dl class="resources-properties"><dt class="property-required"
|
|
title="Required">
|
|
<span id="required_arg_python">
|
|
<a href="#required_arg_python" style="color: inherit; text-decoration: inherit;">required_<wbr>arg</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">str</span>
|
|
</dt>
|
|
<dd>{{% md %}}to test required args{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="driver_python">
|
|
<a href="#driver_python" style="color: inherit; text-decoration: inherit;">driver</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">str</span>
|
|
</dt>
|
|
<dd>{{% md %}}The backend storage driver for Helm. Values are: configmap, secret, memory, sql.{{% /md %}}</dd><dt class="property-optional"
|
|
title="Optional">
|
|
<span id="plugins_path_python">
|
|
<a href="#plugins_path_python" style="color: inherit; text-decoration: inherit;">plugins_<wbr>path</a>
|
|
</span>
|
|
<span class="property-indicator"></span>
|
|
<span class="property-type">str</span>
|
|
</dt>
|
|
<dd>{{% md %}}The path to the helm plugins directory.{{% /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>
|
|
|