Skip to content

Commit

Permalink
adding content and code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
toriancrane committed Oct 9, 2024
1 parent e078708 commit 0db8d5b
Show file tree
Hide file tree
Showing 23 changed files with 898 additions and 3 deletions.
2 changes: 1 addition & 1 deletion content/tutorials/creating-resources-aws/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,6 @@ In this tutorial, you made an EC2 instance configured as an Nginx webserver and

To learn more about creating resources in Pulumi, take a look at the following resources:

- Learn more about stack outputs and references in the [Stack Outputs and References](/docs/using-pulumi/stack-outputs-and-references/) tutorial.
- Learn more about stack outputs and references in the [Reference AWS Resources Across Stacks tutorial](/tutorials/stack-outputs-refs-aws/) tutorial.
- Learn more about inputs and outputs in the [Inputs and Outputs](/docs/concepts/inputs-outputs/) documentation.
- Learn more about [resource names](/docs/concepts/resources/names/), [options](/docs/concepts/options/), and [providers](/docs/concepts/resources/providers/) in the Pulumi documentation.
2 changes: 1 addition & 1 deletion content/tutorials/creating-resources-azure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,6 @@ In this tutorial, you made a resource group and a storage account, and you confi

To learn more about creating resources in Pulumi, take a look at the following resources:

- Learn more about stack outputs and references in the [Stack Outputs and References](/tutorials/stack-outputs-and-references/) tutorial.
- Learn more about stack outputs and references in the [Reference AWS Resources Across Stacks tutorial](/tutorials/stack-outputs-refs-azure/) tutorial.
- Learn more about inputs and outputs in the [Inputs and Outputs](/docs/concepts/inputs-outputs/) documentation.
- Learn more about [resource names](/docs/concepts/resources/names/), [options](/docs/concepts/options/), and [providers](/docs/concepts/resources/providers/) in the Pulumi documentation.
64 changes: 63 additions & 1 deletion content/tutorials/stack-outputs-refs-aws/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,68 @@ name: s3-writer

### Export resource values

Now that you have your project resources defined, you can [export the values](/docs/concepts/stack/#outputs) of various resource properties from your program. When defining these exports, you'll need to provide two arguments:
Now that you have your project resources defined, you can [export the values](/docs/concepts/stack/#outputs) of various resource properties from your program. The `export` syntax is as follows:

{{< chooser language "javascript,typescript,python,go,csharp,yaml" / >}}

{{% choosable language javascript %}}

```javascript
exports.<output-name> = <output-value>;
```

{{% /choosable %}}

{{% choosable language typescript %}}

```typescript
export const <output-name> = <output-value>;
```

{{% /choosable %}}

{{% choosable language python %}}

```python
pulumi.export("<output-name>", <output-value>)
```

{{% /choosable %}}

{{% choosable language go %}}

```go
ctx.Export("<output-name>", <output-value>)
```

{{% /choosable %}}

{{% choosable language csharp %}}

```csharp
return await Pulumi.Deployment.RunAsync(() =>
{

return new Dictionary<string, object?>
{
["<output-name>"] = <output-value>
};

});
```

{{% /choosable %}}

{{% choosable language yaml %}}

```yaml
outputs:
<output-name>: ${<output-value>}
```
{{% /choosable %}}
When defining these exports, you'll need to provide two arguments:
| Argument | Description |
|--------------|-------------|
Expand Down Expand Up @@ -708,5 +769,6 @@ You exported Lambda properties into stack outputs, and referenced those outputs

To learn more about creating and managing resources in Pulumi, take a look at the following resources:

- Learn more about creating resources in the [Creating Resources on AWS tutorial](/tutorials/creating-resources-aws/).
- Learn more about [stack outputs and references](/docs/concepts/stack/#stackreferences) in the Pulumi documentation.
- Learn more about [Pulumi inputs and outputs](/docs/concepts/inputs-outputs/) in the Pulumi documentation.
Loading

0 comments on commit 0db8d5b

Please sign in to comment.