<p>I'm developing a Pulumi ComponentResource named CopyPostgresql in Typescript.</p>

<p>CopyPostgreSql is a Kubernetes job that copy in streaming the content of a source Postgresql database to a target Postgresql database. The options of CopyPostgreSql include properties source and target. Both are of type DatabaseInput.</p>

<pre><code>export interface DatabaseInput {
    readonly port: Input&lt;number&gt;;
    readonly user: Input&lt;string&gt;;
    readonly password: Input&lt;string&gt;;
    readonly host: Input&lt;string&gt;;
    readonly dbname: Input&lt;string&gt;;
}
</code></pre>

<p>So, i want to use port as value of another property from another component, but that another property is of type Input&lt; string >.</p>

<p>How can i apply (or transform) a value of type Input&lt; number > to Input&lt; string >? and in general: In Pulumi, exist a equivalent to pulumi.Output.apply, but to transform pulumi.Input values?</p>

<p>You can do <code>pulumi.output(inputValue).apply(f)</code>.</p>

<p>So, you can flow them back and forth:</p>

<pre><code>const input1: pulumi.Input&lt;string&gt; = "hi";
const output1 = pulumi.output(input1);
const output2 = output1.apply(s =&gt; s.toUpperCase());
const input2: pulumi.Input&lt;string&gt; = output2;
</code></pre>
