Skip to content

Commit 2de5f3d

Browse files
committed
[formal provider] add docs
1 parent 3d8d861 commit 2de5f3d

File tree

5 files changed

+191
-0
lines changed

5 files changed

+191
-0
lines changed

community-packages/package-list.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@
391391
{
392392
"repoSlug": "ionos-cloud/pulumi-ionoscloud",
393393
"schemaFile": "provider/cmd/pulumi-resource-ionoscloud/schema.json"
394+
},
395+
{
396+
"repoSlug": "formalco/pulumi-formal",
397+
"schemaFile": "provider/cmd/pulumi-resource-formal/schema.json"
394398
}
395399
]
396400
}
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
# WARNING: this file was fetched from https://raw.githubusercontent.com/formalco/pulumi-formal/v1.0.2/docs/_index.md
3+
# Do not edit by hand unless you're certain you know what you are doing!
4+
title: Formal Provider
5+
meta_desc: Provides an overview on how to configure the Pulumi Formal provider.
6+
layout: package
7+
---
8+
9+
## Installation
10+
11+
The Formal provider is available as a package in the following Pulumi languages:
12+
13+
* JavaScript/TypeScript: [`@formalco/pulumi`](https://www.npmjs.com/package/@formalco/pulumi)
14+
* Python: [`pulumi-formal`](https://pypi.org/project/pulumi-formal/)
15+
* Go: [`github.com/formalco/pulumi-formal/sdk/go/formal`](https://pkg.go.dev/github.com/formalco/pulumi-formal/sdk/go/formal)
16+
* .NET: [`Formal.Pulumi`](https://www.nuget.org/packages/Formal.Pulumi)
17+
18+
## Overview
19+
20+
Use the Formal Pulumi Provider to interact with the
21+
many resources supported by Formal.
22+
23+
Use the navigation to the left to read about the available resources.
24+
25+
## Authentication and Configuration
26+
27+
Configuration for the Formal Provider is derived from the API tokens you can generate via the Formal Console.
28+
29+
### Provider Configuration
30+
31+
!> **Warning:** Hard-coded credentials are not recommended in any Pulumi
32+
configuration and risks secret leakage should this file ever be committed to a
33+
public version control system.
34+
35+
Credentials can be provided by adding an `apiKey`:
36+
37+
```yaml
38+
# Pulumi.yaml provider configuration file
39+
name: configuration-example
40+
runtime:
41+
config:
42+
formal:apiKey:
43+
value: '<apiKey>'
44+
```
45+
46+
You can also use `pulumi config set formal:apiKey <apiKey> --secret` to set the API key.
47+
48+
Credentials can also be provided by using the `FORMAL_API_KEY` environment variable.
49+
50+
For example:
51+
```yaml
52+
# Pulumi.yaml provider configuration file
53+
name: configuration-example
54+
runtime:
55+
56+
```
57+
58+
```bash
59+
export FORMAL_API_KEY="some_api_key" pulumi up
60+
```
61+
62+
## Examples
63+
64+
{{< chooser language "go,typescript,python,csharp" >}}
65+
{{% choosable language go %}}
66+
```go
67+
package main
68+
69+
import (
70+
formal "github.com/formalco/pulumi-formal/sdk/go/formal"
71+
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
72+
)
73+
74+
func main() {
75+
pulumi.Run(func(ctx *pulumi.Context) error {
76+
// Create a new connector instance.
77+
_, err := formal.NewConnector(ctx, "demo-connector", &formal.ConnectorArgs{
78+
Name: pulumi.String("demo-connector"),
79+
SpaceId: nil,
80+
TerminationProtection: pulumi.Bool(false),
81+
})
82+
83+
return err
84+
})
85+
}
86+
```
87+
{{% /choosable %}}
88+
89+
{{% choosable language typescript %}}
90+
```typescript
91+
import * as formal from "@formalco/pulumi";
92+
93+
new formal.Connector('demo-connector', {
94+
name: 'demo-connector',
95+
spaceId: undefined,
96+
terminationProtection: false,
97+
})
98+
```
99+
{{% /choosable %}}
100+
101+
{{% choosable language python %}}
102+
```python
103+
import pulumi_formal as formal
104+
105+
formal.Connector('demo-connector',
106+
name='demo-connector',
107+
space_id=None,
108+
termination_protection=False,
109+
)
110+
```
111+
{{% /choosable %}}
112+
113+
{{% choosable language csharp %}}
114+
```csharp
115+
using System.Collections.Generic;
116+
using Pulumi;
117+
using Formal.Pulumi;
118+
119+
return await Deployment.RunAsync(() =>
120+
{
121+
var connector = new Connector("demo-connector", new ConnectorArgs {
122+
Name = "demo-connector",
123+
SpaceId = null,
124+
TerminationProtection = false
125+
});
126+
127+
// Export outputs here
128+
return new Dictionary<string, object?>
129+
{
130+
["demo-connector"] = connector.Id
131+
};
132+
});
133+
```
134+
{{% /choosable %}}
135+
{{< /chooser >}}
136+
137+
More examples on how to deploy Formal resources are available in the [`examples/`](https://github.com/formalco/pulumi-formal/tree/main/examples) folder of the Formal Pulumi repository.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# WARNING: this file was fetched from https://raw.githubusercontent.com/formalco/pulumi-formal/v1.0.2/docs/installation-configuration.md
3+
# Do not edit by hand unless you're certain you know what you are doing!
4+
title: Formal Installation & Configuration
5+
meta_desc: Provides an overview on how to configure credentials for the Formal provider for Pulumi.
6+
layout: package
7+
---
8+
## Installation
9+
10+
The Formal provider is available as a package in the following Pulumi languages:
11+
12+
* JavaScript/TypeScript: [`@formalco/pulumi`](https://www.npmjs.com/package/@formalco/pulumi)
13+
* Python: [`pulumi-formal`](https://pypi.org/project/pulumi-formal/)
14+
* Go: [`github.com/formalco/pulumi-formal/sdk/go/formal`](https://pkg.go.dev/github.com/formalco/pulumi-formal/sdk/go/formal)
15+
16+
## Authentication
17+
18+
The Formal provider must be configured with an `API Key` in order to deploy Formal resources. See the Formal documentation on API keys [here.](https://docs.joinformal.com/tools/api-keys)
19+
20+
## Example configuration
21+
22+
Configure your Formal API key (with `--secret`):
23+
```
24+
pulumi config set formal:apiKey FORMAL_API_KEY --secret
25+
```
26+
27+
You should now be able to deploy Formal resources.
28+
29+
## Configuration options
30+
31+
The following configuration options are available for the Formal provider:
32+
33+
- `formal:apiKey` (environment: `FORMAL_API_KEY`) - The API key used to access the formal control plane.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# WARNING: this file was generated by resourcedocsgen
2+
# Do not edit by hand unless you're certain you know what you are doing!
3+
category: Cloud
4+
component: false
5+
description: A Pulumi package for creating and managing Formal resources.
6+
featured: false
7+
logo_url: https://avatars3.githubusercontent.com/formalco
8+
name: formal
9+
native: false
10+
package_status: ga
11+
publisher: Formal
12+
repo_url: https://github.com/formalco/pulumi-formal
13+
schema_file_url: https://raw.githubusercontent.com/formalco/pulumi-formal/v1.0.2/provider/cmd/pulumi-resource-formal/schema.json
14+
title: Formal
15+
updated_on: 1755132341
16+
version: v1.0.2

tools/resourcedocsgen/pkg/publishers/publisher-names.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"ferlab-ste-justine": "ferlab-ste-justine",
7373
"fivetran": "fivetran",
7474
"flexibleenginecloud": "flexibleenginecloud",
75+
"formal": "formal",
7576
"fortinetdev": "fortinetdev",
7677
"g-core": "g-core",
7778
"glesys": "glesys",

0 commit comments

Comments
 (0)