Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
omercnet committed Aug 7, 2024
1 parent 5af4175 commit 20258b7
Show file tree
Hide file tree
Showing 357 changed files with 718 additions and 379 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ yarn add @descope/pulumi-descope
To use from Python, install using `pip`:

```bash
pip install pulumi_descope
pip install descope_pulumi
```

### Go
Expand All @@ -41,16 +41,16 @@ go get github.com/descope/pulumi-descope/sdk/go/...
To use from .NET, install using `dotnet add package`:

```bash
dotnet add package Pulumi.Descope
dotnet add package Descope.Pulumi.Descope
```

## Configuration

The following configuration points are available for the `foo` provider:

- `foo:apiKey` (environment: `FOO_API_KEY`) - the API key for `foo`
- `foo:region` (environment: `FOO_REGION`) - the region in which to deploy resources
- `descope:projectId` (environment: `DESCOPE_PROJECT_ID`) - the API key for `Descope`
- `descope:managementKey` (environment: `DESCOPE_MANAGEMENT_KEY`) - the region in which to deploy resources

## Reference

For detailed reference documentation, please visit [the Pulumi registry](https://www.pulumi.com/registry/packages/foo/api-docs/).
For detailed reference documentation, please visit [the Pulumi registry](https://www.pulumi.com/registry/packages/descope/api-docs/).
9 changes: 6 additions & 3 deletions provider/cmd/pulumi-resource-descope/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"license": "Apache-2.0",
"attribution": "This Pulumi package is based on the [`descope` Terraform Provider](https://github.com/descope/terraform-provider-descope).",
"repository": "https://github.com/descope/pulumi-descope",
"pluginDownloadURL": "https://github.com/descope/pulumi-descope/releases/",
"publisher": "descope",
"pluginDownloadURL": "github://api.github.com/descope",
"publisher": "Descope",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
},
Expand All @@ -20,14 +20,16 @@
"packageReferences": {
"Pulumi": "3.*"
},
"compatibility": "tfbridge20"
"compatibility": "tfbridge20",
"rootNamespace": "Descope.Pulumi"
},
"go": {
"importBasePath": "github.com/descope/pulumi-descope/sdk/go/descope",
"generateResourceContainerTypes": true,
"generateExtraInputTypes": true
},
"nodejs": {
"packageName": "@descope/pulumi-descope",
"packageDescription": "A Pulumi package for creating and managing descope cloud resources.",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/descope/terraform-provider-descope)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-descope` repo](https://github.com/descope/pulumi-descope/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-descope` repo](https://github.com/descope/terraform-provider-descope/issues).",
"dependencies": {
Expand All @@ -41,6 +43,7 @@
"disableUnionOutputTypes": true
},
"python": {
"packageName": "descope_pulumi",
"requires": {
"pulumi": "\u003e=3.0.0,\u003c4.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/descope/terraform-provider-descope/shim v0.0.0-00010101000000-000000000000
github.com/pulumi/pulumi-terraform-bridge/pf v0.41.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0
golang.org/x/text v0.17.0
)

require (
Expand Down Expand Up @@ -228,7 +229,6 @@ require (
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.23.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
Expand Down
22 changes: 15 additions & 7 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
package descope

import (
"fmt"
"path"

// Allow embedding bridge-metadata.json in the provider.
_ "embed"

"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
"golang.org/x/text/cases"
"golang.org/x/text/language"

// Replace this provider with the provider you are bridging.
descope "github.com/descope/terraform-provider-descope/shim"
Expand All @@ -36,22 +39,25 @@ const (
// registries for nodejs and python:
mainPkg = "descope"
// modules:
mainMod = "index" // the descope module
mainMod = "index" // the descope module
publisher = "descope"
)

//go:embed cmd/pulumi-resource-descope/bridge-metadata.json
var metadata []byte

func Provider() tfbridge.ProviderInfo {
caser := cases.Title(language.English)

prov := tfbridge.ProviderInfo{
P: pfbridge.ShimProvider(descope.Provider(version.Version)),

Name: "descope",
Name: mainPkg,
Version: version.Version,
DisplayName: "Descope",
Publisher: "descope",
DisplayName: caser.String(mainPkg),
Publisher: caser.String(publisher),
LogoURL: "",
PluginDownloadURL: "https://github.com/descope/pulumi-descope/releases/",
PluginDownloadURL: fmt.Sprintf("github://api.github.com/%s", publisher),
Description: "A Pulumi package for creating and managing descope cloud resources.",
Keywords: []string{"descope", "category/cloud"},
License: "Apache-2.0",
Expand All @@ -61,7 +67,7 @@ func Provider() tfbridge.ProviderInfo {
MetadataInfo: tfbridge.NewProviderMetadata(metadata),
Config: map[string]*tfbridge.SchemaInfo{},
JavaScript: &tfbridge.JavaScriptInfo{

PackageName: fmt.Sprintf("@%s/pulumi-%s", publisher, mainPkg),
// List any npm dependencies and their versions
Dependencies: map[string]string{
"@pulumi/pulumi": "^3.0.0",
Expand All @@ -72,21 +78,23 @@ func Provider() tfbridge.ProviderInfo {
},
},
Python: &tfbridge.PythonInfo{
PackageName: fmt.Sprintf("%s_pulumi", publisher),
// List any Python dependencies and their version ranges
Requires: map[string]string{
"pulumi": ">=3.0.0,<4.0.0",
},
},
Golang: &tfbridge.GolangInfo{
ImportBasePath: path.Join(
"github.com/descope/pulumi-descope/sdk/",
fmt.Sprintf("github.com/%s/pulumi-%s/sdk/", publisher, mainPkg),
tfbridge.GetModuleMajorVersion(version.Version),
"go",
mainPkg,
),
GenerateResourceContainerTypes: true,
},
CSharp: &tfbridge.CSharpInfo{
RootNamespace: fmt.Sprintf("%s.Pulumi", caser.String(publisher)),
PackageReferences: map[string]string{
"Pulumi": "3.*",
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.Collections.Immutable;

namespace Pulumi.Descope
namespace Descope.Pulumi.Descope
{
public static class Config
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>descope</Authors>
<Company>descope</Company>
<Authors>Descope</Authors>
<Company>Descope</Company>
<Description>A Pulumi package for creating and managing descope cloud resources.</Description>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://www.descope.com</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsOidcArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsOidcGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlAttributeMappingArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlAttributeMappingGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlDynamicConfigurationArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlDynamicConfigurationGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlManualConfigurationArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectApplicationsSamlManualConfigurationGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectAttributesArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectAttributesGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectAttributesTenantArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectAttributesTenantGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectAttributesUserArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectAttributesUserGetArgs : global::Pulumi.ResourceArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumi.Descope.Inputs
namespace Descope.Pulumi.Descope.Inputs
{

public sealed class ProjectAttributesUserWidgetAuthorizationArgs : global::Pulumi.ResourceArgs
Expand Down
Loading

0 comments on commit 20258b7

Please sign in to comment.