Skip to content

Commit

Permalink
feat: Upgrade provider to 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vavsab committed Oct 30, 2023
1 parent 478dc38 commit 1d6cf1e
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 4 deletions.
17 changes: 17 additions & 0 deletions provider/cmd/pulumi-resource-zitadel/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4315,6 +4315,10 @@
"zitadel:index/org:Org": {
"description": "Resource representing an organization in ZITADEL, which is the highest level after the instance and contains several other resource including policies if the configuration differs to the default policies on the instance.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as zitadel from \"@pulumiverse/zitadel\";\n\nconst _default = new zitadel.Org(\"default\", {});\n```\n```python\nimport pulumi\nimport pulumiverse_zitadel as zitadel\n\ndefault = zitadel.Org(\"default\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Zitadel = Pulumiverse.Zitadel;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = new Zitadel.Org(\"default\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := zitadel.NewOrg(ctx, \"default\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.zitadel.Org;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var default_ = new Org(\"default\");\n\n }\n}\n```\n```yaml\nresources:\n default:\n type: zitadel:Org\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nterraform The resource can be imported using the ID format `\u003cid\u003e`, e.g.\n\n```sh\n $ pulumi import zitadel:index/org:Org imported '123456789012345678'\n```\n\n ",
"properties": {
"isDefault": {
"type": "boolean",
"description": "True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.\n"
},
"name": {
"type": "string",
"description": "Name of the org\n"
Expand All @@ -4334,6 +4338,10 @@
"state"
],
"inputProperties": {
"isDefault": {
"type": "boolean",
"description": "True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.\n"
},
"name": {
"type": "string",
"description": "Name of the org\n"
Expand All @@ -4342,6 +4350,10 @@
"stateInputs": {
"description": "Input properties used for looking up and filtering Org resources.\n",
"properties": {
"isDefault": {
"type": "boolean",
"description": "True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.\n"
},
"name": {
"type": "string",
"description": "Name of the org\n"
Expand Down Expand Up @@ -8378,6 +8390,10 @@
"type": "string",
"description": "ID of the organization\n"
},
"isDefault": {
"type": "boolean",
"description": "Indicates whether the org is the default org of the instance.\n"
},
"name": {
"type": "string",
"description": "Name of the org.\n"
Expand All @@ -8394,6 +8410,7 @@
"type": "object",
"required": [
"id",
"isDefault",
"name",
"primaryDomain",
"state"
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraf
require (
github.com/pulumi/pulumi-terraform-bridge/v3 v3.62.0
github.com/pulumi/pulumi/sdk/v3 v3.89.0
github.com/zitadel/terraform-provider-zitadel v1.0.3
github.com/zitadel/terraform-provider-zitadel v1.0.4
)

require (
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2437,8 +2437,8 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
github.com/zitadel/oidc v1.13.4 h1:+k2GKqP9Ld9S2MSFlj+KaNsoZ3J9oy+Ezw51EzSFuC8=
github.com/zitadel/oidc v1.13.4/go.mod h1:3h2DhUcP02YV6q/CA/BG4yla0o6rXjK+DkJGK/dwJfw=
github.com/zitadel/terraform-provider-zitadel v1.0.3 h1:fsky0W/dSW5or8rbsQcF/7bZntQaeGxsul5d1hOEwM0=
github.com/zitadel/terraform-provider-zitadel v1.0.3/go.mod h1:6AHXpHOu0B6O2lNavJiiyoOKB4T10IUlNZdIaO1Tzz8=
github.com/zitadel/terraform-provider-zitadel v1.0.4 h1:fv2X0nueuUfyYy+uYwLHsBbvNeAfTeYlQyFJX/A9KbY=
github.com/zitadel/terraform-provider-zitadel v1.0.4/go.mod h1:6AHXpHOu0B6O2lNavJiiyoOKB4T10IUlNZdIaO1Tzz8=
github.com/zitadel/zitadel-go/v2 v2.0.21 h1:P+m8rBReph8UhxrchSR0npthHTlwqmVHi8k8JI1q1ds=
github.com/zitadel/zitadel-go/v2 v2.0.21/go.mod h1:1kHc4fpCjAHVAA13bZNrpxaAO83VaPnF8rzM157A9rQ=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/GetOrg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public sealed class GetOrgResult
/// </summary>
public readonly string Id;
/// <summary>
/// Indicates whether the org is the default org of the instance.
/// </summary>
public readonly bool IsDefault;
/// <summary>
/// Name of the org.
/// </summary>
public readonly string Name;
Expand All @@ -131,13 +135,16 @@ public sealed class GetOrgResult
private GetOrgResult(
string id,

bool isDefault,

string name,

string primaryDomain,

string state)
{
Id = id;
IsDefault = isDefault;
Name = name;
PrimaryDomain = primaryDomain;
State = state;
Expand Down
18 changes: 18 additions & 0 deletions sdk/dotnet/Org.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ namespace Pulumiverse.Zitadel
[ZitadelResourceType("zitadel:index/org:Org")]
public partial class Org : global::Pulumi.CustomResource
{
/// <summary>
/// True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
/// </summary>
[Output("isDefault")]
public Output<bool?> IsDefault { get; private set; } = null!;

/// <summary>
/// Name of the org
/// </summary>
Expand Down Expand Up @@ -104,6 +110,12 @@ public static Org Get(string name, Input<string> id, OrgState? state = null, Cus

public sealed class OrgArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
/// </summary>
[Input("isDefault")]
public Input<bool>? IsDefault { get; set; }

/// <summary>
/// Name of the org
/// </summary>
Expand All @@ -118,6 +130,12 @@ public OrgArgs()

public sealed class OrgState : global::Pulumi.ResourceArgs
{
/// <summary>
/// True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
/// </summary>
[Input("isDefault")]
public Input<bool>? IsDefault { get; set; }

/// <summary>
/// Name of the org
/// </summary>
Expand Down
7 changes: 7 additions & 0 deletions sdk/go/zitadel/getOrg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions sdk/go/zitadel/org.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions sdk/nodejs/getOrg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export interface GetOrgResult {
* ID of the organization
*/
readonly id: string;
/**
* Indicates whether the org is the default org of the instance.
*/
readonly isDefault: boolean;
/**
* Name of the org.
*/
Expand Down
14 changes: 14 additions & 0 deletions sdk/nodejs/org.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export class Org extends pulumi.CustomResource {
return obj['__pulumiType'] === Org.__pulumiType;
}

/**
* True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
*/
public readonly isDefault!: pulumi.Output<boolean | undefined>;
/**
* Name of the org
*/
Expand All @@ -78,11 +82,13 @@ export class Org extends pulumi.CustomResource {
opts = opts || {};
if (opts.id) {
const state = argsOrState as OrgState | undefined;
resourceInputs["isDefault"] = state ? state.isDefault : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["primaryDomain"] = state ? state.primaryDomain : undefined;
resourceInputs["state"] = state ? state.state : undefined;
} else {
const args = argsOrState as OrgArgs | undefined;
resourceInputs["isDefault"] = args ? args.isDefault : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["primaryDomain"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
Expand All @@ -96,6 +102,10 @@ export class Org extends pulumi.CustomResource {
* Input properties used for looking up and filtering Org resources.
*/
export interface OrgState {
/**
* True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
*/
isDefault?: pulumi.Input<boolean>;
/**
* Name of the org
*/
Expand All @@ -114,6 +124,10 @@ export interface OrgState {
* The set of arguments for constructing a Org resource.
*/
export interface OrgArgs {
/**
* True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
*/
isDefault?: pulumi.Input<boolean>;
/**
* Name of the org
*/
Expand Down
15 changes: 14 additions & 1 deletion sdk/python/pulumiverse_zitadel/get_org.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ class GetOrgResult:
"""
A collection of values returned by getOrg.
"""
def __init__(__self__, id=None, name=None, primary_domain=None, state=None):
def __init__(__self__, id=None, is_default=None, name=None, primary_domain=None, state=None):
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if is_default and not isinstance(is_default, bool):
raise TypeError("Expected argument 'is_default' to be a bool")
pulumi.set(__self__, "is_default", is_default)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
Expand All @@ -43,6 +46,14 @@ def id(self) -> str:
"""
return pulumi.get(self, "id")

@property
@pulumi.getter(name="isDefault")
def is_default(self) -> bool:
"""
Indicates whether the org is the default org of the instance.
"""
return pulumi.get(self, "is_default")

@property
@pulumi.getter
def name(self) -> str:
Expand Down Expand Up @@ -75,6 +86,7 @@ def __await__(self):
yield self
return GetOrgResult(
id=self.id,
is_default=self.is_default,
name=self.name,
primary_domain=self.primary_domain,
state=self.state)
Expand Down Expand Up @@ -105,6 +117,7 @@ def get_org(id: Optional[str] = None,

return AwaitableGetOrgResult(
id=pulumi.get(__ret__, 'id'),
is_default=pulumi.get(__ret__, 'is_default'),
name=pulumi.get(__ret__, 'name'),
primary_domain=pulumi.get(__ret__, 'primary_domain'),
state=pulumi.get(__ret__, 'state'))
Expand Down
Loading

0 comments on commit 1d6cf1e

Please sign in to comment.