Skip to content

Commit

Permalink
make build_sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
twingate-blee committed Dec 11, 2024
1 parent 5cae8a2 commit 620a880
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 10 deletions.
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-resource-twingate/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@
}
},
"twingate:index/twingateServiceAccountKey:TwingateServiceAccountKey": {
"description": "A Service Key authorizes access to all Resources assigned to a Service Account.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as time from \"@pulumi/time\";\nimport * as twingate from \"@twingate/pulumi-twingate\";\n\nconst githubActionsProd = new twingate.TwingateServiceAccount(\"githubActionsProd\", {});\nconst githubKey = new twingate.TwingateServiceAccountKey(\"githubKey\", {serviceAccountId: githubActionsProd.id});\n// Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\nconst keyRotationtime_rotating = new time.index.Time_rotating(\"keyRotationtime_rotating\", {rotationDays: 30});\nconst keyRotationtime_static = new time.index.Time_static(\"keyRotationtime_static\", {rfc3339: keyRotationtime_rotating.rfc3339});\nconst githubKeyWithRotation = new twingate.TwingateServiceAccountKey(\"githubKeyWithRotation\", {serviceAccountId: githubActionsProd.id});\n```\n```python\nimport pulumi\nimport pulumi_twingate as twingate\nimport pulumiverse_time as time\n\ngithub_actions_prod = twingate.TwingateServiceAccount(\"githubActionsProd\")\ngithub_key = twingate.TwingateServiceAccountKey(\"githubKey\", service_account_id=github_actions_prod.id)\n# Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\nkey_rotation_rotating = time.Rotating(\"keyRotationRotating\", rotation_days=30)\nkey_rotation_static = time.Static(\"keyRotationStatic\", rfc3339=key_rotation_rotating.rfc3339)\ngithub_key_with_rotation = twingate.TwingateServiceAccountKey(\"githubKeyWithRotation\", service_account_id=github_actions_prod.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Time = Pulumiverse.Time;\nusing Twingate = Twingate.Twingate;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var githubActionsProd = new Twingate.TwingateServiceAccount(\"githubActionsProd\");\n\n var githubKey = new Twingate.TwingateServiceAccountKey(\"githubKey\", new()\n {\n ServiceAccountId = githubActionsProd.Id,\n });\n\n // Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\n var keyRotationRotating = new Time.Rotating(\"keyRotationRotating\", new()\n {\n RotationDays = 30,\n });\n\n var keyRotationStatic = new Time.Static(\"keyRotationStatic\", new()\n {\n Rfc3339 = keyRotationRotating.Rfc3339,\n });\n\n var githubKeyWithRotation = new Twingate.TwingateServiceAccountKey(\"githubKeyWithRotation\", new()\n {\n ServiceAccountId = githubActionsProd.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/Twingate/pulumi-twingate/sdk/v3/go/twingate\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-time/sdk/go/time\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tgithubActionsProd, err := twingate.NewTwingateServiceAccount(ctx, \"githubActionsProd\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = twingate.NewTwingateServiceAccountKey(ctx, \"githubKey\", \u0026twingate.TwingateServiceAccountKeyArgs{\n\t\t\tServiceAccountId: githubActionsProd.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tkeyRotationRotating, err := time.NewRotating(ctx, \"keyRotationRotating\", \u0026time.RotatingArgs{\n\t\t\tRotationDays: pulumi.Int(30),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = time.NewStatic(ctx, \"keyRotationStatic\", \u0026time.StaticArgs{\n\t\t\tRfc3339: keyRotationRotating.Rfc3339,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = twingate.NewTwingateServiceAccountKey(ctx, \"githubKeyWithRotation\", \u0026twingate.TwingateServiceAccountKeyArgs{\n\t\t\tServiceAccountId: githubActionsProd.ID(),\n\t\t})\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.twingate.TwingateServiceAccount;\nimport com.pulumi.twingate.TwingateServiceAccountKey;\nimport com.pulumi.twingate.TwingateServiceAccountKeyArgs;\nimport com.pulumi.time.Rotating;\nimport com.pulumi.time.RotatingArgs;\nimport com.pulumi.time.Static;\nimport com.pulumi.time.StaticArgs;\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 githubActionsProd = new TwingateServiceAccount(\"githubActionsProd\");\n\n var githubKey = new TwingateServiceAccountKey(\"githubKey\", TwingateServiceAccountKeyArgs.builder()\n .serviceAccountId(githubActionsProd.id())\n .build());\n\n // Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\n var keyRotationRotating = new Rotating(\"keyRotationRotating\", RotatingArgs.builder()\n .rotationDays(30)\n .build());\n\n var keyRotationStatic = new Static(\"keyRotationStatic\", StaticArgs.builder()\n .rfc3339(keyRotationRotating.rfc3339())\n .build());\n\n var githubKeyWithRotation = new TwingateServiceAccountKey(\"githubKeyWithRotation\", TwingateServiceAccountKeyArgs.builder()\n .serviceAccountId(githubActionsProd.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n githubActionsProd:\n type: twingate:TwingateServiceAccount\n githubKey: # Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\n type: twingate:TwingateServiceAccountKey\n properties:\n serviceAccountId: ${githubActionsProd.id}\n keyRotationRotating:\n type: time:Rotating\n properties:\n rotationDays: 30\n keyRotationStatic:\n type: time:Static\n properties:\n rfc3339: ${keyRotationRotating.rfc3339}\n githubKeyWithRotation:\n type: twingate:TwingateServiceAccountKey\n properties:\n serviceAccountId: ${githubActionsProd.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n",
"description": "A Service Key authorizes access to all Resources assigned to a Service Account.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as time from \"@pulumiverse/time\";\nimport * as twingate from \"@twingate/pulumi-twingate\";\n\nconst githubActionsProd = new twingate.TwingateServiceAccount(\"githubActionsProd\", {});\nconst githubKey = new twingate.TwingateServiceAccountKey(\"githubKey\", {serviceAccountId: githubActionsProd.id});\n// Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\nconst keyRotationRotating = new time.Rotating(\"keyRotationRotating\", {rotationDays: 30});\nconst keyRotationStatic = new time.Static(\"keyRotationStatic\", {rfc3339: keyRotationRotating.rfc3339});\nconst githubKeyWithRotation = new twingate.TwingateServiceAccountKey(\"githubKeyWithRotation\", {serviceAccountId: githubActionsProd.id});\n```\n```python\nimport pulumi\nimport pulumi_twingate as twingate\nimport pulumiverse_time as time\n\ngithub_actions_prod = twingate.TwingateServiceAccount(\"githubActionsProd\")\ngithub_key = twingate.TwingateServiceAccountKey(\"githubKey\", service_account_id=github_actions_prod.id)\n# Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\nkey_rotation_rotating = time.Rotating(\"keyRotationRotating\", rotation_days=30)\nkey_rotation_static = time.Static(\"keyRotationStatic\", rfc3339=key_rotation_rotating.rfc3339)\ngithub_key_with_rotation = twingate.TwingateServiceAccountKey(\"githubKeyWithRotation\", service_account_id=github_actions_prod.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Time = Pulumiverse.Time;\nusing Twingate = Twingate.Twingate;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var githubActionsProd = new Twingate.TwingateServiceAccount(\"githubActionsProd\");\n\n var githubKey = new Twingate.TwingateServiceAccountKey(\"githubKey\", new()\n {\n ServiceAccountId = githubActionsProd.Id,\n });\n\n // Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\n var keyRotationRotating = new Time.Rotating(\"keyRotationRotating\", new()\n {\n RotationDays = 30,\n });\n\n var keyRotationStatic = new Time.Static(\"keyRotationStatic\", new()\n {\n Rfc3339 = keyRotationRotating.Rfc3339,\n });\n\n var githubKeyWithRotation = new Twingate.TwingateServiceAccountKey(\"githubKeyWithRotation\", new()\n {\n ServiceAccountId = githubActionsProd.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/Twingate/pulumi-twingate/sdk/v3/go/twingate\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-time/sdk/go/time\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tgithubActionsProd, err := twingate.NewTwingateServiceAccount(ctx, \"githubActionsProd\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = twingate.NewTwingateServiceAccountKey(ctx, \"githubKey\", \u0026twingate.TwingateServiceAccountKeyArgs{\n\t\t\tServiceAccountId: githubActionsProd.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tkeyRotationRotating, err := time.NewRotating(ctx, \"keyRotationRotating\", \u0026time.RotatingArgs{\n\t\t\tRotationDays: pulumi.Int(30),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = time.NewStatic(ctx, \"keyRotationStatic\", \u0026time.StaticArgs{\n\t\t\tRfc3339: keyRotationRotating.Rfc3339,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = twingate.NewTwingateServiceAccountKey(ctx, \"githubKeyWithRotation\", \u0026twingate.TwingateServiceAccountKeyArgs{\n\t\t\tServiceAccountId: githubActionsProd.ID(),\n\t\t})\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.twingate.TwingateServiceAccount;\nimport com.pulumi.twingate.TwingateServiceAccountKey;\nimport com.pulumi.twingate.TwingateServiceAccountKeyArgs;\nimport com.pulumi.time.Rotating;\nimport com.pulumi.time.RotatingArgs;\nimport com.pulumi.time.Static;\nimport com.pulumi.time.StaticArgs;\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 githubActionsProd = new TwingateServiceAccount(\"githubActionsProd\");\n\n var githubKey = new TwingateServiceAccountKey(\"githubKey\", TwingateServiceAccountKeyArgs.builder()\n .serviceAccountId(githubActionsProd.id())\n .build());\n\n // Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\n var keyRotationRotating = new Rotating(\"keyRotationRotating\", RotatingArgs.builder()\n .rotationDays(30)\n .build());\n\n var keyRotationStatic = new Static(\"keyRotationStatic\", StaticArgs.builder()\n .rfc3339(keyRotationRotating.rfc3339())\n .build());\n\n var githubKeyWithRotation = new TwingateServiceAccountKey(\"githubKeyWithRotation\", TwingateServiceAccountKeyArgs.builder()\n .serviceAccountId(githubActionsProd.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n githubActionsProd:\n type: twingate:TwingateServiceAccount\n githubKey: # Key rotation using the time provider (see https://registry.terraform.io/providers/hashicorp/time/latest)\n type: twingate:TwingateServiceAccountKey\n properties:\n serviceAccountId: ${githubActionsProd.id}\n keyRotationRotating:\n type: time:Rotating\n properties:\n rotationDays: 30\n keyRotationStatic:\n type: time:Static\n properties:\n rfc3339: ${keyRotationRotating.rfc3339}\n githubKeyWithRotation:\n type: twingate:TwingateServiceAccountKey\n properties:\n serviceAccountId: ${githubActionsProd.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n",
"properties": {
"expirationTime": {
"type": "integer",
Expand Down
9 changes: 8 additions & 1 deletion sdk/dotnet/GetTwingateRemoteNetwork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,25 @@ public sealed class GetTwingateRemoteNetworkResult
/// The name of the Remote Network
/// </summary>
public readonly string? Name;
/// <summary>
/// The type of the Remote Network. Must be one of the following: REGULAR, EXIT.
/// </summary>
public readonly string Type;

[OutputConstructor]
private GetTwingateRemoteNetworkResult(
string? id,

string location,

string? name)
string? name,

string type)
{
Id = id;
Location = location;
Name = name;
Type = type;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,25 @@ public sealed class GetTwingateRemoteNetworksRemoteNetworkResult
/// The name of the Remote Network.
/// </summary>
public readonly string? Name;
/// <summary>
/// The type of the Remote Network. Must be one of the following: REGULAR, EXIT.
/// </summary>
public readonly string Type;

[OutputConstructor]
private GetTwingateRemoteNetworksRemoteNetworkResult(
string id,

string location,

string? name)
string? name,

string type)
{
Id = id;
Location = location;
Name = name;
Type = type;
}
}
}
18 changes: 18 additions & 0 deletions sdk/dotnet/TwingateRemoteNetwork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public partial class TwingateRemoteNetwork : global::Pulumi.CustomResource
[Output("name")]
public Output<string> Name { get; private set; } = null!;

/// <summary>
/// The type of the Remote Network. Must be one of the following: REGULAR, EXIT. Defaults to REGULAR.
/// </summary>
[Output("type")]
public Output<string> Type { get; private set; } = null!;


/// <summary>
/// Create a TwingateRemoteNetwork resource with the given unique name, arguments, and options.
Expand Down Expand Up @@ -108,6 +114,12 @@ public sealed class TwingateRemoteNetworkArgs : global::Pulumi.ResourceArgs
[Input("name")]
public Input<string>? Name { get; set; }

/// <summary>
/// The type of the Remote Network. Must be one of the following: REGULAR, EXIT. Defaults to REGULAR.
/// </summary>
[Input("type")]
public Input<string>? Type { get; set; }

public TwingateRemoteNetworkArgs()
{
}
Expand All @@ -128,6 +140,12 @@ public sealed class TwingateRemoteNetworkState : global::Pulumi.ResourceArgs
[Input("name")]
public Input<string>? Name { get; set; }

/// <summary>
/// The type of the Remote Network. Must be one of the following: REGULAR, EXIT. Defaults to REGULAR.
/// </summary>
[Input("type")]
public Input<string>? Type { get; set; }

public TwingateRemoteNetworkState()
{
}
Expand Down
7 changes: 7 additions & 0 deletions sdk/go/twingate/getTwingateRemoteNetwork.go

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

9 changes: 9 additions & 0 deletions sdk/go/twingate/pulumiTypes.go

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

Loading

0 comments on commit 620a880

Please sign in to comment.