-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish Package Metadata for [email protected] (#5623)
- Loading branch information
1 parent
2c5ca12
commit b87db94
Showing
2 changed files
with
125 additions
and
44 deletions.
There are no files selected for viewing
165 changes: 123 additions & 42 deletions
165
themes/default/content/registry/packages/scm/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,151 @@ | ||
--- | ||
title: Strata Cloud Manager (Palo Alto SCM) | ||
meta_desc: Provides an overview of the Strata Cloud Manager Provider for Pulumi. | ||
layout: overview | ||
title: Scm Provider | ||
meta_desc: Provides an overview on how to configure the Pulumi Scm provider. | ||
layout: package | ||
--- | ||
## Installation | ||
|
||
The Strata Cloud Manager Resource Provider lets you manage [Strata Cloud Manager](https://docs.paloaltonetworks.com/strata-cloud-manager) resources. This is a bridged provider from the terraform SCM provider, located at [github.com/PaloAltoNetworks/terraform-provider-scm](https://github.com/PaloAltoNetworks/terraform-provider-scm). | ||
The scm provider is available as a package in all Pulumi languages: | ||
|
||
## Example | ||
* JavaScript/TypeScript: [`@pulumi/scm`](https://www.npmjs.com/package/@pulumi/scm) | ||
* Python: [`pulumi-scm`](https://pypi.org/project/pulumi-scm/) | ||
* Go: [`github.com/pulumi/pulumi-scm/sdk/go/scm`](https://github.com/pulumi/pulumi-scm) | ||
* .NET: [`Pulumi.Scm`](https://www.nuget.org/packages/Pulumi.Scm) | ||
* Java: [`com.pulumi/scm`](https://central.sonatype.com/artifact/com.pulumi/scm) | ||
## Overview | ||
|
||
{{< chooser language "typescript,python,go,csharp" >}} | ||
{{% choosable language typescript %}} | ||
The `scm` provider provides resources and functions to manage and query Strata Cloud Manager. | ||
|
||
This provider covers the following aspects of Strata Cloud Manager: | ||
* Unified Networking Security | ||
## Example Usage | ||
|
||
```typescript | ||
import * as pulumi from "@pulumi/pulumi"; | ||
import * as scm from "@pulumi/scm"; | ||
{{< chooser language "typescript,python,go,csharp,java,yaml" >}} | ||
{{% choosable language typescript %}} | ||
```yaml | ||
# Pulumi.yaml provider configuration file | ||
name: configuration-example | ||
runtime: nodejs | ||
config: | ||
scm:clientId: | ||
value: your-id@12345 | ||
scm:clientSecret: | ||
value: secret | ||
scm:host: | ||
value: api.strata.paloaltonetworks.com | ||
scm:scope: | ||
value: tsg_id:12345 | ||
|
||
const example = new scm.Service("example", {}); | ||
``` | ||
|
||
{{% /choosable %}} | ||
{{% choosable language python %}} | ||
```yaml | ||
# Pulumi.yaml provider configuration file | ||
name: configuration-example | ||
runtime: python | ||
config: | ||
scm:clientId: | ||
value: your-id@12345 | ||
scm:clientSecret: | ||
value: secret | ||
scm:host: | ||
value: api.strata.paloaltonetworks.com | ||
scm:scope: | ||
value: tsg_id:12345 | ||
|
||
```python | ||
import pulumi | ||
import pulumi_scm as scm | ||
``` | ||
|
||
{{% /choosable %}} | ||
{{% choosable language csharp %}} | ||
```yaml | ||
# Pulumi.yaml provider configuration file | ||
name: configuration-example | ||
runtime: dotnet | ||
config: | ||
scm:clientId: | ||
value: your-id@12345 | ||
scm:clientSecret: | ||
value: secret | ||
scm:host: | ||
value: api.strata.paloaltonetworks.com | ||
scm:scope: | ||
value: tsg_id:12345 | ||
|
||
example = scm.Service("example") | ||
``` | ||
|
||
{{% /choosable %}} | ||
{{% choosable language go %}} | ||
```yaml | ||
# Pulumi.yaml provider configuration file | ||
name: configuration-example | ||
runtime: go | ||
config: | ||
scm:clientId: | ||
value: your-id@12345 | ||
scm:clientSecret: | ||
value: secret | ||
scm:host: | ||
value: api.strata.paloaltonetworks.com | ||
scm:scope: | ||
value: tsg_id:12345 | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"github.com/pulumi/pulumi-scm/sdk/go/scm" | ||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" | ||
``` | ||
|
||
) | ||
{{% /choosable %}} | ||
{{% choosable language yaml %}} | ||
```yaml | ||
# Pulumi.yaml provider configuration file | ||
name: configuration-example | ||
runtime: yaml | ||
config: | ||
scm:clientId: | ||
value: your-id@12345 | ||
scm:clientSecret: | ||
value: secret | ||
scm:host: | ||
value: api.strata.paloaltonetworks.com | ||
scm:scope: | ||
value: tsg_id:12345 | ||
|
||
func main() { | ||
pulumi.Run(func(ctx *pulumi.Context) error { | ||
_, err := scm.NewService(ctx, "example", nil) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
}) | ||
} | ||
``` | ||
|
||
{{% /choosable %}} | ||
{{% choosable language csharp %}} | ||
|
||
```csharp | ||
using System.Collections.Generic; | ||
using Pulumi; | ||
using Scm = Pulumi.Scm; | ||
{{% choosable language java %}} | ||
```yaml | ||
# Pulumi.yaml provider configuration file | ||
name: configuration-example | ||
runtime: java | ||
config: | ||
scm:clientId: | ||
value: your-id@12345 | ||
scm:clientSecret: | ||
value: secret | ||
scm:host: | ||
value: api.strata.paloaltonetworks.com | ||
scm:scope: | ||
value: tsg_id:12345 | ||
|
||
return await Deployment.RunAsync(() => | ||
{ | ||
var example = new Scm.Service("example"); | ||
}); | ||
``` | ||
|
||
{{% /choosable %}} | ||
|
||
{{< /chooser >}} | ||
## Provider Parameter Priority | ||
|
||
There are multiple ways to specify the provider's parameters. If overlapping values are configured for the provider, then this is the resolution order: | ||
|
||
1. Statically configured in the provider configuration | ||
2. Environment variable (where applicable) | ||
3. Taken from the JSON config file | ||
## Configuration Reference | ||
|
||
- `authFile` (String) The file path to the JSON file with auth creds for SCM. | ||
- `authUrl` (String) The URL to send auth credentials to which will return a JWT. Default: `https://auth.apps.paloaltonetworks.com/auth/v1/oauth2/access_token`. Environment variable: `SCM_AUTH_URL`. JSON config file variable: `authUrl`. | ||
- `clientId` (String) The client ID for the connection. Environment variable: `SCM_CLIENT_ID`. JSON config file variable: `clientId`. | ||
- `clientSecret` (String, Sensitive) The client secret for the connection. Environment variable: `SCM_CLIENT_SECRET`. JSON config file variable: `clientSecret`. | ||
- `headers` (Map of String) Custom HTTP headers to be sent with all API commands. Environment variable: `SCM_HEADERS`. JSON config file variable: `headers`. | ||
- `host` (String) The hostname of Strata Cloud Manager API. Default: `api.sase.paloaltonetworks.com`. Environment variable: `SCM_HOST`. JSON config file variable: `host`. | ||
- `logging` (String) The logging level of the provider and the underlying communication. Default: `quiet`. Environment variable: `SCM_LOGGING`. JSON config file variable: `logging`. | ||
- `port` (Number) The port number to use for API commands, if non-standard for the given protocol. Environment variable: `SCM_PORT`. JSON config file variable: `port`. | ||
- `protocol` (String) The protocol to use for SCM. This should be 'http' or 'https'. Default: `https`. Environment variable: `SCM_PROTOCOL`. JSON config file variable: `protocol`. | ||
- `scope` (String) The client scope. Environment variable: `SCM_SCOPE`. JSON config file variable: `scope`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters