Skip to content

Commit

Permalink
Merge pull request #89 from pulumi/bridge-v2.17.0
Browse files Browse the repository at this point in the history
Upgrade to v2.17.0 of the pulumi-terraform-bridge
  • Loading branch information
stack72 authored Jan 13, 2021
2 parents f6f4601 + 889cae1 commit 801d295
Show file tree
Hide file tree
Showing 86 changed files with 542 additions and 237 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ CHANGELOG
=========

## HEAD (Unreleased)
_(none)_
* Upgrade to pulumi-terraform-bridge v2.17.0
* Upgrade to Pulumi v2.17.0

---

Expand Down
9 changes: 4 additions & 5 deletions provider/cmd/pulumi-resource-github/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@
}
},
"github:index/userInvitationAccepter:UserInvitationAccepter": {
"description": "Provides a resource to manage GitHub repository collaborator invitations.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst exampleRepository = new github.Repository(\"example\", {});\nconst exampleRepositoryCollaborator = new github.RepositoryCollaborator(\"example\", {\n permission: \"push\",\n repository: exampleRepository.name,\n username: \"example-username\",\n});\nconst invitee = new github.Provider(\"invitee\", {\n token: var_invitee_token,\n});\nconst exampleUserInvitationAccepter = new github.UserInvitationAccepter(\"example\", {\n invitationId: exampleRepositoryCollaborator.invitationId,\n}, { provider: invitee });\n```\n```python\nimport pulumi\nimport pulumi_github as github\nimport pulumi_pulumi as pulumi\n\nexample_repository = github.Repository(\"exampleRepository\")\nexample_repository_collaborator = github.RepositoryCollaborator(\"exampleRepositoryCollaborator\",\n permission=\"push\",\n repository=example_repository.name,\n username=\"example-username\")\ninvitee = pulumi.providers.Github(\"invitee\", token=var[\"invitee_token\"])\nexample_user_invitation_accepter = github.UserInvitationAccepter(\"exampleUserInvitationAccepter\", invitation_id=example_repository_collaborator.invitation_id,\nopts=ResourceOptions(provider=\"github.invitee\"))\n```\n```csharp\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var exampleRepository = new Github.Repository(\"exampleRepository\", new Github.RepositoryArgs\n {\n });\n var exampleRepositoryCollaborator = new Github.RepositoryCollaborator(\"exampleRepositoryCollaborator\", new Github.RepositoryCollaboratorArgs\n {\n Permission = \"push\",\n Repository = exampleRepository.Name,\n Username = \"example-username\",\n });\n var invitee = new Github.Provider(\"invitee\", new Github.ProviderArgs\n {\n Token = @var.Invitee_token,\n });\n var exampleUserInvitationAccepter = new Github.UserInvitationAccepter(\"exampleUserInvitationAccepter\", new Github.UserInvitationAccepterArgs\n {\n InvitationId = exampleRepositoryCollaborator.InvitationId,\n }, new CustomResourceOptions\n {\n Provider = \"github.invitee\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v2/go/github\"\n\t\"github.com/pulumi/pulumi-github/sdk/v2/go/github/providers\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleRepository, err := github.NewRepository(ctx, \"exampleRepository\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRepositoryCollaborator, err := github.NewRepositoryCollaborator(ctx, \"exampleRepositoryCollaborator\", \u0026github.RepositoryCollaboratorArgs{\n\t\t\tPermission: pulumi.String(\"push\"),\n\t\t\tRepository: exampleRepository.Name,\n\t\t\tUsername: pulumi.String(\"example-username\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = providers.Newgithub(ctx, \"invitee\", \u0026providers.githubArgs{\n\t\t\tToken: pulumi.Any(_var.Invitee_token),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewUserInvitationAccepter(ctx, \"exampleUserInvitationAccepter\", \u0026github.UserInvitationAccepterArgs{\n\t\t\tInvitationId: exampleRepositoryCollaborator.InvitationId,\n\t\t}, pulumi.Provider(\"github.invitee\"))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n{{% /example %}}\n{{% /examples %}}",
"description": "Provides a resource to manage GitHub repository collaborator invitations.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst exampleRepository = new github.Repository(\"example\", {});\nconst exampleRepositoryCollaborator = new github.RepositoryCollaborator(\"example\", {\n permission: \"push\",\n repository: exampleRepository.name,\n username: \"example-username\",\n});\nconst invitee = new github.Provider(\"invitee\", {\n token: var_invitee_token,\n});\nconst exampleUserInvitationAccepter = new github.UserInvitationAccepter(\"example\", {\n invitationId: exampleRepositoryCollaborator.invitationId,\n}, { provider: invitee });\n```\n```python\nimport pulumi\nimport pulumi_github as github\nimport pulumi_pulumi as pulumi\n\nexample_repository = github.Repository(\"exampleRepository\")\nexample_repository_collaborator = github.RepositoryCollaborator(\"exampleRepositoryCollaborator\",\n permission=\"push\",\n repository=example_repository.name,\n username=\"example-username\")\ninvitee = pulumi.providers.Github(\"invitee\", token=var[\"invitee_token\"])\nexample_user_invitation_accepter = github.UserInvitationAccepter(\"exampleUserInvitationAccepter\", invitation_id=example_repository_collaborator.invitation_id,\nopts=pulumi.ResourceOptions(provider=\"github.invitee\"))\n```\n```csharp\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var exampleRepository = new Github.Repository(\"exampleRepository\", new Github.RepositoryArgs\n {\n });\n var exampleRepositoryCollaborator = new Github.RepositoryCollaborator(\"exampleRepositoryCollaborator\", new Github.RepositoryCollaboratorArgs\n {\n Permission = \"push\",\n Repository = exampleRepository.Name,\n Username = \"example-username\",\n });\n var invitee = new Github.Provider(\"invitee\", new Github.ProviderArgs\n {\n Token = @var.Invitee_token,\n });\n var exampleUserInvitationAccepter = new Github.UserInvitationAccepter(\"exampleUserInvitationAccepter\", new Github.UserInvitationAccepterArgs\n {\n InvitationId = exampleRepositoryCollaborator.InvitationId,\n }, new CustomResourceOptions\n {\n Provider = \"github.invitee\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v2/go/github\"\n\t\"github.com/pulumi/pulumi-github/sdk/v2/go/github/providers\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleRepository, err := github.NewRepository(ctx, \"exampleRepository\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRepositoryCollaborator, err := github.NewRepositoryCollaborator(ctx, \"exampleRepositoryCollaborator\", \u0026github.RepositoryCollaboratorArgs{\n\t\t\tPermission: pulumi.String(\"push\"),\n\t\t\tRepository: exampleRepository.Name,\n\t\t\tUsername: pulumi.String(\"example-username\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = providers.Newgithub(ctx, \"invitee\", \u0026providers.githubArgs{\n\t\t\tToken: pulumi.Any(_var.Invitee_token),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewUserInvitationAccepter(ctx, \"exampleUserInvitationAccepter\", \u0026github.UserInvitationAccepterArgs{\n\t\t\tInvitationId: exampleRepositoryCollaborator.InvitationId,\n\t\t}, pulumi.Provider(\"github.invitee\"))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n{{% /example %}}\n{{% /examples %}}",
"properties": {
"invitationId": {
"type": "string",
Expand Down Expand Up @@ -3708,7 +3708,7 @@
},
"nodejs": {
"dependencies": {
"@pulumi/pulumi": "^2.0.0"
"@pulumi/pulumi": "^2.15.0"
},
"devDependencies": {
"@types/mime": "^2.0.0",
Expand All @@ -3723,9 +3723,8 @@
"python": {
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-github)\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/pulumi-github` repo](https://github.com/pulumi/pulumi-github/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-providers/terraform-provider-github` repo](https://github.com/terraform-providers/terraform-provider-github/issues).",
"requires": {
"pulumi": "\u003e=2.9.0,\u003c3.0.0"
},
"usesIOClasses": true
"pulumi": "\u003e=2.15.0,\u003c3.0.0"
}
}
}
}
4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.4.3+inc

require (
github.com/hashicorp/terraform-plugin-sdk v1.9.1
github.com/pulumi/pulumi-terraform-bridge/v2 v2.13.2
github.com/pulumi/pulumi/sdk/v2 v2.13.3-0.20201109230029-a6f8b9b205cd
github.com/pulumi/pulumi-terraform-bridge/v2 v2.17.0
github.com/pulumi/pulumi/sdk/v2 v2.17.0
github.com/terraform-providers/terraform-provider-github v1.3.1-0.20201201134554-f6add3ed515b
)
11 changes: 11 additions & 0 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,8 @@ github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9
github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.4.0 h1:7ks8ZkOP5/ujthUsT07rNv+nkLXCQWKNHuwzOAesEks=
github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/panicwrap v1.0.0/go.mod h1:pKvZHwWrZowLUzftuFq7coarnxbBXU4aQh3N0BJOeeA=
github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
Expand Down Expand Up @@ -672,11 +674,20 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.13.2 h1:8sEHpBhHUl+lVuruvvMXL8NJFrpPSEVxB6Nexuy1irs=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.13.2/go.mod h1:NVzB8KA29SMXW8Nwp6OHI4yevnQkLiY0VMucAI2R7jU=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.17.0 h1:QIlM45O+pD2oKJdcvmpom7CHZpC2GOjWpIA2j3QXscU=
github.com/pulumi/pulumi-terraform-bridge/v2 v2.17.0/go.mod h1:/oSHj3Hg9zd8xT2dKVoBifeBbH+/pLPqmTDypgN5FHk=
github.com/pulumi/pulumi/pkg/v2 v2.13.3-0.20201109230029-a6f8b9b205cd h1:ID3x2Bv/yEDQCU67THkmdhgoINcYYb0zYXo01FeJUhU=
github.com/pulumi/pulumi/pkg/v2 v2.13.3-0.20201109230029-a6f8b9b205cd/go.mod h1:xLEDqsipr92IXfe8EJrl8bANoEUtwmBJGBE8X8PKmP0=
github.com/pulumi/pulumi/pkg/v2 v2.15.1-0.20201202214525-260620430c4c h1:M4BMhdOt1le+7JtOhR7uOVrpvu9HnN9388AI/Je9/3Y=
github.com/pulumi/pulumi/pkg/v2 v2.15.1-0.20201202214525-260620430c4c/go.mod h1:xLEDqsipr92IXfe8EJrl8bANoEUtwmBJGBE8X8PKmP0=
github.com/pulumi/pulumi/sdk/v2 v2.2.1/go.mod h1:QNbWpL4gvf3X0lUFT7TXA2Jo1ff/Ti2l97AyFGYwvW4=
github.com/pulumi/pulumi/sdk/v2 v2.13.3-0.20201109230029-a6f8b9b205cd h1:acvoTtWZHySIlANIlR5LSfRyjYSUadeJcdUZhyx9y4o=
github.com/pulumi/pulumi/sdk/v2 v2.13.3-0.20201109230029-a6f8b9b205cd/go.mod h1:Z9ifPo/Q0+hUpAyguVx2gp5Sx+CBumnWvYQDhrM8l3E=
github.com/pulumi/pulumi/sdk/v2 v2.15.1-0.20201202214525-260620430c4c/go.mod h1:Z9ifPo/Q0+hUpAyguVx2gp5Sx+CBumnWvYQDhrM8l3E=
github.com/pulumi/pulumi/sdk/v2 v2.17.0 h1:mFsYS4Qnpk0uGcN4cGPd/S6KWdx92BbudOerxf5JlcA=
github.com/pulumi/pulumi/sdk/v2 v2.17.0/go.mod h1:fCFhRV6NmidWetmgDPA76efL+s0JqLlS54JJIwfOt+o=
github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e h1:Dik4Qe/+xguB8JagPyXNlbOnRiXGmq/PSPQTGunYnTk=
github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e/go.mod h1:sZ9FUzGO+yM41hsQHs/yIcj/Y993qMdBxBU5mpDmAfQ=
github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI=
github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
Expand Down
5 changes: 2 additions & 3 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func Provider() tfbridge.ProviderInfo {
JavaScript: &tfbridge.JavaScriptInfo{
// List any npm dependencies and their versions
Dependencies: map[string]string{
"@pulumi/pulumi": "^2.0.0",
"@pulumi/pulumi": "^2.15.0",
},
DevDependencies: map[string]string{
"@types/node": "^8.0.25", // so we can access strongly typed node definitions.
Expand All @@ -164,9 +164,8 @@ func Provider() tfbridge.ProviderInfo {
Python: &tfbridge.PythonInfo{
// List any Python dependencies and their version ranges
Requires: map[string]string{
"pulumi": ">=2.9.0,<3.0.0",
"pulumi": ">=2.15.0,<3.0.0",
},
UsesIOClasses: true,
},
CSharp: &tfbridge.CSharpInfo{
PackageReferences: map[string]string{
Expand Down
17 changes: 9 additions & 8 deletions sdk/go/github/actionsOrganizationSecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ type ActionsOrganizationSecret struct {
// NewActionsOrganizationSecret registers a new resource with the given unique name, arguments, and options.
func NewActionsOrganizationSecret(ctx *pulumi.Context,
name string, args *ActionsOrganizationSecretArgs, opts ...pulumi.ResourceOption) (*ActionsOrganizationSecret, error) {
if args == nil || args.PlaintextValue == nil {
return nil, errors.New("missing required argument 'PlaintextValue'")
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args == nil || args.SecretName == nil {
return nil, errors.New("missing required argument 'SecretName'")

if args.PlaintextValue == nil {
return nil, errors.New("invalid value for required argument 'PlaintextValue'")
}
if args == nil || args.Visibility == nil {
return nil, errors.New("missing required argument 'Visibility'")
if args.SecretName == nil {
return nil, errors.New("invalid value for required argument 'SecretName'")
}
if args == nil {
args = &ActionsOrganizationSecretArgs{}
if args.Visibility == nil {
return nil, errors.New("invalid value for required argument 'Visibility'")
}
var resource ActionsOrganizationSecret
err := ctx.RegisterResource("github:index/actionsOrganizationSecret:ActionsOrganizationSecret", name, args, &resource, opts...)
Expand Down
17 changes: 9 additions & 8 deletions sdk/go/github/actionsSecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ type ActionsSecret struct {
// NewActionsSecret registers a new resource with the given unique name, arguments, and options.
func NewActionsSecret(ctx *pulumi.Context,
name string, args *ActionsSecretArgs, opts ...pulumi.ResourceOption) (*ActionsSecret, error) {
if args == nil || args.PlaintextValue == nil {
return nil, errors.New("missing required argument 'PlaintextValue'")
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args == nil || args.Repository == nil {
return nil, errors.New("missing required argument 'Repository'")

if args.PlaintextValue == nil {
return nil, errors.New("invalid value for required argument 'PlaintextValue'")
}
if args == nil || args.SecretName == nil {
return nil, errors.New("missing required argument 'SecretName'")
if args.Repository == nil {
return nil, errors.New("invalid value for required argument 'Repository'")
}
if args == nil {
args = &ActionsSecretArgs{}
if args.SecretName == nil {
return nil, errors.New("invalid value for required argument 'SecretName'")
}
var resource ActionsSecret
err := ctx.RegisterResource("github:index/actionsSecret:ActionsSecret", name, args, &resource, opts...)
Expand Down
13 changes: 7 additions & 6 deletions sdk/go/github/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ type Branch struct {
// NewBranch registers a new resource with the given unique name, arguments, and options.
func NewBranch(ctx *pulumi.Context,
name string, args *BranchArgs, opts ...pulumi.ResourceOption) (*Branch, error) {
if args == nil || args.Branch == nil {
return nil, errors.New("missing required argument 'Branch'")
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args == nil || args.Repository == nil {
return nil, errors.New("missing required argument 'Repository'")

if args.Branch == nil {
return nil, errors.New("invalid value for required argument 'Branch'")
}
if args == nil {
args = &BranchArgs{}
if args.Repository == nil {
return nil, errors.New("invalid value for required argument 'Repository'")
}
var resource Branch
err := ctx.RegisterResource("github:index/branch:Branch", name, args, &resource, opts...)
Expand Down
13 changes: 7 additions & 6 deletions sdk/go/github/branchDefault.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ type BranchDefault struct {
// NewBranchDefault registers a new resource with the given unique name, arguments, and options.
func NewBranchDefault(ctx *pulumi.Context,
name string, args *BranchDefaultArgs, opts ...pulumi.ResourceOption) (*BranchDefault, error) {
if args == nil || args.Branch == nil {
return nil, errors.New("missing required argument 'Branch'")
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args == nil || args.Repository == nil {
return nil, errors.New("missing required argument 'Repository'")

if args.Branch == nil {
return nil, errors.New("invalid value for required argument 'Branch'")
}
if args == nil {
args = &BranchDefaultArgs{}
if args.Repository == nil {
return nil, errors.New("invalid value for required argument 'Repository'")
}
var resource BranchDefault
err := ctx.RegisterResource("github:index/branchDefault:BranchDefault", name, args, &resource, opts...)
Expand Down
13 changes: 7 additions & 6 deletions sdk/go/github/branchProtection.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ type BranchProtection struct {
// NewBranchProtection registers a new resource with the given unique name, arguments, and options.
func NewBranchProtection(ctx *pulumi.Context,
name string, args *BranchProtectionArgs, opts ...pulumi.ResourceOption) (*BranchProtection, error) {
if args == nil || args.Pattern == nil {
return nil, errors.New("missing required argument 'Pattern'")
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args == nil || args.RepositoryId == nil {
return nil, errors.New("missing required argument 'RepositoryId'")

if args.Pattern == nil {
return nil, errors.New("invalid value for required argument 'Pattern'")
}
if args == nil {
args = &BranchProtectionArgs{}
if args.RepositoryId == nil {
return nil, errors.New("invalid value for required argument 'RepositoryId'")
}
var resource BranchProtection
err := ctx.RegisterResource("github:index/branchProtection:BranchProtection", name, args, &resource, opts...)
Expand Down
11 changes: 11 additions & 0 deletions sdk/go/github/config/pulumiUtilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ package config
import (
"os"
"strconv"
"strings"

"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

type envParser func(v string) interface{}
Expand Down Expand Up @@ -34,6 +37,14 @@ func parseEnvFloat(v string) interface{} {
return f
}

func parseEnvStringArray(v string) interface{} {
var result pulumi.StringArray
for _, item := range strings.Split(v, ";") {
result = append(result, pulumi.String(item))
}
return result
}

func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} {
for _, v := range vars {
if value := os.Getenv(v); value != "" {
Expand Down
Loading

0 comments on commit 801d295

Please sign in to comment.