From 10a79cfc9f988389052d0b85e738b2130a47c25d Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Wed, 29 May 2024 03:09:13 +0000 Subject: [PATCH 1/2] make tfgen --- .pulumi-java-gen.version | 2 +- .../bridge-metadata.json | 30 ++ .../pulumi-resource-digitalocean/schema.json | 280 ++++++++++++++++++ provider/go.mod | 2 +- provider/go.sum | 4 +- upstream | 2 +- 6 files changed, 315 insertions(+), 5 deletions(-) diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index 142464bf..d33c3a21 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.11.0 \ No newline at end of file +0.12.0 \ No newline at end of file diff --git a/provider/cmd/pulumi-resource-digitalocean/bridge-metadata.json b/provider/cmd/pulumi-resource-digitalocean/bridge-metadata.json index 3c640341..bc3df500 100644 --- a/provider/cmd/pulumi-resource-digitalocean/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-digitalocean/bridge-metadata.json @@ -5,6 +5,9 @@ "current": "digitalocean:index/app:App", "majorVersion": 4, "fields": { + "dedicated_ips": { + "maxItemsOne": false + }, "spec": { "maxItemsOne": true, "elem": { @@ -21,6 +24,9 @@ "domains": { "maxItemsOne": false }, + "egress": { + "maxItemsOne": false + }, "env": { "maxItemsOne": false }, @@ -871,6 +877,15 @@ "digitalocean_vpc": { "current": "digitalocean:index/vpc:Vpc", "majorVersion": 4 + }, + "digitalocean_vpc_peering": { + "current": "digitalocean:index/vpcPeering:VpcPeering", + "majorVersion": 4, + "fields": { + "vpc_ids": { + "maxItemsOne": false + } + } } }, "datasources": { @@ -882,6 +897,9 @@ "current": "digitalocean:index/getApp:getApp", "majorVersion": 4, "fields": { + "dedicated_ips": { + "maxItemsOne": false + }, "spec": { "maxItemsOne": false, "elem": { @@ -898,6 +916,9 @@ "domains": { "maxItemsOne": false }, + "egress": { + "maxItemsOne": false + }, "env": { "maxItemsOne": false }, @@ -1837,6 +1858,15 @@ "digitalocean_vpc": { "current": "digitalocean:index/getVpc:getVpc", "majorVersion": 4 + }, + "digitalocean_vpc_peering": { + "current": "digitalocean:index/getVpcPeering:getVpcPeering", + "majorVersion": 4, + "fields": { + "vpc_ids": { + "maxItemsOne": false + } + } } } }, diff --git a/provider/cmd/pulumi-resource-digitalocean/schema.json b/provider/cmd/pulumi-resource-digitalocean/schema.json index c9facd65..766fec6d 100644 --- a/provider/cmd/pulumi-resource-digitalocean/schema.json +++ b/provider/cmd/pulumi-resource-digitalocean/schema.json @@ -112,6 +112,32 @@ ] }, "types": { + "digitalocean:index/AppDedicatedIp:AppDedicatedIp": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the app.\n" + }, + "ip": { + "type": "string", + "description": "The IP address of the dedicated egress IP.\n" + }, + "status": { + "type": "string", + "description": "The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED'\n" + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "id", + "ip", + "status" + ] + } + } + }, "digitalocean:index/AppSpec:AppSpec": { "properties": { "alerts": { @@ -141,6 +167,13 @@ }, "deprecationMessage": "This attribute has been replaced by `domain` which supports additional functionality." }, + "egresses": { + "type": "array", + "items": { + "$ref": "#/types/digitalocean:index/AppSpecEgress:AppSpecEgress" + }, + "description": "Specification for app egress configurations.\n" + }, "envs": { "type": "array", "items": { @@ -295,6 +328,15 @@ } } }, + "digitalocean:index/AppSpecEgress:AppSpecEgress": { + "properties": { + "type": { + "type": "string", + "description": "The app egress type: `AUTOASSIGN`, `DEDICATED_IP`\n" + } + }, + "type": "object" + }, "digitalocean:index/AppSpecEnv:AppSpecEnv": { "properties": { "key": { @@ -1235,6 +1277,7 @@ "nodejs": { "requiredOutputs": [ "httpPort", + "internalPorts", "name", "routes", "runCommand" @@ -2908,6 +2951,17 @@ "$ref": "#/types/digitalocean:index/LoadBalancerGlbSettingsCdn:LoadBalancerGlbSettingsCdn", "description": "CDN configuration supporting the following:\n" }, + "failoverThreshold": { + "type": "integer", + "description": "fail-over threshold\n" + }, + "regionPriorities": { + "type": "object", + "additionalProperties": { + "type": "integer" + }, + "description": "region priority map\n" + }, "targetPort": { "type": "integer", "description": "An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`.\n" @@ -3210,6 +3264,33 @@ "url" ] }, + "digitalocean:index/getAppDedicatedIp:getAppDedicatedIp": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the dedicated egress IP.\n" + }, + "ip": { + "type": "string", + "description": "The IP address of the dedicated egress IP.\n" + }, + "status": { + "type": "string", + "description": "The status of the dedicated egress IP.\n" + } + }, + "type": "object", + "required": [ + "id", + "ip", + "status" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "digitalocean:index/getAppSpec:getAppSpec": { "properties": { "alerts": { @@ -3238,6 +3319,12 @@ }, "deprecationMessage": "This attribute has been replaced by `domain` which supports additional functionality." }, + "egresses": { + "type": "array", + "items": { + "$ref": "#/types/digitalocean:index/getAppSpecEgress:getAppSpecEgress" + } + }, "envs": { "type": "array", "items": { @@ -3392,6 +3479,15 @@ } } }, + "digitalocean:index/getAppSpecEgress:getAppSpecEgress": { + "properties": { + "type": { + "type": "string", + "description": "The type of the environment variable, `GENERAL` or `SECRET`.\n" + } + }, + "type": "object" + }, "digitalocean:index/getAppSpecEnv:getAppSpecEnv": { "properties": { "key": { @@ -4374,6 +4470,7 @@ "type": "object", "required": [ "httpPort", + "internalPorts", "name", "routes", "runCommand" @@ -6216,6 +6313,17 @@ }, "description": "CDN specific configurations\n" }, + "failoverThreshold": { + "type": "integer", + "description": "fail-over threshold\n" + }, + "regionPriorities": { + "type": "object", + "additionalProperties": { + "type": "integer" + }, + "description": "region priority map\n" + }, "targetPort": { "type": "integer", "description": "target port rules\n" @@ -6228,6 +6336,8 @@ "type": "object", "required": [ "cdns", + "failoverThreshold", + "regionPriorities", "targetPort", "targetProtocol" ], @@ -7648,6 +7758,13 @@ "type": "string", "description": "The date and time of when the app was created.\n" }, + "dedicatedIps": { + "type": "array", + "items": { + "$ref": "#/types/digitalocean:index/AppDedicatedIp:AppDedicatedIp" + }, + "description": "The dedicated egress IP addresses associated with the app.\n" + }, "defaultIngress": { "type": "string", "description": "The default URL to access the app.\n" @@ -7672,6 +7789,7 @@ "required": [ "activeDeploymentId", "createdAt", + "dedicatedIps", "defaultIngress", "liveUrl", "projectId", @@ -7679,6 +7797,13 @@ "appUrn" ], "inputProperties": { + "dedicatedIps": { + "type": "array", + "items": { + "$ref": "#/types/digitalocean:index/AppDedicatedIp:AppDedicatedIp" + }, + "description": "The dedicated egress IP addresses associated with the app.\n" + }, "projectId": { "type": "string", "description": "The ID of the project that the app is assigned to.\n\nA spec can contain multiple components.\n\nA `service` can contain:\n", @@ -7704,6 +7829,13 @@ "type": "string", "description": "The date and time of when the app was created.\n" }, + "dedicatedIps": { + "type": "array", + "items": { + "$ref": "#/types/digitalocean:index/AppDedicatedIp:AppDedicatedIp" + }, + "description": "The dedicated egress IP addresses associated with the app.\n" + }, "defaultIngress": { "type": "string", "description": "The default URL to access the app.\n" @@ -14519,6 +14651,79 @@ }, "type": "object" } + }, + "digitalocean:index/vpcPeering:VpcPeering": { + "description": "Provides a DigitalOcean VPC Peering resource.\n\nVPC Peerings are used to connect two VPC networks allowing resources in each \nVPC to communicate with each other privately.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst example = new digitalocean.VpcPeering(\"example\", {\n name: \"example-peering\",\n vpcIds: [\n vpc1.id,\n vpc2.id,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nexample = digitalocean.VpcPeering(\"example\",\n name=\"example-peering\",\n vpc_ids=[\n vpc1[\"id\"],\n vpc2[\"id\"],\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new DigitalOcean.VpcPeering(\"example\", new()\n {\n Name = \"example-peering\",\n VpcIds = new[]\n {\n vpc1.Id,\n vpc2.Id,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := digitalocean.NewVpcPeering(ctx, \"example\", \u0026digitalocean.VpcPeeringArgs{\n\t\t\tName: pulumi.String(\"example-peering\"),\n\t\t\tVpcIds: pulumi.StringArray{\n\t\t\t\tvpc1.Id,\n\t\t\t\tvpc2.Id,\n\t\t\t},\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.digitalocean.VpcPeering;\nimport com.pulumi.digitalocean.VpcPeeringArgs;\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 example = new VpcPeering(\"example\", VpcPeeringArgs.builder()\n .name(\"example-peering\")\n .vpcIds( \n vpc1.id(),\n vpc2.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: digitalocean:VpcPeering\n properties:\n name: example-peering\n vpcIds:\n - ${vpc1.id}\n - ${vpc2.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Resource Assignement\n\nYou can use the VPC Peering resource to allow communication between resources\nin different VPCs. For example:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst vpc1 = new digitalocean.Vpc(\"vpc1\", {\n name: \"vpc1\",\n region: \"nyc3\",\n});\nconst vpc2 = new digitalocean.Vpc(\"vpc2\", {\n name: \"vpc2\",\n region: \"nyc3\",\n});\nconst example = new digitalocean.VpcPeering(\"example\", {\n name: \"example-peering\",\n vpcIds: [\n vpc1.id,\n vpc2.id,\n ],\n});\nconst example1 = new digitalocean.Droplet(\"example1\", {\n name: \"example1\",\n size: digitalocean.DropletSlug.DropletS1VCPU1GB,\n image: \"ubuntu-18-04-x64\",\n region: digitalocean.Region.NYC3,\n vpcUuid: vpc1.id,\n});\nconst example2 = new digitalocean.Droplet(\"example2\", {\n name: \"example2\",\n size: digitalocean.DropletSlug.DropletS1VCPU1GB,\n image: \"ubuntu-18-04-x64\",\n region: digitalocean.Region.NYC3,\n vpcUuid: vpc2.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nvpc1 = digitalocean.Vpc(\"vpc1\",\n name=\"vpc1\",\n region=\"nyc3\")\nvpc2 = digitalocean.Vpc(\"vpc2\",\n name=\"vpc2\",\n region=\"nyc3\")\nexample = digitalocean.VpcPeering(\"example\",\n name=\"example-peering\",\n vpc_ids=[\n vpc1.id,\n vpc2.id,\n ])\nexample1 = digitalocean.Droplet(\"example1\",\n name=\"example1\",\n size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,\n image=\"ubuntu-18-04-x64\",\n region=digitalocean.Region.NYC3,\n vpc_uuid=vpc1.id)\nexample2 = digitalocean.Droplet(\"example2\",\n name=\"example2\",\n size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,\n image=\"ubuntu-18-04-x64\",\n region=digitalocean.Region.NYC3,\n vpc_uuid=vpc2.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vpc1 = new DigitalOcean.Vpc(\"vpc1\", new()\n {\n Name = \"vpc1\",\n Region = \"nyc3\",\n });\n\n var vpc2 = new DigitalOcean.Vpc(\"vpc2\", new()\n {\n Name = \"vpc2\",\n Region = \"nyc3\",\n });\n\n var example = new DigitalOcean.VpcPeering(\"example\", new()\n {\n Name = \"example-peering\",\n VpcIds = new[]\n {\n vpc1.Id,\n vpc2.Id,\n },\n });\n\n var example1 = new DigitalOcean.Droplet(\"example1\", new()\n {\n Name = \"example1\",\n Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB,\n Image = \"ubuntu-18-04-x64\",\n Region = DigitalOcean.Region.NYC3,\n VpcUuid = vpc1.Id,\n });\n\n var example2 = new DigitalOcean.Droplet(\"example2\", new()\n {\n Name = \"example2\",\n Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB,\n Image = \"ubuntu-18-04-x64\",\n Region = DigitalOcean.Region.NYC3,\n VpcUuid = vpc2.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tvpc1, err := digitalocean.NewVpc(ctx, \"vpc1\", \u0026digitalocean.VpcArgs{\n\t\t\tName: pulumi.String(\"vpc1\"),\n\t\t\tRegion: pulumi.String(\"nyc3\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvpc2, err := digitalocean.NewVpc(ctx, \"vpc2\", \u0026digitalocean.VpcArgs{\n\t\t\tName: pulumi.String(\"vpc2\"),\n\t\t\tRegion: pulumi.String(\"nyc3\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = digitalocean.NewVpcPeering(ctx, \"example\", \u0026digitalocean.VpcPeeringArgs{\n\t\t\tName: pulumi.String(\"example-peering\"),\n\t\t\tVpcIds: pulumi.StringArray{\n\t\t\t\tvpc1.ID(),\n\t\t\t\tvpc2.ID(),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = digitalocean.NewDroplet(ctx, \"example1\", \u0026digitalocean.DropletArgs{\n\t\t\tName: pulumi.String(\"example1\"),\n\t\t\tSize: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB),\n\t\t\tImage: pulumi.String(\"ubuntu-18-04-x64\"),\n\t\t\tRegion: pulumi.String(digitalocean.RegionNYC3),\n\t\t\tVpcUuid: vpc1.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = digitalocean.NewDroplet(ctx, \"example2\", \u0026digitalocean.DropletArgs{\n\t\t\tName: pulumi.String(\"example2\"),\n\t\t\tSize: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB),\n\t\t\tImage: pulumi.String(\"ubuntu-18-04-x64\"),\n\t\t\tRegion: pulumi.String(digitalocean.RegionNYC3),\n\t\t\tVpcUuid: vpc2.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.digitalocean.Vpc;\nimport com.pulumi.digitalocean.VpcArgs;\nimport com.pulumi.digitalocean.VpcPeering;\nimport com.pulumi.digitalocean.VpcPeeringArgs;\nimport com.pulumi.digitalocean.Droplet;\nimport com.pulumi.digitalocean.DropletArgs;\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 vpc1 = new Vpc(\"vpc1\", VpcArgs.builder()\n .name(\"vpc1\")\n .region(\"nyc3\")\n .build());\n\n var vpc2 = new Vpc(\"vpc2\", VpcArgs.builder()\n .name(\"vpc2\")\n .region(\"nyc3\")\n .build());\n\n var example = new VpcPeering(\"example\", VpcPeeringArgs.builder()\n .name(\"example-peering\")\n .vpcIds( \n vpc1.id(),\n vpc2.id())\n .build());\n\n var example1 = new Droplet(\"example1\", DropletArgs.builder()\n .name(\"example1\")\n .size(\"s-1vcpu-1gb\")\n .image(\"ubuntu-18-04-x64\")\n .region(\"nyc3\")\n .vpcUuid(vpc1.id())\n .build());\n\n var example2 = new Droplet(\"example2\", DropletArgs.builder()\n .name(\"example2\")\n .size(\"s-1vcpu-1gb\")\n .image(\"ubuntu-18-04-x64\")\n .region(\"nyc3\")\n .vpcUuid(vpc2.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n vpc1:\n type: digitalocean:Vpc\n properties:\n name: vpc1\n region: nyc3\n vpc2:\n type: digitalocean:Vpc\n properties:\n name: vpc2\n region: nyc3\n example:\n type: digitalocean:VpcPeering\n properties:\n name: example-peering\n vpcIds:\n - ${vpc1.id}\n - ${vpc2.id}\n example1:\n type: digitalocean:Droplet\n properties:\n name: example1\n size: s-1vcpu-1gb\n image: ubuntu-18-04-x64\n region: nyc3\n vpcUuid: ${vpc1.id}\n example2:\n type: digitalocean:Droplet\n properties:\n name: example2\n size: s-1vcpu-1gb\n image: ubuntu-18-04-x64\n region: nyc3\n vpcUuid: ${vpc2.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nA VPC Peering can be imported using its `id`, e.g.\n\n```sh\n$ pulumi import digitalocean:index/vpcPeering:VpcPeering example 771ad360-c017-4b4e-a34e-73934f5f0190\n```\n\n", + "properties": { + "createdAt": { + "type": "string", + "description": "The date and time of when the VPC Peering was created.\n" + }, + "name": { + "type": "string", + "description": "A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only.\n" + }, + "status": { + "type": "string", + "description": "The status of the VPC Peering.\n" + }, + "vpcIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A set of two VPC IDs to be peered.\n" + } + }, + "required": [ + "createdAt", + "name", + "status", + "vpcIds" + ], + "inputProperties": { + "name": { + "type": "string", + "description": "A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only.\n" + }, + "vpcIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A set of two VPC IDs to be peered.\n", + "willReplaceOnChanges": true + } + }, + "requiredInputs": [ + "vpcIds" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering VpcPeering resources.\n", + "properties": { + "createdAt": { + "type": "string", + "description": "The date and time of when the VPC Peering was created.\n" + }, + "name": { + "type": "string", + "description": "A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only.\n" + }, + "status": { + "type": "string", + "description": "The status of the VPC Peering.\n" + }, + "vpcIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A set of two VPC IDs to be peered.\n", + "willReplaceOnChanges": true + } + }, + "type": "object" + } } }, "functions": { @@ -14581,6 +14786,13 @@ "appId": { "type": "string", "description": "The ID of the app to retrieve information about.\n" + }, + "dedicatedIps": { + "type": "array", + "items": { + "$ref": "#/types/digitalocean:index/getAppDedicatedIp:getAppDedicatedIp" + }, + "description": "A list of dedicated egress IP addresses associated with the app.\n" } }, "type": "object", @@ -14602,6 +14814,13 @@ "description": "The date and time of when the app was created.\n", "type": "string" }, + "dedicatedIps": { + "description": "A list of dedicated egress IP addresses associated with the app.\n", + "items": { + "$ref": "#/types/digitalocean:index/getAppDedicatedIp:getAppDedicatedIp" + }, + "type": "array" + }, "defaultIngress": { "description": "The default URL to access the app.\n", "type": "string" @@ -14638,6 +14857,7 @@ "activeDeploymentId", "appId", "createdAt", + "dedicatedIps", "defaultIngress", "liveUrl", "projectId", @@ -17648,6 +17868,66 @@ ], "type": "object" } + }, + "digitalocean:index/getVpcPeering:getVpcPeering": { + "description": "## Example Usage\n\n### VPC Peering By Id\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst example = digitalocean.getVpcPeering({\n id: \"example-id\",\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nexample = digitalocean.get_vpc_peering(id=\"example-id\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = DigitalOcean.GetVpcPeering.Invoke(new()\n {\n Id = \"example-id\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := digitalocean.LookupVpcPeering(ctx, \u0026digitalocean.LookupVpcPeeringArgs{\n\t\t\tId: pulumi.StringRef(\"example-id\"),\n\t\t}, 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.digitalocean.DigitaloceanFunctions;\nimport com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;\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 final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()\n .id(\"example-id\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: digitalocean:getVpcPeering\n Arguments:\n id: example-id\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nReuse the data about a VPC Peering in other resources:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst example = digitalocean.getVpcPeering({\n id: \"example-id\",\n});\nconst exampleDroplet = new digitalocean.Droplet(\"example\", {\n name: \"example-01\",\n size: digitalocean.DropletSlug.DropletS1VCPU1GB,\n image: \"ubuntu-18-04-x64\",\n region: digitalocean.Region.NYC3,\n vpcUuid: example.then(example =\u003e example.vpcIds?.[0]),\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nexample = digitalocean.get_vpc_peering(id=\"example-id\")\nexample_droplet = digitalocean.Droplet(\"example\",\n name=\"example-01\",\n size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,\n image=\"ubuntu-18-04-x64\",\n region=digitalocean.Region.NYC3,\n vpc_uuid=example.vpc_ids[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = DigitalOcean.GetVpcPeering.Invoke(new()\n {\n Id = \"example-id\",\n });\n\n var exampleDroplet = new DigitalOcean.Droplet(\"example\", new()\n {\n Name = \"example-01\",\n Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB,\n Image = \"ubuntu-18-04-x64\",\n Region = DigitalOcean.Region.NYC3,\n VpcUuid = example.Apply(getVpcPeeringResult =\u003e getVpcPeeringResult.VpcIds[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := digitalocean.LookupVpcPeering(ctx, \u0026digitalocean.LookupVpcPeeringArgs{\n\t\t\tId: pulumi.StringRef(\"example-id\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = digitalocean.NewDroplet(ctx, \"example\", \u0026digitalocean.DropletArgs{\n\t\t\tName: pulumi.String(\"example-01\"),\n\t\t\tSize: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB),\n\t\t\tImage: pulumi.String(\"ubuntu-18-04-x64\"),\n\t\t\tRegion: pulumi.String(digitalocean.RegionNYC3),\n\t\t\tVpcUuid: pulumi.String(example.VpcIds[0]),\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.digitalocean.DigitaloceanFunctions;\nimport com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;\nimport com.pulumi.digitalocean.Droplet;\nimport com.pulumi.digitalocean.DropletArgs;\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 final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()\n .id(\"example-id\")\n .build());\n\n var exampleDroplet = new Droplet(\"exampleDroplet\", DropletArgs.builder()\n .name(\"example-01\")\n .size(\"s-1vcpu-1gb\")\n .image(\"ubuntu-18-04-x64\")\n .region(\"nyc3\")\n .vpcUuid(example.applyValue(getVpcPeeringResult -\u003e getVpcPeeringResult.vpcIds()[0]))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleDroplet:\n type: digitalocean:Droplet\n name: example\n properties:\n name: example-01\n size: s-1vcpu-1gb\n image: ubuntu-18-04-x64\n region: nyc3\n vpcUuid: ${example.vpcIds[0]}\nvariables:\n example:\n fn::invoke:\n Function: digitalocean:getVpcPeering\n Arguments:\n id: example-id\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC Peering By Name\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst example = digitalocean.getVpcPeering({\n name: \"example-peering\",\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nexample = digitalocean.get_vpc_peering(name=\"example-peering\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = DigitalOcean.GetVpcPeering.Invoke(new()\n {\n Name = \"example-peering\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := digitalocean.LookupVpcPeering(ctx, \u0026digitalocean.LookupVpcPeeringArgs{\n\t\t\tName: pulumi.StringRef(\"example-peering\"),\n\t\t}, 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.digitalocean.DigitaloceanFunctions;\nimport com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;\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 final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()\n .name(\"example-peering\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: digitalocean:getVpcPeering\n Arguments:\n name: example-peering\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nReuse the data about a VPC Peering in other resources:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst example = digitalocean.getVpcPeering({\n name: \"example-peering\",\n});\nconst exampleDroplet = new digitalocean.Droplet(\"example\", {\n name: \"example-01\",\n size: digitalocean.DropletSlug.DropletS1VCPU1GB,\n image: \"ubuntu-18-04-x64\",\n region: digitalocean.Region.NYC3,\n vpcUuid: example.then(example =\u003e example.vpcIds?.[0]),\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nexample = digitalocean.get_vpc_peering(name=\"example-peering\")\nexample_droplet = digitalocean.Droplet(\"example\",\n name=\"example-01\",\n size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,\n image=\"ubuntu-18-04-x64\",\n region=digitalocean.Region.NYC3,\n vpc_uuid=example.vpc_ids[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = DigitalOcean.GetVpcPeering.Invoke(new()\n {\n Name = \"example-peering\",\n });\n\n var exampleDroplet = new DigitalOcean.Droplet(\"example\", new()\n {\n Name = \"example-01\",\n Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB,\n Image = \"ubuntu-18-04-x64\",\n Region = DigitalOcean.Region.NYC3,\n VpcUuid = example.Apply(getVpcPeeringResult =\u003e getVpcPeeringResult.VpcIds[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := digitalocean.LookupVpcPeering(ctx, \u0026digitalocean.LookupVpcPeeringArgs{\n\t\t\tName: pulumi.StringRef(\"example-peering\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = digitalocean.NewDroplet(ctx, \"example\", \u0026digitalocean.DropletArgs{\n\t\t\tName: pulumi.String(\"example-01\"),\n\t\t\tSize: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB),\n\t\t\tImage: pulumi.String(\"ubuntu-18-04-x64\"),\n\t\t\tRegion: pulumi.String(digitalocean.RegionNYC3),\n\t\t\tVpcUuid: pulumi.String(example.VpcIds[0]),\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.digitalocean.DigitaloceanFunctions;\nimport com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;\nimport com.pulumi.digitalocean.Droplet;\nimport com.pulumi.digitalocean.DropletArgs;\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 final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()\n .name(\"example-peering\")\n .build());\n\n var exampleDroplet = new Droplet(\"exampleDroplet\", DropletArgs.builder()\n .name(\"example-01\")\n .size(\"s-1vcpu-1gb\")\n .image(\"ubuntu-18-04-x64\")\n .region(\"nyc3\")\n .vpcUuid(example.applyValue(getVpcPeeringResult -\u003e getVpcPeeringResult.vpcIds()[0]))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleDroplet:\n type: digitalocean:Droplet\n name: example\n properties:\n name: example-01\n size: s-1vcpu-1gb\n image: ubuntu-18-04-x64\n region: nyc3\n vpcUuid: ${example.vpcIds[0]}\nvariables:\n example:\n fn::invoke:\n Function: digitalocean:getVpcPeering\n Arguments:\n name: example-peering\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "inputs": { + "description": "A collection of arguments for invoking getVpcPeering.\n", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of an existing VPC Peering.\n" + }, + "name": { + "type": "string", + "description": "The name of an existing VPC Peering.\n" + }, + "vpcIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of VPC IDs involved in the peering.\n" + } + }, + "type": "object" + }, + "outputs": { + "description": "A collection of values returned by getVpcPeering.\n", + "properties": { + "createdAt": { + "description": "The date and time of when the VPC Peering was created.\n", + "type": "string" + }, + "id": { + "description": "The unique identifier for the VPC Peering.\n", + "type": "string" + }, + "name": { + "description": "The name of the VPC Peering.\n", + "type": "string" + }, + "status": { + "description": "The status of the VPC Peering.\n", + "type": "string" + }, + "vpcIds": { + "description": "The list of VPC IDs involved in the peering.\n", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "createdAt", + "id", + "name", + "status", + "vpcIds" + ], + "type": "object" + } } } } \ No newline at end of file diff --git a/provider/go.mod b/provider/go.mod index 7511d5e7..87dbb06b 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -75,7 +75,7 @@ require ( github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.5.0 // indirect - github.com/digitalocean/godo v1.113.0 // indirect + github.com/digitalocean/godo v1.116.0 // indirect github.com/djherbis/times v1.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect diff --git a/provider/go.sum b/provider/go.sum index 2ff65783..e2f32938 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1671,8 +1671,8 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.78.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs= github.com/digitalocean/godo v1.81.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= -github.com/digitalocean/godo v1.113.0 h1:CLtCxlP4wDAjKIQ+Hshht/UNbgAp8/J/XBH1ZtDCF9Y= -github.com/digitalocean/godo v1.113.0/go.mod h1:Z2mTP848Vi3IXXl5YbPekUgr4j4tOePomA+OE1Ag98w= +github.com/digitalocean/godo v1.116.0 h1:SuF/Imd1/dE/nYrUFVkJ2itesQNnJQE1a/vmtHknxeE= +github.com/digitalocean/godo v1.116.0/go.mod h1:Vk0vpCot2HOAJwc5WE8wljZGtJ3ZtWIc8MQ8rF38sdo= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= diff --git a/upstream b/upstream index 7ef4b10d..c323788e 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 7ef4b10da1e1a8bcf553abf3b6adeb46496f2442 +Subproject commit c323788e764b0b92262cf380887d488f272edbd7 From d89c8767abe6d72e3b5862d6138a628dd542a149 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Wed, 29 May 2024 03:10:51 +0000 Subject: [PATCH 2/2] make build_sdks --- sdk/dotnet/App.cs | 30 + sdk/dotnet/GetApp.cs | 31 + sdk/dotnet/GetVpcPeering.cs | 316 ++++++ sdk/dotnet/Inputs/AppDedicatedIpArgs.cs | 38 + sdk/dotnet/Inputs/AppDedicatedIpGetArgs.cs | 38 + sdk/dotnet/Inputs/AppSpecArgs.cs | 12 + sdk/dotnet/Inputs/AppSpecEgressArgs.cs | 26 + sdk/dotnet/Inputs/AppSpecEgressGetArgs.cs | 26 + sdk/dotnet/Inputs/AppSpecGetArgs.cs | 12 + sdk/dotnet/Inputs/GetAppDedicatedIp.cs | 38 + sdk/dotnet/Inputs/GetAppDedicatedIpArgs.cs | 38 + .../Inputs/LoadBalancerGlbSettingsArgs.cs | 18 + .../Inputs/LoadBalancerGlbSettingsGetArgs.cs | 18 + sdk/dotnet/Outputs/AppDedicatedIp.cs | 42 + sdk/dotnet/Outputs/AppSpec.cs | 7 + sdk/dotnet/Outputs/AppSpecEgress.cs | 27 + sdk/dotnet/Outputs/GetAppDedicatedIpResult.cs | 42 + sdk/dotnet/Outputs/GetAppSpecEgressResult.cs | 27 + sdk/dotnet/Outputs/GetAppSpecResult.cs | 4 + .../GetLoadBalancerGlbSettingResult.cs | 14 + sdk/dotnet/Outputs/LoadBalancerGlbSettings.cs | 14 + sdk/dotnet/VpcPeering.cs | 239 ++++ sdk/go/digitalocean/app.go | 15 + sdk/go/digitalocean/getApp.go | 11 + sdk/go/digitalocean/getVpcPeering.go | 242 ++++ sdk/go/digitalocean/init.go | 7 + sdk/go/digitalocean/pulumiTypes.go | 525 ++++++++- sdk/go/digitalocean/vpcPeering.go | 364 ++++++ sdk/java/build.gradle | 2 +- .../java/com/pulumi/digitalocean/App.java | 16 + .../java/com/pulumi/digitalocean/AppArgs.java | 49 + .../digitalocean/DigitaloceanFunctions.java | 1005 +++++++++++++++++ .../com/pulumi/digitalocean/VpcPeering.java | 248 ++++ .../pulumi/digitalocean/VpcPeeringArgs.java | 135 +++ .../inputs/AppDedicatedIpArgs.java | 157 +++ .../digitalocean/inputs/AppSpecArgs.java | 48 + .../inputs/AppSpecEgressArgs.java | 83 ++ .../pulumi/digitalocean/inputs/AppState.java | 49 + .../digitalocean/inputs/GetAppArgs.java | 51 + .../inputs/GetAppDedicatedIp.java | 134 +++ .../inputs/GetAppDedicatedIpArgs.java | 165 +++ .../digitalocean/inputs/GetAppPlainArgs.java | 41 + .../inputs/GetVpcPeeringArgs.java | 168 +++ .../inputs/GetVpcPeeringPlainArgs.java | 137 +++ .../inputs/LoadBalancerGlbSettingsArgs.java | 75 ++ .../digitalocean/inputs/VpcPeeringState.java | 205 ++++ .../digitalocean/outputs/AppDedicatedIp.java | 99 ++ .../pulumi/digitalocean/outputs/AppSpec.java | 25 + .../digitalocean/outputs/AppSpecEgress.java | 57 + .../outputs/GetAppDedicatedIp.java | 104 ++ .../digitalocean/outputs/GetAppResult.java | 27 + .../digitalocean/outputs/GetAppSpec.java | 17 + .../outputs/GetAppSpecEgress.java | 57 + .../outputs/GetAppSpecService.java | 12 +- .../outputs/GetLoadBalancerGlbSetting.java | 47 + .../outputs/GetVpcPeeringResult.java | 154 +++ .../outputs/LoadBalancerGlbSettings.java | 43 + sdk/nodejs/app.ts | 14 + sdk/nodejs/getApp.ts | 13 + sdk/nodejs/getVpcPeering.ts | 203 ++++ sdk/nodejs/index.ts | 13 + sdk/nodejs/tsconfig.json | 4 +- sdk/nodejs/types/input.ts | 64 ++ sdk/nodejs/types/output.ts | 69 +- sdk/nodejs/vpcPeering.ts | 187 +++ sdk/python/pulumi_digitalocean/__init__.py | 10 + sdk/python/pulumi_digitalocean/_inputs.py | 183 ++- sdk/python/pulumi_digitalocean/app.py | 47 + sdk/python/pulumi_digitalocean/get_app.py | 21 +- .../pulumi_digitalocean/get_vpc_peering.py | 231 ++++ sdk/python/pulumi_digitalocean/outputs.py | 220 +++- sdk/python/pulumi_digitalocean/vpc_peering.py | 369 ++++++ 72 files changed, 7253 insertions(+), 26 deletions(-) create mode 100644 sdk/dotnet/GetVpcPeering.cs create mode 100644 sdk/dotnet/Inputs/AppDedicatedIpArgs.cs create mode 100644 sdk/dotnet/Inputs/AppDedicatedIpGetArgs.cs create mode 100644 sdk/dotnet/Inputs/AppSpecEgressArgs.cs create mode 100644 sdk/dotnet/Inputs/AppSpecEgressGetArgs.cs create mode 100644 sdk/dotnet/Inputs/GetAppDedicatedIp.cs create mode 100644 sdk/dotnet/Inputs/GetAppDedicatedIpArgs.cs create mode 100644 sdk/dotnet/Outputs/AppDedicatedIp.cs create mode 100644 sdk/dotnet/Outputs/AppSpecEgress.cs create mode 100644 sdk/dotnet/Outputs/GetAppDedicatedIpResult.cs create mode 100644 sdk/dotnet/Outputs/GetAppSpecEgressResult.cs create mode 100644 sdk/dotnet/VpcPeering.cs create mode 100644 sdk/go/digitalocean/getVpcPeering.go create mode 100644 sdk/go/digitalocean/vpcPeering.go create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeering.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeeringArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppDedicatedIpArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecEgressArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIp.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIpArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringPlainArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/inputs/VpcPeeringState.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppDedicatedIp.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpecEgress.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppDedicatedIp.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecEgress.java create mode 100644 sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetVpcPeeringResult.java create mode 100644 sdk/nodejs/getVpcPeering.ts create mode 100644 sdk/nodejs/vpcPeering.ts create mode 100644 sdk/python/pulumi_digitalocean/get_vpc_peering.py create mode 100644 sdk/python/pulumi_digitalocean/vpc_peering.py diff --git a/sdk/dotnet/App.cs b/sdk/dotnet/App.cs index e458aca2..b725ca72 100644 --- a/sdk/dotnet/App.cs +++ b/sdk/dotnet/App.cs @@ -118,6 +118,12 @@ public partial class App : global::Pulumi.CustomResource [Output("createdAt")] public Output CreatedAt { get; private set; } = null!; + /// + /// The dedicated egress IP addresses associated with the app. + /// + [Output("dedicatedIps")] + public Output> DedicatedIps { get; private set; } = null!; + /// /// The default URL to access the app. /// @@ -198,6 +204,18 @@ public static App Get(string name, Input id, AppState? state = null, Cus public sealed class AppArgs : global::Pulumi.ResourceArgs { + [Input("dedicatedIps")] + private InputList? _dedicatedIps; + + /// + /// The dedicated egress IP addresses associated with the app. + /// + public InputList DedicatedIps + { + get => _dedicatedIps ?? (_dedicatedIps = new InputList()); + set => _dedicatedIps = value; + } + /// /// The ID of the project that the app is assigned to. /// @@ -240,6 +258,18 @@ public sealed class AppState : global::Pulumi.ResourceArgs [Input("createdAt")] public Input? CreatedAt { get; set; } + [Input("dedicatedIps")] + private InputList? _dedicatedIps; + + /// + /// The dedicated egress IP addresses associated with the app. + /// + public InputList DedicatedIps + { + get => _dedicatedIps ?? (_dedicatedIps = new InputList()); + set => _dedicatedIps = value; + } + /// /// The default URL to access the app. /// diff --git a/sdk/dotnet/GetApp.cs b/sdk/dotnet/GetApp.cs index 315657e3..9e40e5fa 100644 --- a/sdk/dotnet/GetApp.cs +++ b/sdk/dotnet/GetApp.cs @@ -81,6 +81,18 @@ public sealed class GetAppArgs : global::Pulumi.InvokeArgs [Input("appId", required: true)] public string AppId { get; set; } = null!; + [Input("dedicatedIps")] + private List? _dedicatedIps; + + /// + /// A list of dedicated egress IP addresses associated with the app. + /// + public List DedicatedIps + { + get => _dedicatedIps ?? (_dedicatedIps = new List()); + set => _dedicatedIps = value; + } + public GetAppArgs() { } @@ -95,6 +107,18 @@ public sealed class GetAppInvokeArgs : global::Pulumi.InvokeArgs [Input("appId", required: true)] public Input AppId { get; set; } = null!; + [Input("dedicatedIps")] + private InputList? _dedicatedIps; + + /// + /// A list of dedicated egress IP addresses associated with the app. + /// + public InputList DedicatedIps + { + get => _dedicatedIps ?? (_dedicatedIps = new InputList()); + set => _dedicatedIps = value; + } + public GetAppInvokeArgs() { } @@ -115,6 +139,10 @@ public sealed class GetAppResult /// public readonly string CreatedAt; /// + /// A list of dedicated egress IP addresses associated with the app. + /// + public readonly ImmutableArray DedicatedIps; + /// /// The default URL to access the app. /// public readonly string DefaultIngress; @@ -151,6 +179,8 @@ private GetAppResult( string createdAt, + ImmutableArray dedicatedIps, + string defaultIngress, string id, @@ -168,6 +198,7 @@ private GetAppResult( ActiveDeploymentId = activeDeploymentId; AppId = appId; CreatedAt = createdAt; + DedicatedIps = dedicatedIps; DefaultIngress = defaultIngress; Id = id; LiveUrl = liveUrl; diff --git a/sdk/dotnet/GetVpcPeering.cs b/sdk/dotnet/GetVpcPeering.cs new file mode 100644 index 00000000..db4393dd --- /dev/null +++ b/sdk/dotnet/GetVpcPeering.cs @@ -0,0 +1,316 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean +{ + public static class GetVpcPeering + { + /// + /// ## Example Usage + /// + /// ### VPC Peering By Id + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Id = "example-id", + /// }); + /// + /// }); + /// ``` + /// + /// Reuse the data about a VPC Peering in other resources: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Id = "example-id", + /// }); + /// + /// var exampleDroplet = new DigitalOcean.Droplet("example", new() + /// { + /// Name = "example-01", + /// Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB, + /// Image = "ubuntu-18-04-x64", + /// Region = DigitalOcean.Region.NYC3, + /// VpcUuid = example.Apply(getVpcPeeringResult => getVpcPeeringResult.VpcIds[0]), + /// }); + /// + /// }); + /// ``` + /// + /// ### VPC Peering By Name + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Name = "example-peering", + /// }); + /// + /// }); + /// ``` + /// + /// Reuse the data about a VPC Peering in other resources: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Name = "example-peering", + /// }); + /// + /// var exampleDroplet = new DigitalOcean.Droplet("example", new() + /// { + /// Name = "example-01", + /// Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB, + /// Image = "ubuntu-18-04-x64", + /// Region = DigitalOcean.Region.NYC3, + /// VpcUuid = example.Apply(getVpcPeeringResult => getVpcPeeringResult.VpcIds[0]), + /// }); + /// + /// }); + /// ``` + /// + public static Task InvokeAsync(GetVpcPeeringArgs? args = null, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("digitalocean:index/getVpcPeering:getVpcPeering", args ?? new GetVpcPeeringArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ### VPC Peering By Id + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Id = "example-id", + /// }); + /// + /// }); + /// ``` + /// + /// Reuse the data about a VPC Peering in other resources: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Id = "example-id", + /// }); + /// + /// var exampleDroplet = new DigitalOcean.Droplet("example", new() + /// { + /// Name = "example-01", + /// Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB, + /// Image = "ubuntu-18-04-x64", + /// Region = DigitalOcean.Region.NYC3, + /// VpcUuid = example.Apply(getVpcPeeringResult => getVpcPeeringResult.VpcIds[0]), + /// }); + /// + /// }); + /// ``` + /// + /// ### VPC Peering By Name + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Name = "example-peering", + /// }); + /// + /// }); + /// ``` + /// + /// Reuse the data about a VPC Peering in other resources: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = DigitalOcean.GetVpcPeering.Invoke(new() + /// { + /// Name = "example-peering", + /// }); + /// + /// var exampleDroplet = new DigitalOcean.Droplet("example", new() + /// { + /// Name = "example-01", + /// Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB, + /// Image = "ubuntu-18-04-x64", + /// Region = DigitalOcean.Region.NYC3, + /// VpcUuid = example.Apply(getVpcPeeringResult => getVpcPeeringResult.VpcIds[0]), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetVpcPeeringInvokeArgs? args = null, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("digitalocean:index/getVpcPeering:getVpcPeering", args ?? new GetVpcPeeringInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetVpcPeeringArgs : global::Pulumi.InvokeArgs + { + /// + /// The unique identifier of an existing VPC Peering. + /// + [Input("id")] + public string? Id { get; set; } + + /// + /// The name of an existing VPC Peering. + /// + [Input("name")] + public string? Name { get; set; } + + [Input("vpcIds")] + private List? _vpcIds; + + /// + /// The list of VPC IDs involved in the peering. + /// + public List VpcIds + { + get => _vpcIds ?? (_vpcIds = new List()); + set => _vpcIds = value; + } + + public GetVpcPeeringArgs() + { + } + public static new GetVpcPeeringArgs Empty => new GetVpcPeeringArgs(); + } + + public sealed class GetVpcPeeringInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The unique identifier of an existing VPC Peering. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The name of an existing VPC Peering. + /// + [Input("name")] + public Input? Name { get; set; } + + [Input("vpcIds")] + private InputList? _vpcIds; + + /// + /// The list of VPC IDs involved in the peering. + /// + public InputList VpcIds + { + get => _vpcIds ?? (_vpcIds = new InputList()); + set => _vpcIds = value; + } + + public GetVpcPeeringInvokeArgs() + { + } + public static new GetVpcPeeringInvokeArgs Empty => new GetVpcPeeringInvokeArgs(); + } + + + [OutputType] + public sealed class GetVpcPeeringResult + { + /// + /// The date and time of when the VPC Peering was created. + /// + public readonly string CreatedAt; + /// + /// The unique identifier for the VPC Peering. + /// + public readonly string Id; + /// + /// The name of the VPC Peering. + /// + public readonly string Name; + /// + /// The status of the VPC Peering. + /// + public readonly string Status; + /// + /// The list of VPC IDs involved in the peering. + /// + public readonly ImmutableArray VpcIds; + + [OutputConstructor] + private GetVpcPeeringResult( + string createdAt, + + string id, + + string name, + + string status, + + ImmutableArray vpcIds) + { + CreatedAt = createdAt; + Id = id; + Name = name; + Status = status; + VpcIds = vpcIds; + } + } +} diff --git a/sdk/dotnet/Inputs/AppDedicatedIpArgs.cs b/sdk/dotnet/Inputs/AppDedicatedIpArgs.cs new file mode 100644 index 00000000..e5a36548 --- /dev/null +++ b/sdk/dotnet/Inputs/AppDedicatedIpArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Inputs +{ + + public sealed class AppDedicatedIpArgs : global::Pulumi.ResourceArgs + { + /// + /// The ID of the app. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The IP address of the dedicated egress IP. + /// + [Input("ip")] + public Input? Ip { get; set; } + + /// + /// The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + /// + [Input("status")] + public Input? Status { get; set; } + + public AppDedicatedIpArgs() + { + } + public static new AppDedicatedIpArgs Empty => new AppDedicatedIpArgs(); + } +} diff --git a/sdk/dotnet/Inputs/AppDedicatedIpGetArgs.cs b/sdk/dotnet/Inputs/AppDedicatedIpGetArgs.cs new file mode 100644 index 00000000..0642f1fa --- /dev/null +++ b/sdk/dotnet/Inputs/AppDedicatedIpGetArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Inputs +{ + + public sealed class AppDedicatedIpGetArgs : global::Pulumi.ResourceArgs + { + /// + /// The ID of the app. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The IP address of the dedicated egress IP. + /// + [Input("ip")] + public Input? Ip { get; set; } + + /// + /// The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + /// + [Input("status")] + public Input? Status { get; set; } + + public AppDedicatedIpGetArgs() + { + } + public static new AppDedicatedIpGetArgs Empty => new AppDedicatedIpGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/AppSpecArgs.cs b/sdk/dotnet/Inputs/AppSpecArgs.cs index e10f7531..e13103a2 100644 --- a/sdk/dotnet/Inputs/AppSpecArgs.cs +++ b/sdk/dotnet/Inputs/AppSpecArgs.cs @@ -53,6 +53,18 @@ public InputList Domains set => _domains = value; } + [Input("egresses")] + private InputList? _egresses; + + /// + /// Specification for app egress configurations. + /// + public InputList Egresses + { + get => _egresses ?? (_egresses = new InputList()); + set => _egresses = value; + } + [Input("envs")] private InputList? _envs; diff --git a/sdk/dotnet/Inputs/AppSpecEgressArgs.cs b/sdk/dotnet/Inputs/AppSpecEgressArgs.cs new file mode 100644 index 00000000..515953ec --- /dev/null +++ b/sdk/dotnet/Inputs/AppSpecEgressArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Inputs +{ + + public sealed class AppSpecEgressArgs : global::Pulumi.ResourceArgs + { + /// + /// The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + /// + [Input("type")] + public Input? Type { get; set; } + + public AppSpecEgressArgs() + { + } + public static new AppSpecEgressArgs Empty => new AppSpecEgressArgs(); + } +} diff --git a/sdk/dotnet/Inputs/AppSpecEgressGetArgs.cs b/sdk/dotnet/Inputs/AppSpecEgressGetArgs.cs new file mode 100644 index 00000000..677f347e --- /dev/null +++ b/sdk/dotnet/Inputs/AppSpecEgressGetArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Inputs +{ + + public sealed class AppSpecEgressGetArgs : global::Pulumi.ResourceArgs + { + /// + /// The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + /// + [Input("type")] + public Input? Type { get; set; } + + public AppSpecEgressGetArgs() + { + } + public static new AppSpecEgressGetArgs Empty => new AppSpecEgressGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/AppSpecGetArgs.cs b/sdk/dotnet/Inputs/AppSpecGetArgs.cs index 00c8681b..d9663765 100644 --- a/sdk/dotnet/Inputs/AppSpecGetArgs.cs +++ b/sdk/dotnet/Inputs/AppSpecGetArgs.cs @@ -53,6 +53,18 @@ public InputList Domains set => _domains = value; } + [Input("egresses")] + private InputList? _egresses; + + /// + /// Specification for app egress configurations. + /// + public InputList Egresses + { + get => _egresses ?? (_egresses = new InputList()); + set => _egresses = value; + } + [Input("envs")] private InputList? _envs; diff --git a/sdk/dotnet/Inputs/GetAppDedicatedIp.cs b/sdk/dotnet/Inputs/GetAppDedicatedIp.cs new file mode 100644 index 00000000..e4ec61ce --- /dev/null +++ b/sdk/dotnet/Inputs/GetAppDedicatedIp.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Inputs +{ + + public sealed class GetAppDedicatedIpArgs : global::Pulumi.InvokeArgs + { + /// + /// The ID of the dedicated egress IP. + /// + [Input("id", required: true)] + public string Id { get; set; } = null!; + + /// + /// The IP address of the dedicated egress IP. + /// + [Input("ip", required: true)] + public string Ip { get; set; } = null!; + + /// + /// The status of the dedicated egress IP. + /// + [Input("status", required: true)] + public string Status { get; set; } = null!; + + public GetAppDedicatedIpArgs() + { + } + public static new GetAppDedicatedIpArgs Empty => new GetAppDedicatedIpArgs(); + } +} diff --git a/sdk/dotnet/Inputs/GetAppDedicatedIpArgs.cs b/sdk/dotnet/Inputs/GetAppDedicatedIpArgs.cs new file mode 100644 index 00000000..b723843b --- /dev/null +++ b/sdk/dotnet/Inputs/GetAppDedicatedIpArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Inputs +{ + + public sealed class GetAppDedicatedIpInputArgs : global::Pulumi.ResourceArgs + { + /// + /// The ID of the dedicated egress IP. + /// + [Input("id", required: true)] + public Input Id { get; set; } = null!; + + /// + /// The IP address of the dedicated egress IP. + /// + [Input("ip", required: true)] + public Input Ip { get; set; } = null!; + + /// + /// The status of the dedicated egress IP. + /// + [Input("status", required: true)] + public Input Status { get; set; } = null!; + + public GetAppDedicatedIpInputArgs() + { + } + public static new GetAppDedicatedIpInputArgs Empty => new GetAppDedicatedIpInputArgs(); + } +} diff --git a/sdk/dotnet/Inputs/LoadBalancerGlbSettingsArgs.cs b/sdk/dotnet/Inputs/LoadBalancerGlbSettingsArgs.cs index 7943aaf3..36889df9 100644 --- a/sdk/dotnet/Inputs/LoadBalancerGlbSettingsArgs.cs +++ b/sdk/dotnet/Inputs/LoadBalancerGlbSettingsArgs.cs @@ -18,6 +18,24 @@ public sealed class LoadBalancerGlbSettingsArgs : global::Pulumi.ResourceArgs [Input("cdn")] public Input? Cdn { get; set; } + /// + /// fail-over threshold + /// + [Input("failoverThreshold")] + public Input? FailoverThreshold { get; set; } + + [Input("regionPriorities")] + private InputMap? _regionPriorities; + + /// + /// region priority map + /// + public InputMap RegionPriorities + { + get => _regionPriorities ?? (_regionPriorities = new InputMap()); + set => _regionPriorities = value; + } + /// /// An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. /// diff --git a/sdk/dotnet/Inputs/LoadBalancerGlbSettingsGetArgs.cs b/sdk/dotnet/Inputs/LoadBalancerGlbSettingsGetArgs.cs index 4458505b..120b045e 100644 --- a/sdk/dotnet/Inputs/LoadBalancerGlbSettingsGetArgs.cs +++ b/sdk/dotnet/Inputs/LoadBalancerGlbSettingsGetArgs.cs @@ -18,6 +18,24 @@ public sealed class LoadBalancerGlbSettingsGetArgs : global::Pulumi.ResourceArgs [Input("cdn")] public Input? Cdn { get; set; } + /// + /// fail-over threshold + /// + [Input("failoverThreshold")] + public Input? FailoverThreshold { get; set; } + + [Input("regionPriorities")] + private InputMap? _regionPriorities; + + /// + /// region priority map + /// + public InputMap RegionPriorities + { + get => _regionPriorities ?? (_regionPriorities = new InputMap()); + set => _regionPriorities = value; + } + /// /// An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. /// diff --git a/sdk/dotnet/Outputs/AppDedicatedIp.cs b/sdk/dotnet/Outputs/AppDedicatedIp.cs new file mode 100644 index 00000000..c6801b3f --- /dev/null +++ b/sdk/dotnet/Outputs/AppDedicatedIp.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Outputs +{ + + [OutputType] + public sealed class AppDedicatedIp + { + /// + /// The ID of the app. + /// + public readonly string? Id; + /// + /// The IP address of the dedicated egress IP. + /// + public readonly string? Ip; + /// + /// The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + /// + public readonly string? Status; + + [OutputConstructor] + private AppDedicatedIp( + string? id, + + string? ip, + + string? status) + { + Id = id; + Ip = ip; + Status = status; + } + } +} diff --git a/sdk/dotnet/Outputs/AppSpec.cs b/sdk/dotnet/Outputs/AppSpec.cs index 15493bd4..3c458379 100644 --- a/sdk/dotnet/Outputs/AppSpec.cs +++ b/sdk/dotnet/Outputs/AppSpec.cs @@ -24,6 +24,10 @@ public sealed class AppSpec public readonly ImmutableArray DomainNames; public readonly ImmutableArray Domains; /// + /// Specification for app egress configurations. + /// + public readonly ImmutableArray Egresses; + /// /// Describes an app-wide environment variable made available to all components. /// public readonly ImmutableArray Envs; @@ -59,6 +63,8 @@ private AppSpec( ImmutableArray domains, + ImmutableArray egresses, + ImmutableArray envs, ImmutableArray features, @@ -83,6 +89,7 @@ private AppSpec( Databases = databases; DomainNames = domainNames; Domains = domains; + Egresses = egresses; Envs = envs; Features = features; Functions = functions; diff --git a/sdk/dotnet/Outputs/AppSpecEgress.cs b/sdk/dotnet/Outputs/AppSpecEgress.cs new file mode 100644 index 00000000..10941ee5 --- /dev/null +++ b/sdk/dotnet/Outputs/AppSpecEgress.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Outputs +{ + + [OutputType] + public sealed class AppSpecEgress + { + /// + /// The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + /// + public readonly string? Type; + + [OutputConstructor] + private AppSpecEgress(string? type) + { + Type = type; + } + } +} diff --git a/sdk/dotnet/Outputs/GetAppDedicatedIpResult.cs b/sdk/dotnet/Outputs/GetAppDedicatedIpResult.cs new file mode 100644 index 00000000..b5ad4e1e --- /dev/null +++ b/sdk/dotnet/Outputs/GetAppDedicatedIpResult.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Outputs +{ + + [OutputType] + public sealed class GetAppDedicatedIpResult + { + /// + /// The ID of the dedicated egress IP. + /// + public readonly string Id; + /// + /// The IP address of the dedicated egress IP. + /// + public readonly string Ip; + /// + /// The status of the dedicated egress IP. + /// + public readonly string Status; + + [OutputConstructor] + private GetAppDedicatedIpResult( + string id, + + string ip, + + string status) + { + Id = id; + Ip = ip; + Status = status; + } + } +} diff --git a/sdk/dotnet/Outputs/GetAppSpecEgressResult.cs b/sdk/dotnet/Outputs/GetAppSpecEgressResult.cs new file mode 100644 index 00000000..b9d4c8b1 --- /dev/null +++ b/sdk/dotnet/Outputs/GetAppSpecEgressResult.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean.Outputs +{ + + [OutputType] + public sealed class GetAppSpecEgressResult + { + /// + /// The type of the environment variable, `GENERAL` or `SECRET`. + /// + public readonly string? Type; + + [OutputConstructor] + private GetAppSpecEgressResult(string? type) + { + Type = type; + } + } +} diff --git a/sdk/dotnet/Outputs/GetAppSpecResult.cs b/sdk/dotnet/Outputs/GetAppSpecResult.cs index c2b117e7..a1b658ee 100644 --- a/sdk/dotnet/Outputs/GetAppSpecResult.cs +++ b/sdk/dotnet/Outputs/GetAppSpecResult.cs @@ -20,6 +20,7 @@ public sealed class GetAppSpecResult public readonly ImmutableArray Databases; public readonly ImmutableArray Domain; public readonly ImmutableArray Domains; + public readonly ImmutableArray Egresses; /// /// Describes an environment variable made available to an app competent. /// @@ -53,6 +54,8 @@ private GetAppSpecResult( ImmutableArray domains, + ImmutableArray egresses, + ImmutableArray envs, ImmutableArray features, @@ -77,6 +80,7 @@ private GetAppSpecResult( Databases = databases; Domain = domain; Domains = domains; + Egresses = egresses; Envs = envs; Features = features; Functions = functions; diff --git a/sdk/dotnet/Outputs/GetLoadBalancerGlbSettingResult.cs b/sdk/dotnet/Outputs/GetLoadBalancerGlbSettingResult.cs index 71d1be51..5f282866 100644 --- a/sdk/dotnet/Outputs/GetLoadBalancerGlbSettingResult.cs +++ b/sdk/dotnet/Outputs/GetLoadBalancerGlbSettingResult.cs @@ -18,6 +18,14 @@ public sealed class GetLoadBalancerGlbSettingResult /// public readonly ImmutableArray Cdns; /// + /// fail-over threshold + /// + public readonly int FailoverThreshold; + /// + /// region priority map + /// + public readonly ImmutableDictionary RegionPriorities; + /// /// target port rules /// public readonly int TargetPort; @@ -30,11 +38,17 @@ public sealed class GetLoadBalancerGlbSettingResult private GetLoadBalancerGlbSettingResult( ImmutableArray cdns, + int failoverThreshold, + + ImmutableDictionary regionPriorities, + int targetPort, string targetProtocol) { Cdns = cdns; + FailoverThreshold = failoverThreshold; + RegionPriorities = regionPriorities; TargetPort = targetPort; TargetProtocol = targetProtocol; } diff --git a/sdk/dotnet/Outputs/LoadBalancerGlbSettings.cs b/sdk/dotnet/Outputs/LoadBalancerGlbSettings.cs index 94794d12..39ce53e5 100644 --- a/sdk/dotnet/Outputs/LoadBalancerGlbSettings.cs +++ b/sdk/dotnet/Outputs/LoadBalancerGlbSettings.cs @@ -18,6 +18,14 @@ public sealed class LoadBalancerGlbSettings /// public readonly Outputs.LoadBalancerGlbSettingsCdn? Cdn; /// + /// fail-over threshold + /// + public readonly int? FailoverThreshold; + /// + /// region priority map + /// + public readonly ImmutableDictionary? RegionPriorities; + /// /// An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. /// public readonly int TargetPort; @@ -30,11 +38,17 @@ public sealed class LoadBalancerGlbSettings private LoadBalancerGlbSettings( Outputs.LoadBalancerGlbSettingsCdn? cdn, + int? failoverThreshold, + + ImmutableDictionary? regionPriorities, + int targetPort, string targetProtocol) { Cdn = cdn; + FailoverThreshold = failoverThreshold; + RegionPriorities = regionPriorities; TargetPort = targetPort; TargetProtocol = targetProtocol; } diff --git a/sdk/dotnet/VpcPeering.cs b/sdk/dotnet/VpcPeering.cs new file mode 100644 index 00000000..81af372f --- /dev/null +++ b/sdk/dotnet/VpcPeering.cs @@ -0,0 +1,239 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DigitalOcean +{ + /// + /// Provides a DigitalOcean VPC Peering resource. + /// + /// VPC Peerings are used to connect two VPC networks allowing resources in each + /// VPC to communicate with each other privately. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = new DigitalOcean.VpcPeering("example", new() + /// { + /// Name = "example-peering", + /// VpcIds = new[] + /// { + /// vpc1.Id, + /// vpc2.Id, + /// }, + /// }); + /// + /// }); + /// ``` + /// + /// ### Resource Assignement + /// + /// You can use the VPC Peering resource to allow communication between resources + /// in different VPCs. For example: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vpc1 = new DigitalOcean.Vpc("vpc1", new() + /// { + /// Name = "vpc1", + /// Region = "nyc3", + /// }); + /// + /// var vpc2 = new DigitalOcean.Vpc("vpc2", new() + /// { + /// Name = "vpc2", + /// Region = "nyc3", + /// }); + /// + /// var example = new DigitalOcean.VpcPeering("example", new() + /// { + /// Name = "example-peering", + /// VpcIds = new[] + /// { + /// vpc1.Id, + /// vpc2.Id, + /// }, + /// }); + /// + /// var example1 = new DigitalOcean.Droplet("example1", new() + /// { + /// Name = "example1", + /// Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB, + /// Image = "ubuntu-18-04-x64", + /// Region = DigitalOcean.Region.NYC3, + /// VpcUuid = vpc1.Id, + /// }); + /// + /// var example2 = new DigitalOcean.Droplet("example2", new() + /// { + /// Name = "example2", + /// Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB, + /// Image = "ubuntu-18-04-x64", + /// Region = DigitalOcean.Region.NYC3, + /// VpcUuid = vpc2.Id, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// A VPC Peering can be imported using its `id`, e.g. + /// + /// ```sh + /// $ pulumi import digitalocean:index/vpcPeering:VpcPeering example 771ad360-c017-4b4e-a34e-73934f5f0190 + /// ``` + /// + [DigitalOceanResourceType("digitalocean:index/vpcPeering:VpcPeering")] + public partial class VpcPeering : global::Pulumi.CustomResource + { + /// + /// The date and time of when the VPC Peering was created. + /// + [Output("createdAt")] + public Output CreatedAt { get; private set; } = null!; + + /// + /// A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// The status of the VPC Peering. + /// + [Output("status")] + public Output Status { get; private set; } = null!; + + /// + /// A set of two VPC IDs to be peered. + /// + [Output("vpcIds")] + public Output> VpcIds { get; private set; } = null!; + + + /// + /// Create a VpcPeering resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public VpcPeering(string name, VpcPeeringArgs args, CustomResourceOptions? options = null) + : base("digitalocean:index/vpcPeering:VpcPeering", name, args ?? new VpcPeeringArgs(), MakeResourceOptions(options, "")) + { + } + + private VpcPeering(string name, Input id, VpcPeeringState? state = null, CustomResourceOptions? options = null) + : base("digitalocean:index/vpcPeering:VpcPeering", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing VpcPeering resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static VpcPeering Get(string name, Input id, VpcPeeringState? state = null, CustomResourceOptions? options = null) + { + return new VpcPeering(name, id, state, options); + } + } + + public sealed class VpcPeeringArgs : global::Pulumi.ResourceArgs + { + /// + /// A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + /// + [Input("name")] + public Input? Name { get; set; } + + [Input("vpcIds", required: true)] + private InputList? _vpcIds; + + /// + /// A set of two VPC IDs to be peered. + /// + public InputList VpcIds + { + get => _vpcIds ?? (_vpcIds = new InputList()); + set => _vpcIds = value; + } + + public VpcPeeringArgs() + { + } + public static new VpcPeeringArgs Empty => new VpcPeeringArgs(); + } + + public sealed class VpcPeeringState : global::Pulumi.ResourceArgs + { + /// + /// The date and time of when the VPC Peering was created. + /// + [Input("createdAt")] + public Input? CreatedAt { get; set; } + + /// + /// A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// The status of the VPC Peering. + /// + [Input("status")] + public Input? Status { get; set; } + + [Input("vpcIds")] + private InputList? _vpcIds; + + /// + /// A set of two VPC IDs to be peered. + /// + public InputList VpcIds + { + get => _vpcIds ?? (_vpcIds = new InputList()); + set => _vpcIds = value; + } + + public VpcPeeringState() + { + } + public static new VpcPeeringState Empty => new VpcPeeringState(); + } +} diff --git a/sdk/go/digitalocean/app.go b/sdk/go/digitalocean/app.go index dd2a688b..2c16f89e 100644 --- a/sdk/go/digitalocean/app.go +++ b/sdk/go/digitalocean/app.go @@ -114,6 +114,8 @@ type App struct { AppUrn pulumi.StringOutput `pulumi:"appUrn"` // The date and time of when the app was created. CreatedAt pulumi.StringOutput `pulumi:"createdAt"` + // The dedicated egress IP addresses associated with the app. + DedicatedIps AppDedicatedIpArrayOutput `pulumi:"dedicatedIps"` // The default URL to access the app. DefaultIngress pulumi.StringOutput `pulumi:"defaultIngress"` // The live URL of the app. @@ -166,6 +168,8 @@ type appState struct { AppUrn *string `pulumi:"appUrn"` // The date and time of when the app was created. CreatedAt *string `pulumi:"createdAt"` + // The dedicated egress IP addresses associated with the app. + DedicatedIps []AppDedicatedIp `pulumi:"dedicatedIps"` // The default URL to access the app. DefaultIngress *string `pulumi:"defaultIngress"` // The live URL of the app. @@ -189,6 +193,8 @@ type AppState struct { AppUrn pulumi.StringPtrInput // The date and time of when the app was created. CreatedAt pulumi.StringPtrInput + // The dedicated egress IP addresses associated with the app. + DedicatedIps AppDedicatedIpArrayInput // The default URL to access the app. DefaultIngress pulumi.StringPtrInput // The live URL of the app. @@ -210,6 +216,8 @@ func (AppState) ElementType() reflect.Type { } type appArgs struct { + // The dedicated egress IP addresses associated with the app. + DedicatedIps []AppDedicatedIp `pulumi:"dedicatedIps"` // The ID of the project that the app is assigned to. // // A spec can contain multiple components. @@ -222,6 +230,8 @@ type appArgs struct { // The set of arguments for constructing a App resource. type AppArgs struct { + // The dedicated egress IP addresses associated with the app. + DedicatedIps AppDedicatedIpArrayInput // The ID of the project that the app is assigned to. // // A spec can contain multiple components. @@ -334,6 +344,11 @@ func (o AppOutput) CreatedAt() pulumi.StringOutput { return o.ApplyT(func(v *App) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput) } +// The dedicated egress IP addresses associated with the app. +func (o AppOutput) DedicatedIps() AppDedicatedIpArrayOutput { + return o.ApplyT(func(v *App) AppDedicatedIpArrayOutput { return v.DedicatedIps }).(AppDedicatedIpArrayOutput) +} + // The default URL to access the app. func (o AppOutput) DefaultIngress() pulumi.StringOutput { return o.ApplyT(func(v *App) pulumi.StringOutput { return v.DefaultIngress }).(pulumi.StringOutput) diff --git a/sdk/go/digitalocean/getApp.go b/sdk/go/digitalocean/getApp.go index c0923a57..e7a96540 100644 --- a/sdk/go/digitalocean/getApp.go +++ b/sdk/go/digitalocean/getApp.go @@ -55,6 +55,8 @@ func LookupApp(ctx *pulumi.Context, args *LookupAppArgs, opts ...pulumi.InvokeOp type LookupAppArgs struct { // The ID of the app to retrieve information about. AppId string `pulumi:"appId"` + // A list of dedicated egress IP addresses associated with the app. + DedicatedIps []GetAppDedicatedIp `pulumi:"dedicatedIps"` } // A collection of values returned by getApp. @@ -64,6 +66,8 @@ type LookupAppResult struct { AppId string `pulumi:"appId"` // The date and time of when the app was created. CreatedAt string `pulumi:"createdAt"` + // A list of dedicated egress IP addresses associated with the app. + DedicatedIps []GetAppDedicatedIp `pulumi:"dedicatedIps"` // The default URL to access the app. DefaultIngress string `pulumi:"defaultIngress"` // The provider-assigned unique ID for this managed resource. @@ -97,6 +101,8 @@ func LookupAppOutput(ctx *pulumi.Context, args LookupAppOutputArgs, opts ...pulu type LookupAppOutputArgs struct { // The ID of the app to retrieve information about. AppId pulumi.StringInput `pulumi:"appId"` + // A list of dedicated egress IP addresses associated with the app. + DedicatedIps GetAppDedicatedIpArrayInput `pulumi:"dedicatedIps"` } func (LookupAppOutputArgs) ElementType() reflect.Type { @@ -132,6 +138,11 @@ func (o LookupAppResultOutput) CreatedAt() pulumi.StringOutput { return o.ApplyT(func(v LookupAppResult) string { return v.CreatedAt }).(pulumi.StringOutput) } +// A list of dedicated egress IP addresses associated with the app. +func (o LookupAppResultOutput) DedicatedIps() GetAppDedicatedIpArrayOutput { + return o.ApplyT(func(v LookupAppResult) []GetAppDedicatedIp { return v.DedicatedIps }).(GetAppDedicatedIpArrayOutput) +} + // The default URL to access the app. func (o LookupAppResultOutput) DefaultIngress() pulumi.StringOutput { return o.ApplyT(func(v LookupAppResult) string { return v.DefaultIngress }).(pulumi.StringOutput) diff --git a/sdk/go/digitalocean/getVpcPeering.go b/sdk/go/digitalocean/getVpcPeering.go new file mode 100644 index 00000000..9c21b309 --- /dev/null +++ b/sdk/go/digitalocean/getVpcPeering.go @@ -0,0 +1,242 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package digitalocean + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## Example Usage +// +// ### VPC Peering By Id +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := digitalocean.LookupVpcPeering(ctx, &digitalocean.LookupVpcPeeringArgs{ +// Id: pulumi.StringRef("example-id"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// Reuse the data about a VPC Peering in other resources: +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := digitalocean.LookupVpcPeering(ctx, &digitalocean.LookupVpcPeeringArgs{ +// Id: pulumi.StringRef("example-id"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = digitalocean.NewDroplet(ctx, "example", &digitalocean.DropletArgs{ +// Name: pulumi.String("example-01"), +// Size: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB), +// Image: pulumi.String("ubuntu-18-04-x64"), +// Region: pulumi.String(digitalocean.RegionNYC3), +// VpcUuid: pulumi.String(example.VpcIds[0]), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ### VPC Peering By Name +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := digitalocean.LookupVpcPeering(ctx, &digitalocean.LookupVpcPeeringArgs{ +// Name: pulumi.StringRef("example-peering"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// Reuse the data about a VPC Peering in other resources: +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// example, err := digitalocean.LookupVpcPeering(ctx, &digitalocean.LookupVpcPeeringArgs{ +// Name: pulumi.StringRef("example-peering"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = digitalocean.NewDroplet(ctx, "example", &digitalocean.DropletArgs{ +// Name: pulumi.String("example-01"), +// Size: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB), +// Image: pulumi.String("ubuntu-18-04-x64"), +// Region: pulumi.String(digitalocean.RegionNYC3), +// VpcUuid: pulumi.String(example.VpcIds[0]), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func LookupVpcPeering(ctx *pulumi.Context, args *LookupVpcPeeringArgs, opts ...pulumi.InvokeOption) (*LookupVpcPeeringResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupVpcPeeringResult + err := ctx.Invoke("digitalocean:index/getVpcPeering:getVpcPeering", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getVpcPeering. +type LookupVpcPeeringArgs struct { + // The unique identifier of an existing VPC Peering. + Id *string `pulumi:"id"` + // The name of an existing VPC Peering. + Name *string `pulumi:"name"` + // The list of VPC IDs involved in the peering. + VpcIds []string `pulumi:"vpcIds"` +} + +// A collection of values returned by getVpcPeering. +type LookupVpcPeeringResult struct { + // The date and time of when the VPC Peering was created. + CreatedAt string `pulumi:"createdAt"` + // The unique identifier for the VPC Peering. + Id string `pulumi:"id"` + // The name of the VPC Peering. + Name string `pulumi:"name"` + // The status of the VPC Peering. + Status string `pulumi:"status"` + // The list of VPC IDs involved in the peering. + VpcIds []string `pulumi:"vpcIds"` +} + +func LookupVpcPeeringOutput(ctx *pulumi.Context, args LookupVpcPeeringOutputArgs, opts ...pulumi.InvokeOption) LookupVpcPeeringResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (LookupVpcPeeringResult, error) { + args := v.(LookupVpcPeeringArgs) + r, err := LookupVpcPeering(ctx, &args, opts...) + var s LookupVpcPeeringResult + if r != nil { + s = *r + } + return s, err + }).(LookupVpcPeeringResultOutput) +} + +// A collection of arguments for invoking getVpcPeering. +type LookupVpcPeeringOutputArgs struct { + // The unique identifier of an existing VPC Peering. + Id pulumi.StringPtrInput `pulumi:"id"` + // The name of an existing VPC Peering. + Name pulumi.StringPtrInput `pulumi:"name"` + // The list of VPC IDs involved in the peering. + VpcIds pulumi.StringArrayInput `pulumi:"vpcIds"` +} + +func (LookupVpcPeeringOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupVpcPeeringArgs)(nil)).Elem() +} + +// A collection of values returned by getVpcPeering. +type LookupVpcPeeringResultOutput struct{ *pulumi.OutputState } + +func (LookupVpcPeeringResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupVpcPeeringResult)(nil)).Elem() +} + +func (o LookupVpcPeeringResultOutput) ToLookupVpcPeeringResultOutput() LookupVpcPeeringResultOutput { + return o +} + +func (o LookupVpcPeeringResultOutput) ToLookupVpcPeeringResultOutputWithContext(ctx context.Context) LookupVpcPeeringResultOutput { + return o +} + +// The date and time of when the VPC Peering was created. +func (o LookupVpcPeeringResultOutput) CreatedAt() pulumi.StringOutput { + return o.ApplyT(func(v LookupVpcPeeringResult) string { return v.CreatedAt }).(pulumi.StringOutput) +} + +// The unique identifier for the VPC Peering. +func (o LookupVpcPeeringResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupVpcPeeringResult) string { return v.Id }).(pulumi.StringOutput) +} + +// The name of the VPC Peering. +func (o LookupVpcPeeringResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupVpcPeeringResult) string { return v.Name }).(pulumi.StringOutput) +} + +// The status of the VPC Peering. +func (o LookupVpcPeeringResultOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v LookupVpcPeeringResult) string { return v.Status }).(pulumi.StringOutput) +} + +// The list of VPC IDs involved in the peering. +func (o LookupVpcPeeringResultOutput) VpcIds() pulumi.StringArrayOutput { + return o.ApplyT(func(v LookupVpcPeeringResult) []string { return v.VpcIds }).(pulumi.StringArrayOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupVpcPeeringResultOutput{}) +} diff --git a/sdk/go/digitalocean/init.go b/sdk/go/digitalocean/init.go index a648ea0d..208ca40a 100644 --- a/sdk/go/digitalocean/init.go +++ b/sdk/go/digitalocean/init.go @@ -107,6 +107,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &VolumeSnapshot{} case "digitalocean:index/vpc:Vpc": r = &Vpc{} + case "digitalocean:index/vpcPeering:VpcPeering": + r = &VpcPeering{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } @@ -353,6 +355,11 @@ func init() { "index/vpc", &module{version}, ) + pulumi.RegisterResourceModule( + "digitalocean", + "index/vpcPeering", + &module{version}, + ) pulumi.RegisterResourcePackage( "digitalocean", &pkg{version}, diff --git a/sdk/go/digitalocean/pulumiTypes.go b/sdk/go/digitalocean/pulumiTypes.go index c0eb2ffe..7aa64694 100644 --- a/sdk/go/digitalocean/pulumiTypes.go +++ b/sdk/go/digitalocean/pulumiTypes.go @@ -13,6 +13,121 @@ import ( var _ = internal.GetEnvOrDefault +type AppDedicatedIp struct { + // The ID of the app. + Id *string `pulumi:"id"` + // The IP address of the dedicated egress IP. + Ip *string `pulumi:"ip"` + // The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + Status *string `pulumi:"status"` +} + +// AppDedicatedIpInput is an input type that accepts AppDedicatedIpArgs and AppDedicatedIpOutput values. +// You can construct a concrete instance of `AppDedicatedIpInput` via: +// +// AppDedicatedIpArgs{...} +type AppDedicatedIpInput interface { + pulumi.Input + + ToAppDedicatedIpOutput() AppDedicatedIpOutput + ToAppDedicatedIpOutputWithContext(context.Context) AppDedicatedIpOutput +} + +type AppDedicatedIpArgs struct { + // The ID of the app. + Id pulumi.StringPtrInput `pulumi:"id"` + // The IP address of the dedicated egress IP. + Ip pulumi.StringPtrInput `pulumi:"ip"` + // The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + Status pulumi.StringPtrInput `pulumi:"status"` +} + +func (AppDedicatedIpArgs) ElementType() reflect.Type { + return reflect.TypeOf((*AppDedicatedIp)(nil)).Elem() +} + +func (i AppDedicatedIpArgs) ToAppDedicatedIpOutput() AppDedicatedIpOutput { + return i.ToAppDedicatedIpOutputWithContext(context.Background()) +} + +func (i AppDedicatedIpArgs) ToAppDedicatedIpOutputWithContext(ctx context.Context) AppDedicatedIpOutput { + return pulumi.ToOutputWithContext(ctx, i).(AppDedicatedIpOutput) +} + +// AppDedicatedIpArrayInput is an input type that accepts AppDedicatedIpArray and AppDedicatedIpArrayOutput values. +// You can construct a concrete instance of `AppDedicatedIpArrayInput` via: +// +// AppDedicatedIpArray{ AppDedicatedIpArgs{...} } +type AppDedicatedIpArrayInput interface { + pulumi.Input + + ToAppDedicatedIpArrayOutput() AppDedicatedIpArrayOutput + ToAppDedicatedIpArrayOutputWithContext(context.Context) AppDedicatedIpArrayOutput +} + +type AppDedicatedIpArray []AppDedicatedIpInput + +func (AppDedicatedIpArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]AppDedicatedIp)(nil)).Elem() +} + +func (i AppDedicatedIpArray) ToAppDedicatedIpArrayOutput() AppDedicatedIpArrayOutput { + return i.ToAppDedicatedIpArrayOutputWithContext(context.Background()) +} + +func (i AppDedicatedIpArray) ToAppDedicatedIpArrayOutputWithContext(ctx context.Context) AppDedicatedIpArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(AppDedicatedIpArrayOutput) +} + +type AppDedicatedIpOutput struct{ *pulumi.OutputState } + +func (AppDedicatedIpOutput) ElementType() reflect.Type { + return reflect.TypeOf((*AppDedicatedIp)(nil)).Elem() +} + +func (o AppDedicatedIpOutput) ToAppDedicatedIpOutput() AppDedicatedIpOutput { + return o +} + +func (o AppDedicatedIpOutput) ToAppDedicatedIpOutputWithContext(ctx context.Context) AppDedicatedIpOutput { + return o +} + +// The ID of the app. +func (o AppDedicatedIpOutput) Id() pulumi.StringPtrOutput { + return o.ApplyT(func(v AppDedicatedIp) *string { return v.Id }).(pulumi.StringPtrOutput) +} + +// The IP address of the dedicated egress IP. +func (o AppDedicatedIpOutput) Ip() pulumi.StringPtrOutput { + return o.ApplyT(func(v AppDedicatedIp) *string { return v.Ip }).(pulumi.StringPtrOutput) +} + +// The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' +func (o AppDedicatedIpOutput) Status() pulumi.StringPtrOutput { + return o.ApplyT(func(v AppDedicatedIp) *string { return v.Status }).(pulumi.StringPtrOutput) +} + +type AppDedicatedIpArrayOutput struct{ *pulumi.OutputState } + +func (AppDedicatedIpArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]AppDedicatedIp)(nil)).Elem() +} + +func (o AppDedicatedIpArrayOutput) ToAppDedicatedIpArrayOutput() AppDedicatedIpArrayOutput { + return o +} + +func (o AppDedicatedIpArrayOutput) ToAppDedicatedIpArrayOutputWithContext(ctx context.Context) AppDedicatedIpArrayOutput { + return o +} + +func (o AppDedicatedIpArrayOutput) Index(i pulumi.IntInput) AppDedicatedIpOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) AppDedicatedIp { + return vs[0].([]AppDedicatedIp)[vs[1].(int)] + }).(AppDedicatedIpOutput) +} + type AppSpec struct { // Describes an alert policy for the app. Alerts []AppSpecAlert `pulumi:"alerts"` @@ -21,6 +136,8 @@ type AppSpec struct { DomainNames []AppSpecDomainName `pulumi:"domainNames"` // Deprecated: This attribute has been replaced by `domain` which supports additional functionality. Domains []string `pulumi:"domains"` + // Specification for app egress configurations. + Egresses []AppSpecEgress `pulumi:"egresses"` // Describes an app-wide environment variable made available to all components. Envs []AppSpecEnv `pulumi:"envs"` // A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/) @@ -57,6 +174,8 @@ type AppSpecArgs struct { DomainNames AppSpecDomainNameArrayInput `pulumi:"domainNames"` // Deprecated: This attribute has been replaced by `domain` which supports additional functionality. Domains pulumi.StringArrayInput `pulumi:"domains"` + // Specification for app egress configurations. + Egresses AppSpecEgressArrayInput `pulumi:"egresses"` // Describes an app-wide environment variable made available to all components. Envs AppSpecEnvArrayInput `pulumi:"envs"` // A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/) @@ -170,6 +289,11 @@ func (o AppSpecOutput) Domains() pulumi.StringArrayOutput { return o.ApplyT(func(v AppSpec) []string { return v.Domains }).(pulumi.StringArrayOutput) } +// Specification for app egress configurations. +func (o AppSpecOutput) Egresses() AppSpecEgressArrayOutput { + return o.ApplyT(func(v AppSpec) []AppSpecEgress { return v.Egresses }).(AppSpecEgressArrayOutput) +} + // Describes an app-wide environment variable made available to all components. func (o AppSpecOutput) Envs() AppSpecEnvArrayOutput { return o.ApplyT(func(v AppSpec) []AppSpecEnv { return v.Envs }).(AppSpecEnvArrayOutput) @@ -278,6 +402,16 @@ func (o AppSpecPtrOutput) Domains() pulumi.StringArrayOutput { }).(pulumi.StringArrayOutput) } +// Specification for app egress configurations. +func (o AppSpecPtrOutput) Egresses() AppSpecEgressArrayOutput { + return o.ApplyT(func(v *AppSpec) []AppSpecEgress { + if v == nil { + return nil + } + return v.Egresses + }).(AppSpecEgressArrayOutput) +} + // Describes an app-wide environment variable made available to all components. func (o AppSpecPtrOutput) Envs() AppSpecEnvArrayOutput { return o.ApplyT(func(v *AppSpec) []AppSpecEnv { @@ -769,6 +903,103 @@ func (o AppSpecDomainNameArrayOutput) Index(i pulumi.IntInput) AppSpecDomainName }).(AppSpecDomainNameOutput) } +type AppSpecEgress struct { + // The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + Type *string `pulumi:"type"` +} + +// AppSpecEgressInput is an input type that accepts AppSpecEgressArgs and AppSpecEgressOutput values. +// You can construct a concrete instance of `AppSpecEgressInput` via: +// +// AppSpecEgressArgs{...} +type AppSpecEgressInput interface { + pulumi.Input + + ToAppSpecEgressOutput() AppSpecEgressOutput + ToAppSpecEgressOutputWithContext(context.Context) AppSpecEgressOutput +} + +type AppSpecEgressArgs struct { + // The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + Type pulumi.StringPtrInput `pulumi:"type"` +} + +func (AppSpecEgressArgs) ElementType() reflect.Type { + return reflect.TypeOf((*AppSpecEgress)(nil)).Elem() +} + +func (i AppSpecEgressArgs) ToAppSpecEgressOutput() AppSpecEgressOutput { + return i.ToAppSpecEgressOutputWithContext(context.Background()) +} + +func (i AppSpecEgressArgs) ToAppSpecEgressOutputWithContext(ctx context.Context) AppSpecEgressOutput { + return pulumi.ToOutputWithContext(ctx, i).(AppSpecEgressOutput) +} + +// AppSpecEgressArrayInput is an input type that accepts AppSpecEgressArray and AppSpecEgressArrayOutput values. +// You can construct a concrete instance of `AppSpecEgressArrayInput` via: +// +// AppSpecEgressArray{ AppSpecEgressArgs{...} } +type AppSpecEgressArrayInput interface { + pulumi.Input + + ToAppSpecEgressArrayOutput() AppSpecEgressArrayOutput + ToAppSpecEgressArrayOutputWithContext(context.Context) AppSpecEgressArrayOutput +} + +type AppSpecEgressArray []AppSpecEgressInput + +func (AppSpecEgressArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]AppSpecEgress)(nil)).Elem() +} + +func (i AppSpecEgressArray) ToAppSpecEgressArrayOutput() AppSpecEgressArrayOutput { + return i.ToAppSpecEgressArrayOutputWithContext(context.Background()) +} + +func (i AppSpecEgressArray) ToAppSpecEgressArrayOutputWithContext(ctx context.Context) AppSpecEgressArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(AppSpecEgressArrayOutput) +} + +type AppSpecEgressOutput struct{ *pulumi.OutputState } + +func (AppSpecEgressOutput) ElementType() reflect.Type { + return reflect.TypeOf((*AppSpecEgress)(nil)).Elem() +} + +func (o AppSpecEgressOutput) ToAppSpecEgressOutput() AppSpecEgressOutput { + return o +} + +func (o AppSpecEgressOutput) ToAppSpecEgressOutputWithContext(ctx context.Context) AppSpecEgressOutput { + return o +} + +// The app egress type: `AUTOASSIGN`, `DEDICATED_IP` +func (o AppSpecEgressOutput) Type() pulumi.StringPtrOutput { + return o.ApplyT(func(v AppSpecEgress) *string { return v.Type }).(pulumi.StringPtrOutput) +} + +type AppSpecEgressArrayOutput struct{ *pulumi.OutputState } + +func (AppSpecEgressArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]AppSpecEgress)(nil)).Elem() +} + +func (o AppSpecEgressArrayOutput) ToAppSpecEgressArrayOutput() AppSpecEgressArrayOutput { + return o +} + +func (o AppSpecEgressArrayOutput) ToAppSpecEgressArrayOutputWithContext(ctx context.Context) AppSpecEgressArrayOutput { + return o +} + +func (o AppSpecEgressArrayOutput) Index(i pulumi.IntInput) AppSpecEgressOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) AppSpecEgress { + return vs[0].([]AppSpecEgress)[vs[1].(int)] + }).(AppSpecEgressOutput) +} + type AppSpecEnv struct { // The name of the environment variable. Key *string `pulumi:"key"` @@ -15364,6 +15595,10 @@ func (o LoadBalancerForwardingRuleArrayOutput) Index(i pulumi.IntInput) LoadBala type LoadBalancerGlbSettings struct { // CDN configuration supporting the following: Cdn *LoadBalancerGlbSettingsCdn `pulumi:"cdn"` + // fail-over threshold + FailoverThreshold *int `pulumi:"failoverThreshold"` + // region priority map + RegionPriorities map[string]int `pulumi:"regionPriorities"` // An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. TargetPort int `pulumi:"targetPort"` // The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: `http` and `https`. @@ -15384,6 +15619,10 @@ type LoadBalancerGlbSettingsInput interface { type LoadBalancerGlbSettingsArgs struct { // CDN configuration supporting the following: Cdn LoadBalancerGlbSettingsCdnPtrInput `pulumi:"cdn"` + // fail-over threshold + FailoverThreshold pulumi.IntPtrInput `pulumi:"failoverThreshold"` + // region priority map + RegionPriorities pulumi.IntMapInput `pulumi:"regionPriorities"` // An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. TargetPort pulumi.IntInput `pulumi:"targetPort"` // The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: `http` and `https`. @@ -15472,6 +15711,16 @@ func (o LoadBalancerGlbSettingsOutput) Cdn() LoadBalancerGlbSettingsCdnPtrOutput return o.ApplyT(func(v LoadBalancerGlbSettings) *LoadBalancerGlbSettingsCdn { return v.Cdn }).(LoadBalancerGlbSettingsCdnPtrOutput) } +// fail-over threshold +func (o LoadBalancerGlbSettingsOutput) FailoverThreshold() pulumi.IntPtrOutput { + return o.ApplyT(func(v LoadBalancerGlbSettings) *int { return v.FailoverThreshold }).(pulumi.IntPtrOutput) +} + +// region priority map +func (o LoadBalancerGlbSettingsOutput) RegionPriorities() pulumi.IntMapOutput { + return o.ApplyT(func(v LoadBalancerGlbSettings) map[string]int { return v.RegionPriorities }).(pulumi.IntMapOutput) +} + // An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. func (o LoadBalancerGlbSettingsOutput) TargetPort() pulumi.IntOutput { return o.ApplyT(func(v LoadBalancerGlbSettings) int { return v.TargetPort }).(pulumi.IntOutput) @@ -15516,6 +15765,26 @@ func (o LoadBalancerGlbSettingsPtrOutput) Cdn() LoadBalancerGlbSettingsCdnPtrOut }).(LoadBalancerGlbSettingsCdnPtrOutput) } +// fail-over threshold +func (o LoadBalancerGlbSettingsPtrOutput) FailoverThreshold() pulumi.IntPtrOutput { + return o.ApplyT(func(v *LoadBalancerGlbSettings) *int { + if v == nil { + return nil + } + return v.FailoverThreshold + }).(pulumi.IntPtrOutput) +} + +// region priority map +func (o LoadBalancerGlbSettingsPtrOutput) RegionPriorities() pulumi.IntMapOutput { + return o.ApplyT(func(v *LoadBalancerGlbSettings) map[string]int { + if v == nil { + return nil + } + return v.RegionPriorities + }).(pulumi.IntMapOutput) +} + // An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. func (o LoadBalancerGlbSettingsPtrOutput) TargetPort() pulumi.IntPtrOutput { return o.ApplyT(func(v *LoadBalancerGlbSettings) *int { @@ -17446,13 +17715,129 @@ func (o UptimeAlertNotificationSlackArrayOutput) Index(i pulumi.IntInput) Uptime }).(UptimeAlertNotificationSlackOutput) } +type GetAppDedicatedIp struct { + // The ID of the dedicated egress IP. + Id string `pulumi:"id"` + // The IP address of the dedicated egress IP. + Ip string `pulumi:"ip"` + // The status of the dedicated egress IP. + Status string `pulumi:"status"` +} + +// GetAppDedicatedIpInput is an input type that accepts GetAppDedicatedIpArgs and GetAppDedicatedIpOutput values. +// You can construct a concrete instance of `GetAppDedicatedIpInput` via: +// +// GetAppDedicatedIpArgs{...} +type GetAppDedicatedIpInput interface { + pulumi.Input + + ToGetAppDedicatedIpOutput() GetAppDedicatedIpOutput + ToGetAppDedicatedIpOutputWithContext(context.Context) GetAppDedicatedIpOutput +} + +type GetAppDedicatedIpArgs struct { + // The ID of the dedicated egress IP. + Id pulumi.StringInput `pulumi:"id"` + // The IP address of the dedicated egress IP. + Ip pulumi.StringInput `pulumi:"ip"` + // The status of the dedicated egress IP. + Status pulumi.StringInput `pulumi:"status"` +} + +func (GetAppDedicatedIpArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetAppDedicatedIp)(nil)).Elem() +} + +func (i GetAppDedicatedIpArgs) ToGetAppDedicatedIpOutput() GetAppDedicatedIpOutput { + return i.ToGetAppDedicatedIpOutputWithContext(context.Background()) +} + +func (i GetAppDedicatedIpArgs) ToGetAppDedicatedIpOutputWithContext(ctx context.Context) GetAppDedicatedIpOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetAppDedicatedIpOutput) +} + +// GetAppDedicatedIpArrayInput is an input type that accepts GetAppDedicatedIpArray and GetAppDedicatedIpArrayOutput values. +// You can construct a concrete instance of `GetAppDedicatedIpArrayInput` via: +// +// GetAppDedicatedIpArray{ GetAppDedicatedIpArgs{...} } +type GetAppDedicatedIpArrayInput interface { + pulumi.Input + + ToGetAppDedicatedIpArrayOutput() GetAppDedicatedIpArrayOutput + ToGetAppDedicatedIpArrayOutputWithContext(context.Context) GetAppDedicatedIpArrayOutput +} + +type GetAppDedicatedIpArray []GetAppDedicatedIpInput + +func (GetAppDedicatedIpArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetAppDedicatedIp)(nil)).Elem() +} + +func (i GetAppDedicatedIpArray) ToGetAppDedicatedIpArrayOutput() GetAppDedicatedIpArrayOutput { + return i.ToGetAppDedicatedIpArrayOutputWithContext(context.Background()) +} + +func (i GetAppDedicatedIpArray) ToGetAppDedicatedIpArrayOutputWithContext(ctx context.Context) GetAppDedicatedIpArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetAppDedicatedIpArrayOutput) +} + +type GetAppDedicatedIpOutput struct{ *pulumi.OutputState } + +func (GetAppDedicatedIpOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetAppDedicatedIp)(nil)).Elem() +} + +func (o GetAppDedicatedIpOutput) ToGetAppDedicatedIpOutput() GetAppDedicatedIpOutput { + return o +} + +func (o GetAppDedicatedIpOutput) ToGetAppDedicatedIpOutputWithContext(ctx context.Context) GetAppDedicatedIpOutput { + return o +} + +// The ID of the dedicated egress IP. +func (o GetAppDedicatedIpOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetAppDedicatedIp) string { return v.Id }).(pulumi.StringOutput) +} + +// The IP address of the dedicated egress IP. +func (o GetAppDedicatedIpOutput) Ip() pulumi.StringOutput { + return o.ApplyT(func(v GetAppDedicatedIp) string { return v.Ip }).(pulumi.StringOutput) +} + +// The status of the dedicated egress IP. +func (o GetAppDedicatedIpOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v GetAppDedicatedIp) string { return v.Status }).(pulumi.StringOutput) +} + +type GetAppDedicatedIpArrayOutput struct{ *pulumi.OutputState } + +func (GetAppDedicatedIpArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetAppDedicatedIp)(nil)).Elem() +} + +func (o GetAppDedicatedIpArrayOutput) ToGetAppDedicatedIpArrayOutput() GetAppDedicatedIpArrayOutput { + return o +} + +func (o GetAppDedicatedIpArrayOutput) ToGetAppDedicatedIpArrayOutputWithContext(ctx context.Context) GetAppDedicatedIpArrayOutput { + return o +} + +func (o GetAppDedicatedIpArrayOutput) Index(i pulumi.IntInput) GetAppDedicatedIpOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetAppDedicatedIp { + return vs[0].([]GetAppDedicatedIp)[vs[1].(int)] + }).(GetAppDedicatedIpOutput) +} + type GetAppSpec struct { // Describes an alert policy for the component. Alerts []GetAppSpecAlert `pulumi:"alerts"` Databases []GetAppSpecDatabase `pulumi:"databases"` Domain []GetAppSpecDomain `pulumi:"domain"` // Deprecated: This attribute has been replaced by `domain` which supports additional functionality. - Domains []string `pulumi:"domains"` + Domains []string `pulumi:"domains"` + Egresses []GetAppSpecEgress `pulumi:"egresses"` // Describes an environment variable made available to an app competent. Envs []GetAppSpecEnv `pulumi:"envs"` // List of features which is applied to the app @@ -17486,7 +17871,8 @@ type GetAppSpecArgs struct { Databases GetAppSpecDatabaseArrayInput `pulumi:"databases"` Domain GetAppSpecDomainArrayInput `pulumi:"domain"` // Deprecated: This attribute has been replaced by `domain` which supports additional functionality. - Domains pulumi.StringArrayInput `pulumi:"domains"` + Domains pulumi.StringArrayInput `pulumi:"domains"` + Egresses GetAppSpecEgressArrayInput `pulumi:"egresses"` // Describes an environment variable made available to an app competent. Envs GetAppSpecEnvArrayInput `pulumi:"envs"` // List of features which is applied to the app @@ -17572,6 +17958,10 @@ func (o GetAppSpecOutput) Domains() pulumi.StringArrayOutput { return o.ApplyT(func(v GetAppSpec) []string { return v.Domains }).(pulumi.StringArrayOutput) } +func (o GetAppSpecOutput) Egresses() GetAppSpecEgressArrayOutput { + return o.ApplyT(func(v GetAppSpec) []GetAppSpecEgress { return v.Egresses }).(GetAppSpecEgressArrayOutput) +} + // Describes an environment variable made available to an app competent. func (o GetAppSpecOutput) Envs() GetAppSpecEnvArrayOutput { return o.ApplyT(func(v GetAppSpec) []GetAppSpecEnv { return v.Envs }).(GetAppSpecEnvArrayOutput) @@ -18017,6 +18407,103 @@ func (o GetAppSpecDomainArrayOutput) Index(i pulumi.IntInput) GetAppSpecDomainOu }).(GetAppSpecDomainOutput) } +type GetAppSpecEgress struct { + // The type of the environment variable, `GENERAL` or `SECRET`. + Type *string `pulumi:"type"` +} + +// GetAppSpecEgressInput is an input type that accepts GetAppSpecEgressArgs and GetAppSpecEgressOutput values. +// You can construct a concrete instance of `GetAppSpecEgressInput` via: +// +// GetAppSpecEgressArgs{...} +type GetAppSpecEgressInput interface { + pulumi.Input + + ToGetAppSpecEgressOutput() GetAppSpecEgressOutput + ToGetAppSpecEgressOutputWithContext(context.Context) GetAppSpecEgressOutput +} + +type GetAppSpecEgressArgs struct { + // The type of the environment variable, `GENERAL` or `SECRET`. + Type pulumi.StringPtrInput `pulumi:"type"` +} + +func (GetAppSpecEgressArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetAppSpecEgress)(nil)).Elem() +} + +func (i GetAppSpecEgressArgs) ToGetAppSpecEgressOutput() GetAppSpecEgressOutput { + return i.ToGetAppSpecEgressOutputWithContext(context.Background()) +} + +func (i GetAppSpecEgressArgs) ToGetAppSpecEgressOutputWithContext(ctx context.Context) GetAppSpecEgressOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetAppSpecEgressOutput) +} + +// GetAppSpecEgressArrayInput is an input type that accepts GetAppSpecEgressArray and GetAppSpecEgressArrayOutput values. +// You can construct a concrete instance of `GetAppSpecEgressArrayInput` via: +// +// GetAppSpecEgressArray{ GetAppSpecEgressArgs{...} } +type GetAppSpecEgressArrayInput interface { + pulumi.Input + + ToGetAppSpecEgressArrayOutput() GetAppSpecEgressArrayOutput + ToGetAppSpecEgressArrayOutputWithContext(context.Context) GetAppSpecEgressArrayOutput +} + +type GetAppSpecEgressArray []GetAppSpecEgressInput + +func (GetAppSpecEgressArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetAppSpecEgress)(nil)).Elem() +} + +func (i GetAppSpecEgressArray) ToGetAppSpecEgressArrayOutput() GetAppSpecEgressArrayOutput { + return i.ToGetAppSpecEgressArrayOutputWithContext(context.Background()) +} + +func (i GetAppSpecEgressArray) ToGetAppSpecEgressArrayOutputWithContext(ctx context.Context) GetAppSpecEgressArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetAppSpecEgressArrayOutput) +} + +type GetAppSpecEgressOutput struct{ *pulumi.OutputState } + +func (GetAppSpecEgressOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetAppSpecEgress)(nil)).Elem() +} + +func (o GetAppSpecEgressOutput) ToGetAppSpecEgressOutput() GetAppSpecEgressOutput { + return o +} + +func (o GetAppSpecEgressOutput) ToGetAppSpecEgressOutputWithContext(ctx context.Context) GetAppSpecEgressOutput { + return o +} + +// The type of the environment variable, `GENERAL` or `SECRET`. +func (o GetAppSpecEgressOutput) Type() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetAppSpecEgress) *string { return v.Type }).(pulumi.StringPtrOutput) +} + +type GetAppSpecEgressArrayOutput struct{ *pulumi.OutputState } + +func (GetAppSpecEgressArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetAppSpecEgress)(nil)).Elem() +} + +func (o GetAppSpecEgressArrayOutput) ToGetAppSpecEgressArrayOutput() GetAppSpecEgressArrayOutput { + return o +} + +func (o GetAppSpecEgressArrayOutput) ToGetAppSpecEgressArrayOutputWithContext(ctx context.Context) GetAppSpecEgressArrayOutput { + return o +} + +func (o GetAppSpecEgressArrayOutput) Index(i pulumi.IntInput) GetAppSpecEgressOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetAppSpecEgress { + return vs[0].([]GetAppSpecEgress)[vs[1].(int)] + }).(GetAppSpecEgressOutput) +} + type GetAppSpecEnv struct { // The name of the environment variable. Key *string `pulumi:"key"` @@ -32088,6 +32575,10 @@ func (o GetLoadBalancerForwardingRuleArrayOutput) Index(i pulumi.IntInput) GetLo type GetLoadBalancerGlbSetting struct { // CDN specific configurations Cdns []GetLoadBalancerGlbSettingCdn `pulumi:"cdns"` + // fail-over threshold + FailoverThreshold int `pulumi:"failoverThreshold"` + // region priority map + RegionPriorities map[string]int `pulumi:"regionPriorities"` // target port rules TargetPort int `pulumi:"targetPort"` // target protocol rules @@ -32108,6 +32599,10 @@ type GetLoadBalancerGlbSettingInput interface { type GetLoadBalancerGlbSettingArgs struct { // CDN specific configurations Cdns GetLoadBalancerGlbSettingCdnArrayInput `pulumi:"cdns"` + // fail-over threshold + FailoverThreshold pulumi.IntInput `pulumi:"failoverThreshold"` + // region priority map + RegionPriorities pulumi.IntMapInput `pulumi:"regionPriorities"` // target port rules TargetPort pulumi.IntInput `pulumi:"targetPort"` // target protocol rules @@ -32170,6 +32665,16 @@ func (o GetLoadBalancerGlbSettingOutput) Cdns() GetLoadBalancerGlbSettingCdnArra return o.ApplyT(func(v GetLoadBalancerGlbSetting) []GetLoadBalancerGlbSettingCdn { return v.Cdns }).(GetLoadBalancerGlbSettingCdnArrayOutput) } +// fail-over threshold +func (o GetLoadBalancerGlbSettingOutput) FailoverThreshold() pulumi.IntOutput { + return o.ApplyT(func(v GetLoadBalancerGlbSetting) int { return v.FailoverThreshold }).(pulumi.IntOutput) +} + +// region priority map +func (o GetLoadBalancerGlbSettingOutput) RegionPriorities() pulumi.IntMapOutput { + return o.ApplyT(func(v GetLoadBalancerGlbSetting) map[string]int { return v.RegionPriorities }).(pulumi.IntMapOutput) +} + // target port rules func (o GetLoadBalancerGlbSettingOutput) TargetPort() pulumi.IntOutput { return o.ApplyT(func(v GetLoadBalancerGlbSetting) int { return v.TargetPort }).(pulumi.IntOutput) @@ -35366,6 +35871,8 @@ func (o GetTagsTagArrayOutput) Index(i pulumi.IntInput) GetTagsTagOutput { } func init() { + pulumi.RegisterInputType(reflect.TypeOf((*AppDedicatedIpInput)(nil)).Elem(), AppDedicatedIpArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*AppDedicatedIpArrayInput)(nil)).Elem(), AppDedicatedIpArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecInput)(nil)).Elem(), AppSpecArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecPtrInput)(nil)).Elem(), AppSpecArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecAlertInput)(nil)).Elem(), AppSpecAlertArgs{}) @@ -35374,6 +35881,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*AppSpecDatabaseArrayInput)(nil)).Elem(), AppSpecDatabaseArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecDomainNameInput)(nil)).Elem(), AppSpecDomainNameArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecDomainNameArrayInput)(nil)).Elem(), AppSpecDomainNameArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*AppSpecEgressInput)(nil)).Elem(), AppSpecEgressArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*AppSpecEgressArrayInput)(nil)).Elem(), AppSpecEgressArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecEnvInput)(nil)).Elem(), AppSpecEnvArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecEnvArrayInput)(nil)).Elem(), AppSpecEnvArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AppSpecFunctionInput)(nil)).Elem(), AppSpecFunctionArgs{}) @@ -35584,6 +36093,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*UptimeAlertNotificationArrayInput)(nil)).Elem(), UptimeAlertNotificationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*UptimeAlertNotificationSlackInput)(nil)).Elem(), UptimeAlertNotificationSlackArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*UptimeAlertNotificationSlackArrayInput)(nil)).Elem(), UptimeAlertNotificationSlackArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetAppDedicatedIpInput)(nil)).Elem(), GetAppDedicatedIpArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetAppDedicatedIpArrayInput)(nil)).Elem(), GetAppDedicatedIpArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecInput)(nil)).Elem(), GetAppSpecArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecArrayInput)(nil)).Elem(), GetAppSpecArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecAlertInput)(nil)).Elem(), GetAppSpecAlertArgs{}) @@ -35592,6 +36103,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecDatabaseArrayInput)(nil)).Elem(), GetAppSpecDatabaseArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecDomainInput)(nil)).Elem(), GetAppSpecDomainArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecDomainArrayInput)(nil)).Elem(), GetAppSpecDomainArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecEgressInput)(nil)).Elem(), GetAppSpecEgressArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecEgressArrayInput)(nil)).Elem(), GetAppSpecEgressArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecEnvInput)(nil)).Elem(), GetAppSpecEnvArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecEnvArrayInput)(nil)).Elem(), GetAppSpecEnvArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetAppSpecFunctionInput)(nil)).Elem(), GetAppSpecFunctionArgs{}) @@ -35823,6 +36336,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetTagsSortArrayInput)(nil)).Elem(), GetTagsSortArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetTagsTagInput)(nil)).Elem(), GetTagsTagArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetTagsTagArrayInput)(nil)).Elem(), GetTagsTagArray{}) + pulumi.RegisterOutputType(AppDedicatedIpOutput{}) + pulumi.RegisterOutputType(AppDedicatedIpArrayOutput{}) pulumi.RegisterOutputType(AppSpecOutput{}) pulumi.RegisterOutputType(AppSpecPtrOutput{}) pulumi.RegisterOutputType(AppSpecAlertOutput{}) @@ -35831,6 +36346,8 @@ func init() { pulumi.RegisterOutputType(AppSpecDatabaseArrayOutput{}) pulumi.RegisterOutputType(AppSpecDomainNameOutput{}) pulumi.RegisterOutputType(AppSpecDomainNameArrayOutput{}) + pulumi.RegisterOutputType(AppSpecEgressOutput{}) + pulumi.RegisterOutputType(AppSpecEgressArrayOutput{}) pulumi.RegisterOutputType(AppSpecEnvOutput{}) pulumi.RegisterOutputType(AppSpecEnvArrayOutput{}) pulumi.RegisterOutputType(AppSpecFunctionOutput{}) @@ -36041,6 +36558,8 @@ func init() { pulumi.RegisterOutputType(UptimeAlertNotificationArrayOutput{}) pulumi.RegisterOutputType(UptimeAlertNotificationSlackOutput{}) pulumi.RegisterOutputType(UptimeAlertNotificationSlackArrayOutput{}) + pulumi.RegisterOutputType(GetAppDedicatedIpOutput{}) + pulumi.RegisterOutputType(GetAppDedicatedIpArrayOutput{}) pulumi.RegisterOutputType(GetAppSpecOutput{}) pulumi.RegisterOutputType(GetAppSpecArrayOutput{}) pulumi.RegisterOutputType(GetAppSpecAlertOutput{}) @@ -36049,6 +36568,8 @@ func init() { pulumi.RegisterOutputType(GetAppSpecDatabaseArrayOutput{}) pulumi.RegisterOutputType(GetAppSpecDomainOutput{}) pulumi.RegisterOutputType(GetAppSpecDomainArrayOutput{}) + pulumi.RegisterOutputType(GetAppSpecEgressOutput{}) + pulumi.RegisterOutputType(GetAppSpecEgressArrayOutput{}) pulumi.RegisterOutputType(GetAppSpecEnvOutput{}) pulumi.RegisterOutputType(GetAppSpecEnvArrayOutput{}) pulumi.RegisterOutputType(GetAppSpecFunctionOutput{}) diff --git a/sdk/go/digitalocean/vpcPeering.go b/sdk/go/digitalocean/vpcPeering.go new file mode 100644 index 00000000..ad2c436b --- /dev/null +++ b/sdk/go/digitalocean/vpcPeering.go @@ -0,0 +1,364 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package digitalocean + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Provides a DigitalOcean VPC Peering resource. +// +// VPC Peerings are used to connect two VPC networks allowing resources in each +// VPC to communicate with each other privately. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := digitalocean.NewVpcPeering(ctx, "example", &digitalocean.VpcPeeringArgs{ +// Name: pulumi.String("example-peering"), +// VpcIds: pulumi.StringArray{ +// vpc1.Id, +// vpc2.Id, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ### Resource Assignement +// +// You can use the VPC Peering resource to allow communication between resources +// in different VPCs. For example: +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// vpc1, err := digitalocean.NewVpc(ctx, "vpc1", &digitalocean.VpcArgs{ +// Name: pulumi.String("vpc1"), +// Region: pulumi.String("nyc3"), +// }) +// if err != nil { +// return err +// } +// vpc2, err := digitalocean.NewVpc(ctx, "vpc2", &digitalocean.VpcArgs{ +// Name: pulumi.String("vpc2"), +// Region: pulumi.String("nyc3"), +// }) +// if err != nil { +// return err +// } +// _, err = digitalocean.NewVpcPeering(ctx, "example", &digitalocean.VpcPeeringArgs{ +// Name: pulumi.String("example-peering"), +// VpcIds: pulumi.StringArray{ +// vpc1.ID(), +// vpc2.ID(), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = digitalocean.NewDroplet(ctx, "example1", &digitalocean.DropletArgs{ +// Name: pulumi.String("example1"), +// Size: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB), +// Image: pulumi.String("ubuntu-18-04-x64"), +// Region: pulumi.String(digitalocean.RegionNYC3), +// VpcUuid: vpc1.ID(), +// }) +// if err != nil { +// return err +// } +// _, err = digitalocean.NewDroplet(ctx, "example2", &digitalocean.DropletArgs{ +// Name: pulumi.String("example2"), +// Size: pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB), +// Image: pulumi.String("ubuntu-18-04-x64"), +// Region: pulumi.String(digitalocean.RegionNYC3), +// VpcUuid: vpc2.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// A VPC Peering can be imported using its `id`, e.g. +// +// ```sh +// $ pulumi import digitalocean:index/vpcPeering:VpcPeering example 771ad360-c017-4b4e-a34e-73934f5f0190 +// ``` +type VpcPeering struct { + pulumi.CustomResourceState + + // The date and time of when the VPC Peering was created. + CreatedAt pulumi.StringOutput `pulumi:"createdAt"` + // A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + Name pulumi.StringOutput `pulumi:"name"` + // The status of the VPC Peering. + Status pulumi.StringOutput `pulumi:"status"` + // A set of two VPC IDs to be peered. + VpcIds pulumi.StringArrayOutput `pulumi:"vpcIds"` +} + +// NewVpcPeering registers a new resource with the given unique name, arguments, and options. +func NewVpcPeering(ctx *pulumi.Context, + name string, args *VpcPeeringArgs, opts ...pulumi.ResourceOption) (*VpcPeering, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.VpcIds == nil { + return nil, errors.New("invalid value for required argument 'VpcIds'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource VpcPeering + err := ctx.RegisterResource("digitalocean:index/vpcPeering:VpcPeering", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetVpcPeering gets an existing VpcPeering resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetVpcPeering(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *VpcPeeringState, opts ...pulumi.ResourceOption) (*VpcPeering, error) { + var resource VpcPeering + err := ctx.ReadResource("digitalocean:index/vpcPeering:VpcPeering", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering VpcPeering resources. +type vpcPeeringState struct { + // The date and time of when the VPC Peering was created. + CreatedAt *string `pulumi:"createdAt"` + // A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + Name *string `pulumi:"name"` + // The status of the VPC Peering. + Status *string `pulumi:"status"` + // A set of two VPC IDs to be peered. + VpcIds []string `pulumi:"vpcIds"` +} + +type VpcPeeringState struct { + // The date and time of when the VPC Peering was created. + CreatedAt pulumi.StringPtrInput + // A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + Name pulumi.StringPtrInput + // The status of the VPC Peering. + Status pulumi.StringPtrInput + // A set of two VPC IDs to be peered. + VpcIds pulumi.StringArrayInput +} + +func (VpcPeeringState) ElementType() reflect.Type { + return reflect.TypeOf((*vpcPeeringState)(nil)).Elem() +} + +type vpcPeeringArgs struct { + // A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + Name *string `pulumi:"name"` + // A set of two VPC IDs to be peered. + VpcIds []string `pulumi:"vpcIds"` +} + +// The set of arguments for constructing a VpcPeering resource. +type VpcPeeringArgs struct { + // A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + Name pulumi.StringPtrInput + // A set of two VPC IDs to be peered. + VpcIds pulumi.StringArrayInput +} + +func (VpcPeeringArgs) ElementType() reflect.Type { + return reflect.TypeOf((*vpcPeeringArgs)(nil)).Elem() +} + +type VpcPeeringInput interface { + pulumi.Input + + ToVpcPeeringOutput() VpcPeeringOutput + ToVpcPeeringOutputWithContext(ctx context.Context) VpcPeeringOutput +} + +func (*VpcPeering) ElementType() reflect.Type { + return reflect.TypeOf((**VpcPeering)(nil)).Elem() +} + +func (i *VpcPeering) ToVpcPeeringOutput() VpcPeeringOutput { + return i.ToVpcPeeringOutputWithContext(context.Background()) +} + +func (i *VpcPeering) ToVpcPeeringOutputWithContext(ctx context.Context) VpcPeeringOutput { + return pulumi.ToOutputWithContext(ctx, i).(VpcPeeringOutput) +} + +// VpcPeeringArrayInput is an input type that accepts VpcPeeringArray and VpcPeeringArrayOutput values. +// You can construct a concrete instance of `VpcPeeringArrayInput` via: +// +// VpcPeeringArray{ VpcPeeringArgs{...} } +type VpcPeeringArrayInput interface { + pulumi.Input + + ToVpcPeeringArrayOutput() VpcPeeringArrayOutput + ToVpcPeeringArrayOutputWithContext(context.Context) VpcPeeringArrayOutput +} + +type VpcPeeringArray []VpcPeeringInput + +func (VpcPeeringArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*VpcPeering)(nil)).Elem() +} + +func (i VpcPeeringArray) ToVpcPeeringArrayOutput() VpcPeeringArrayOutput { + return i.ToVpcPeeringArrayOutputWithContext(context.Background()) +} + +func (i VpcPeeringArray) ToVpcPeeringArrayOutputWithContext(ctx context.Context) VpcPeeringArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(VpcPeeringArrayOutput) +} + +// VpcPeeringMapInput is an input type that accepts VpcPeeringMap and VpcPeeringMapOutput values. +// You can construct a concrete instance of `VpcPeeringMapInput` via: +// +// VpcPeeringMap{ "key": VpcPeeringArgs{...} } +type VpcPeeringMapInput interface { + pulumi.Input + + ToVpcPeeringMapOutput() VpcPeeringMapOutput + ToVpcPeeringMapOutputWithContext(context.Context) VpcPeeringMapOutput +} + +type VpcPeeringMap map[string]VpcPeeringInput + +func (VpcPeeringMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*VpcPeering)(nil)).Elem() +} + +func (i VpcPeeringMap) ToVpcPeeringMapOutput() VpcPeeringMapOutput { + return i.ToVpcPeeringMapOutputWithContext(context.Background()) +} + +func (i VpcPeeringMap) ToVpcPeeringMapOutputWithContext(ctx context.Context) VpcPeeringMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(VpcPeeringMapOutput) +} + +type VpcPeeringOutput struct{ *pulumi.OutputState } + +func (VpcPeeringOutput) ElementType() reflect.Type { + return reflect.TypeOf((**VpcPeering)(nil)).Elem() +} + +func (o VpcPeeringOutput) ToVpcPeeringOutput() VpcPeeringOutput { + return o +} + +func (o VpcPeeringOutput) ToVpcPeeringOutputWithContext(ctx context.Context) VpcPeeringOutput { + return o +} + +// The date and time of when the VPC Peering was created. +func (o VpcPeeringOutput) CreatedAt() pulumi.StringOutput { + return o.ApplyT(func(v *VpcPeering) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput) +} + +// A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. +func (o VpcPeeringOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v *VpcPeering) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) +} + +// The status of the VPC Peering. +func (o VpcPeeringOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v *VpcPeering) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) +} + +// A set of two VPC IDs to be peered. +func (o VpcPeeringOutput) VpcIds() pulumi.StringArrayOutput { + return o.ApplyT(func(v *VpcPeering) pulumi.StringArrayOutput { return v.VpcIds }).(pulumi.StringArrayOutput) +} + +type VpcPeeringArrayOutput struct{ *pulumi.OutputState } + +func (VpcPeeringArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*VpcPeering)(nil)).Elem() +} + +func (o VpcPeeringArrayOutput) ToVpcPeeringArrayOutput() VpcPeeringArrayOutput { + return o +} + +func (o VpcPeeringArrayOutput) ToVpcPeeringArrayOutputWithContext(ctx context.Context) VpcPeeringArrayOutput { + return o +} + +func (o VpcPeeringArrayOutput) Index(i pulumi.IntInput) VpcPeeringOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpcPeering { + return vs[0].([]*VpcPeering)[vs[1].(int)] + }).(VpcPeeringOutput) +} + +type VpcPeeringMapOutput struct{ *pulumi.OutputState } + +func (VpcPeeringMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*VpcPeering)(nil)).Elem() +} + +func (o VpcPeeringMapOutput) ToVpcPeeringMapOutput() VpcPeeringMapOutput { + return o +} + +func (o VpcPeeringMapOutput) ToVpcPeeringMapOutputWithContext(ctx context.Context) VpcPeeringMapOutput { + return o +} + +func (o VpcPeeringMapOutput) MapIndex(k pulumi.StringInput) VpcPeeringOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpcPeering { + return vs[0].(map[string]*VpcPeering)[vs[1].(string)] + }).(VpcPeeringOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*VpcPeeringInput)(nil)).Elem(), &VpcPeering{}) + pulumi.RegisterInputType(reflect.TypeOf((*VpcPeeringArrayInput)(nil)).Elem(), VpcPeeringArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*VpcPeeringMapInput)(nil)).Elem(), VpcPeeringMap{}) + pulumi.RegisterOutputType(VpcPeeringOutput{}) + pulumi.RegisterOutputType(VpcPeeringArrayOutput{}) + pulumi.RegisterOutputType(VpcPeeringMapOutput{}) +} diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index f65aa3a6..4daa026b 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.11.0") + implementation("com.pulumi:pulumi:0.12.0") } task sourcesJar(type: Jar) { diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/App.java b/sdk/java/src/main/java/com/pulumi/digitalocean/App.java index 6c25a9dd..f982c5a1 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/App.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/App.java @@ -10,8 +10,10 @@ import com.pulumi.digitalocean.AppArgs; import com.pulumi.digitalocean.Utilities; import com.pulumi.digitalocean.inputs.AppState; +import com.pulumi.digitalocean.outputs.AppDedicatedIp; import com.pulumi.digitalocean.outputs.AppSpec; import java.lang.String; +import java.util.List; import java.util.Optional; import javax.annotation.Nullable; @@ -279,6 +281,20 @@ public Output appUrn() { public Output createdAt() { return this.createdAt; } + /** + * The dedicated egress IP addresses associated with the app. + * + */ + @Export(name="dedicatedIps", refs={List.class,AppDedicatedIp.class}, tree="[0,1]") + private Output> dedicatedIps; + + /** + * @return The dedicated egress IP addresses associated with the app. + * + */ + public Output> dedicatedIps() { + return this.dedicatedIps; + } /** * The default URL to access the app. * diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/AppArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/AppArgs.java index 4ee3bc3a..9444dd51 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/AppArgs.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/AppArgs.java @@ -5,8 +5,10 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.digitalocean.inputs.AppDedicatedIpArgs; import com.pulumi.digitalocean.inputs.AppSpecArgs; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -16,6 +18,21 @@ public final class AppArgs extends com.pulumi.resources.ResourceArgs { public static final AppArgs Empty = new AppArgs(); + /** + * The dedicated egress IP addresses associated with the app. + * + */ + @Import(name="dedicatedIps") + private @Nullable Output> dedicatedIps; + + /** + * @return The dedicated egress IP addresses associated with the app. + * + */ + public Optional>> dedicatedIps() { + return Optional.ofNullable(this.dedicatedIps); + } + /** * The ID of the project that the app is assigned to. * @@ -57,6 +74,7 @@ public Optional> spec() { private AppArgs() {} private AppArgs(AppArgs $) { + this.dedicatedIps = $.dedicatedIps; this.projectId = $.projectId; this.spec = $.spec; } @@ -79,6 +97,37 @@ public Builder(AppArgs defaults) { $ = new AppArgs(Objects.requireNonNull(defaults)); } + /** + * @param dedicatedIps The dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(@Nullable Output> dedicatedIps) { + $.dedicatedIps = dedicatedIps; + return this; + } + + /** + * @param dedicatedIps The dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(List dedicatedIps) { + return dedicatedIps(Output.of(dedicatedIps)); + } + + /** + * @param dedicatedIps The dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(AppDedicatedIpArgs... dedicatedIps) { + return dedicatedIps(List.of(dedicatedIps)); + } + /** * @param projectId The ID of the project that the app is assigned to. * diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/DigitaloceanFunctions.java b/sdk/java/src/main/java/com/pulumi/digitalocean/DigitaloceanFunctions.java index 1bad155a..ca3f10c6 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/DigitaloceanFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/DigitaloceanFunctions.java @@ -85,6 +85,8 @@ import com.pulumi.digitalocean.inputs.GetVolumeSnapshotArgs; import com.pulumi.digitalocean.inputs.GetVolumeSnapshotPlainArgs; import com.pulumi.digitalocean.inputs.GetVpcArgs; +import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs; +import com.pulumi.digitalocean.inputs.GetVpcPeeringPlainArgs; import com.pulumi.digitalocean.inputs.GetVpcPlainArgs; import com.pulumi.digitalocean.outputs.GetAccountResult; import com.pulumi.digitalocean.outputs.GetAppResult; @@ -125,6 +127,7 @@ import com.pulumi.digitalocean.outputs.GetTagsResult; import com.pulumi.digitalocean.outputs.GetVolumeResult; import com.pulumi.digitalocean.outputs.GetVolumeSnapshotResult; +import com.pulumi.digitalocean.outputs.GetVpcPeeringResult; import com.pulumi.digitalocean.outputs.GetVpcResult; import com.pulumi.resources.InvokeArgs; import java.util.concurrent.CompletableFuture; @@ -13846,4 +13849,1006 @@ public static Output getVpc(GetVpcArgs args, InvokeOptions options public static CompletableFuture getVpcPlain(GetVpcPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("digitalocean:index/getVpc:getVpc", TypeShape.of(GetVpcResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * ### VPC Peering By Id + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### VPC Peering By Name + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getVpcPeering() { + return getVpcPeering(GetVpcPeeringArgs.Empty, InvokeOptions.Empty); + } + /** + * ## Example Usage + * + * ### VPC Peering By Id + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### VPC Peering By Name + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getVpcPeeringPlain() { + return getVpcPeeringPlain(GetVpcPeeringPlainArgs.Empty, InvokeOptions.Empty); + } + /** + * ## Example Usage + * + * ### VPC Peering By Id + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### VPC Peering By Name + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getVpcPeering(GetVpcPeeringArgs args) { + return getVpcPeering(args, InvokeOptions.Empty); + } + /** + * ## Example Usage + * + * ### VPC Peering By Id + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### VPC Peering By Name + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getVpcPeeringPlain(GetVpcPeeringPlainArgs args) { + return getVpcPeeringPlain(args, InvokeOptions.Empty); + } + /** + * ## Example Usage + * + * ### VPC Peering By Id + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### VPC Peering By Name + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getVpcPeering(GetVpcPeeringArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("digitalocean:index/getVpcPeering:getVpcPeering", TypeShape.of(GetVpcPeeringResult.class), args, Utilities.withVersion(options)); + } + /** + * ## Example Usage + * + * ### VPC Peering By Id + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .id("example-id")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### VPC Peering By Name + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * Reuse the data about a VPC Peering in other resources: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.digitalocean.DigitaloceanFunctions;
+     * import com.pulumi.digitalocean.inputs.GetVpcPeeringArgs;
+     * import com.pulumi.digitalocean.Droplet;
+     * import com.pulumi.digitalocean.DropletArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var example = DigitaloceanFunctions.getVpcPeering(GetVpcPeeringArgs.builder()
+     *             .name("example-peering")
+     *             .build());
+     * 
+     *         var exampleDroplet = new Droplet("exampleDroplet", DropletArgs.builder()
+     *             .name("example-01")
+     *             .size("s-1vcpu-1gb")
+     *             .image("ubuntu-18-04-x64")
+     *             .region("nyc3")
+     *             .vpcUuid(example.applyValue(getVpcPeeringResult -> getVpcPeeringResult.vpcIds()[0]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getVpcPeeringPlain(GetVpcPeeringPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("digitalocean:index/getVpcPeering:getVpcPeering", TypeShape.of(GetVpcPeeringResult.class), args, Utilities.withVersion(options)); + } } diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeering.java b/sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeering.java new file mode 100644 index 00000000..79bdf225 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeering.java @@ -0,0 +1,248 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.digitalocean.Utilities; +import com.pulumi.digitalocean.VpcPeeringArgs; +import com.pulumi.digitalocean.inputs.VpcPeeringState; +import java.lang.String; +import java.util.List; +import javax.annotation.Nullable; + +/** + * Provides a DigitalOcean VPC Peering resource. + * + * VPC Peerings are used to connect two VPC networks allowing resources in each + * VPC to communicate with each other privately. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.VpcPeering;
+ * import com.pulumi.digitalocean.VpcPeeringArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var example = new VpcPeering("example", VpcPeeringArgs.builder()
+ *             .name("example-peering")
+ *             .vpcIds(            
+ *                 vpc1.id(),
+ *                 vpc2.id())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + * ### Resource Assignement + * + * You can use the VPC Peering resource to allow communication between resources + * in different VPCs. For example: + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.Vpc;
+ * import com.pulumi.digitalocean.VpcArgs;
+ * import com.pulumi.digitalocean.VpcPeering;
+ * import com.pulumi.digitalocean.VpcPeeringArgs;
+ * import com.pulumi.digitalocean.Droplet;
+ * import com.pulumi.digitalocean.DropletArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var vpc1 = new Vpc("vpc1", VpcArgs.builder()
+ *             .name("vpc1")
+ *             .region("nyc3")
+ *             .build());
+ * 
+ *         var vpc2 = new Vpc("vpc2", VpcArgs.builder()
+ *             .name("vpc2")
+ *             .region("nyc3")
+ *             .build());
+ * 
+ *         var example = new VpcPeering("example", VpcPeeringArgs.builder()
+ *             .name("example-peering")
+ *             .vpcIds(            
+ *                 vpc1.id(),
+ *                 vpc2.id())
+ *             .build());
+ * 
+ *         var example1 = new Droplet("example1", DropletArgs.builder()
+ *             .name("example1")
+ *             .size("s-1vcpu-1gb")
+ *             .image("ubuntu-18-04-x64")
+ *             .region("nyc3")
+ *             .vpcUuid(vpc1.id())
+ *             .build());
+ * 
+ *         var example2 = new Droplet("example2", DropletArgs.builder()
+ *             .name("example2")
+ *             .size("s-1vcpu-1gb")
+ *             .image("ubuntu-18-04-x64")
+ *             .region("nyc3")
+ *             .vpcUuid(vpc2.id())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + * ## Import + * + * A VPC Peering can be imported using its `id`, e.g. + * + * ```sh + * $ pulumi import digitalocean:index/vpcPeering:VpcPeering example 771ad360-c017-4b4e-a34e-73934f5f0190 + * ``` + * + */ +@ResourceType(type="digitalocean:index/vpcPeering:VpcPeering") +public class VpcPeering extends com.pulumi.resources.CustomResource { + /** + * The date and time of when the VPC Peering was created. + * + */ + @Export(name="createdAt", refs={String.class}, tree="[0]") + private Output createdAt; + + /** + * @return The date and time of when the VPC Peering was created. + * + */ + public Output createdAt() { + return this.createdAt; + } + /** + * A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + */ + @Export(name="name", refs={String.class}, tree="[0]") + private Output name; + + /** + * @return A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + */ + public Output name() { + return this.name; + } + /** + * The status of the VPC Peering. + * + */ + @Export(name="status", refs={String.class}, tree="[0]") + private Output status; + + /** + * @return The status of the VPC Peering. + * + */ + public Output status() { + return this.status; + } + /** + * A set of two VPC IDs to be peered. + * + */ + @Export(name="vpcIds", refs={List.class,String.class}, tree="[0,1]") + private Output> vpcIds; + + /** + * @return A set of two VPC IDs to be peered. + * + */ + public Output> vpcIds() { + return this.vpcIds; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public VpcPeering(String name) { + this(name, VpcPeeringArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public VpcPeering(String name, VpcPeeringArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public VpcPeering(String name, VpcPeeringArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("digitalocean:index/vpcPeering:VpcPeering", name, args == null ? VpcPeeringArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private VpcPeering(String name, Output id, @Nullable VpcPeeringState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("digitalocean:index/vpcPeering:VpcPeering", name, state, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static VpcPeering get(String name, Output id, @Nullable VpcPeeringState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new VpcPeering(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeeringArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeeringArgs.java new file mode 100644 index 00000000..6f208515 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/VpcPeeringArgs.java @@ -0,0 +1,135 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class VpcPeeringArgs extends com.pulumi.resources.ResourceArgs { + + public static final VpcPeeringArgs Empty = new VpcPeeringArgs(); + + /** + * A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * A set of two VPC IDs to be peered. + * + */ + @Import(name="vpcIds", required=true) + private Output> vpcIds; + + /** + * @return A set of two VPC IDs to be peered. + * + */ + public Output> vpcIds() { + return this.vpcIds; + } + + private VpcPeeringArgs() {} + + private VpcPeeringArgs(VpcPeeringArgs $) { + this.name = $.name; + this.vpcIds = $.vpcIds; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(VpcPeeringArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private VpcPeeringArgs $; + + public Builder() { + $ = new VpcPeeringArgs(); + } + + public Builder(VpcPeeringArgs defaults) { + $ = new VpcPeeringArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param vpcIds A set of two VPC IDs to be peered. + * + * @return builder + * + */ + public Builder vpcIds(Output> vpcIds) { + $.vpcIds = vpcIds; + return this; + } + + /** + * @param vpcIds A set of two VPC IDs to be peered. + * + * @return builder + * + */ + public Builder vpcIds(List vpcIds) { + return vpcIds(Output.of(vpcIds)); + } + + /** + * @param vpcIds A set of two VPC IDs to be peered. + * + * @return builder + * + */ + public Builder vpcIds(String... vpcIds) { + return vpcIds(List.of(vpcIds)); + } + + public VpcPeeringArgs build() { + if ($.vpcIds == null) { + throw new MissingRequiredPropertyException("VpcPeeringArgs", "vpcIds"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppDedicatedIpArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppDedicatedIpArgs.java new file mode 100644 index 00000000..d49f1517 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppDedicatedIpArgs.java @@ -0,0 +1,157 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class AppDedicatedIpArgs extends com.pulumi.resources.ResourceArgs { + + public static final AppDedicatedIpArgs Empty = new AppDedicatedIpArgs(); + + /** + * The ID of the app. + * + */ + @Import(name="id") + private @Nullable Output id; + + /** + * @return The ID of the app. + * + */ + public Optional> id() { + return Optional.ofNullable(this.id); + } + + /** + * The IP address of the dedicated egress IP. + * + */ + @Import(name="ip") + private @Nullable Output ip; + + /** + * @return The IP address of the dedicated egress IP. + * + */ + public Optional> ip() { + return Optional.ofNullable(this.ip); + } + + /** + * The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + * + */ + @Import(name="status") + private @Nullable Output status; + + /** + * @return The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + * + */ + public Optional> status() { + return Optional.ofNullable(this.status); + } + + private AppDedicatedIpArgs() {} + + private AppDedicatedIpArgs(AppDedicatedIpArgs $) { + this.id = $.id; + this.ip = $.ip; + this.status = $.status; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(AppDedicatedIpArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private AppDedicatedIpArgs $; + + public Builder() { + $ = new AppDedicatedIpArgs(); + } + + public Builder(AppDedicatedIpArgs defaults) { + $ = new AppDedicatedIpArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param id The ID of the app. + * + * @return builder + * + */ + public Builder id(@Nullable Output id) { + $.id = id; + return this; + } + + /** + * @param id The ID of the app. + * + * @return builder + * + */ + public Builder id(String id) { + return id(Output.of(id)); + } + + /** + * @param ip The IP address of the dedicated egress IP. + * + * @return builder + * + */ + public Builder ip(@Nullable Output ip) { + $.ip = ip; + return this; + } + + /** + * @param ip The IP address of the dedicated egress IP. + * + * @return builder + * + */ + public Builder ip(String ip) { + return ip(Output.of(ip)); + } + + /** + * @param status The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + * + * @return builder + * + */ + public Builder status(@Nullable Output status) { + $.status = status; + return this; + } + + /** + * @param status The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + * + * @return builder + * + */ + public Builder status(String status) { + return status(Output.of(status)); + } + + public AppDedicatedIpArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecArgs.java index bb304c41..1a793c0a 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecArgs.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecArgs.java @@ -8,6 +8,7 @@ import com.pulumi.digitalocean.inputs.AppSpecAlertArgs; import com.pulumi.digitalocean.inputs.AppSpecDatabaseArgs; import com.pulumi.digitalocean.inputs.AppSpecDomainNameArgs; +import com.pulumi.digitalocean.inputs.AppSpecEgressArgs; import com.pulumi.digitalocean.inputs.AppSpecEnvArgs; import com.pulumi.digitalocean.inputs.AppSpecFunctionArgs; import com.pulumi.digitalocean.inputs.AppSpecIngressArgs; @@ -83,6 +84,21 @@ public Optional>> domains() { return Optional.ofNullable(this.domains); } + /** + * Specification for app egress configurations. + * + */ + @Import(name="egresses") + private @Nullable Output> egresses; + + /** + * @return Specification for app egress configurations. + * + */ + public Optional>> egresses() { + return Optional.ofNullable(this.egresses); + } + /** * Describes an app-wide environment variable made available to all components. * @@ -200,6 +216,7 @@ private AppSpecArgs(AppSpecArgs $) { this.databases = $.databases; this.domainNames = $.domainNames; this.domains = $.domains; + this.egresses = $.egresses; this.envs = $.envs; this.features = $.features; this.functions = $.functions; @@ -342,6 +359,37 @@ public Builder domains(String... domains) { return domains(List.of(domains)); } + /** + * @param egresses Specification for app egress configurations. + * + * @return builder + * + */ + public Builder egresses(@Nullable Output> egresses) { + $.egresses = egresses; + return this; + } + + /** + * @param egresses Specification for app egress configurations. + * + * @return builder + * + */ + public Builder egresses(List egresses) { + return egresses(Output.of(egresses)); + } + + /** + * @param egresses Specification for app egress configurations. + * + * @return builder + * + */ + public Builder egresses(AppSpecEgressArgs... egresses) { + return egresses(List.of(egresses)); + } + /** * @param envs Describes an app-wide environment variable made available to all components. * diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecEgressArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecEgressArgs.java new file mode 100644 index 00000000..4c1e7249 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppSpecEgressArgs.java @@ -0,0 +1,83 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class AppSpecEgressArgs extends com.pulumi.resources.ResourceArgs { + + public static final AppSpecEgressArgs Empty = new AppSpecEgressArgs(); + + /** + * The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + * + */ + @Import(name="type") + private @Nullable Output type; + + /** + * @return The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + * + */ + public Optional> type() { + return Optional.ofNullable(this.type); + } + + private AppSpecEgressArgs() {} + + private AppSpecEgressArgs(AppSpecEgressArgs $) { + this.type = $.type; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(AppSpecEgressArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private AppSpecEgressArgs $; + + public Builder() { + $ = new AppSpecEgressArgs(); + } + + public Builder(AppSpecEgressArgs defaults) { + $ = new AppSpecEgressArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param type The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + * + * @return builder + * + */ + public Builder type(@Nullable Output type) { + $.type = type; + return this; + } + + /** + * @param type The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + * + * @return builder + * + */ + public Builder type(String type) { + return type(Output.of(type)); + } + + public AppSpecEgressArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppState.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppState.java index 9af2787c..7a44636e 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppState.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/AppState.java @@ -5,8 +5,10 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.digitalocean.inputs.AppDedicatedIpArgs; import com.pulumi.digitalocean.inputs.AppSpecArgs; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -61,6 +63,21 @@ public Optional> createdAt() { return Optional.ofNullable(this.createdAt); } + /** + * The dedicated egress IP addresses associated with the app. + * + */ + @Import(name="dedicatedIps") + private @Nullable Output> dedicatedIps; + + /** + * @return The dedicated egress IP addresses associated with the app. + * + */ + public Optional>> dedicatedIps() { + return Optional.ofNullable(this.dedicatedIps); + } + /** * The default URL to access the app. * @@ -150,6 +167,7 @@ private AppState(AppState $) { this.activeDeploymentId = $.activeDeploymentId; this.appUrn = $.appUrn; this.createdAt = $.createdAt; + this.dedicatedIps = $.dedicatedIps; this.defaultIngress = $.defaultIngress; this.liveUrl = $.liveUrl; this.projectId = $.projectId; @@ -238,6 +256,37 @@ public Builder createdAt(String createdAt) { return createdAt(Output.of(createdAt)); } + /** + * @param dedicatedIps The dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(@Nullable Output> dedicatedIps) { + $.dedicatedIps = dedicatedIps; + return this; + } + + /** + * @param dedicatedIps The dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(List dedicatedIps) { + return dedicatedIps(Output.of(dedicatedIps)); + } + + /** + * @param dedicatedIps The dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(AppDedicatedIpArgs... dedicatedIps) { + return dedicatedIps(List.of(dedicatedIps)); + } + /** * @param defaultIngress The default URL to access the app. * diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppArgs.java index 45d1d961..8291ead4 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppArgs.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppArgs.java @@ -5,9 +5,13 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.digitalocean.inputs.GetAppDedicatedIpArgs; import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; +import java.util.List; import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; public final class GetAppArgs extends com.pulumi.resources.InvokeArgs { @@ -29,10 +33,26 @@ public Output appId() { return this.appId; } + /** + * A list of dedicated egress IP addresses associated with the app. + * + */ + @Import(name="dedicatedIps") + private @Nullable Output> dedicatedIps; + + /** + * @return A list of dedicated egress IP addresses associated with the app. + * + */ + public Optional>> dedicatedIps() { + return Optional.ofNullable(this.dedicatedIps); + } + private GetAppArgs() {} private GetAppArgs(GetAppArgs $) { this.appId = $.appId; + this.dedicatedIps = $.dedicatedIps; } public static Builder builder() { @@ -74,6 +94,37 @@ public Builder appId(String appId) { return appId(Output.of(appId)); } + /** + * @param dedicatedIps A list of dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(@Nullable Output> dedicatedIps) { + $.dedicatedIps = dedicatedIps; + return this; + } + + /** + * @param dedicatedIps A list of dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(List dedicatedIps) { + return dedicatedIps(Output.of(dedicatedIps)); + } + + /** + * @param dedicatedIps A list of dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(GetAppDedicatedIpArgs... dedicatedIps) { + return dedicatedIps(List.of(dedicatedIps)); + } + public GetAppArgs build() { if ($.appId == null) { throw new MissingRequiredPropertyException("GetAppArgs", "appId"); diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIp.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIp.java new file mode 100644 index 00000000..c3aa5589 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIp.java @@ -0,0 +1,134 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.inputs; + +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetAppDedicatedIp extends com.pulumi.resources.InvokeArgs { + + public static final GetAppDedicatedIp Empty = new GetAppDedicatedIp(); + + /** + * The ID of the dedicated egress IP. + * + */ + @Import(name="id", required=true) + private String id; + + /** + * @return The ID of the dedicated egress IP. + * + */ + public String id() { + return this.id; + } + + /** + * The IP address of the dedicated egress IP. + * + */ + @Import(name="ip", required=true) + private String ip; + + /** + * @return The IP address of the dedicated egress IP. + * + */ + public String ip() { + return this.ip; + } + + /** + * The status of the dedicated egress IP. + * + */ + @Import(name="status", required=true) + private String status; + + /** + * @return The status of the dedicated egress IP. + * + */ + public String status() { + return this.status; + } + + private GetAppDedicatedIp() {} + + private GetAppDedicatedIp(GetAppDedicatedIp $) { + this.id = $.id; + this.ip = $.ip; + this.status = $.status; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetAppDedicatedIp defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetAppDedicatedIp $; + + public Builder() { + $ = new GetAppDedicatedIp(); + } + + public Builder(GetAppDedicatedIp defaults) { + $ = new GetAppDedicatedIp(Objects.requireNonNull(defaults)); + } + + /** + * @param id The ID of the dedicated egress IP. + * + * @return builder + * + */ + public Builder id(String id) { + $.id = id; + return this; + } + + /** + * @param ip The IP address of the dedicated egress IP. + * + * @return builder + * + */ + public Builder ip(String ip) { + $.ip = ip; + return this; + } + + /** + * @param status The status of the dedicated egress IP. + * + * @return builder + * + */ + public Builder status(String status) { + $.status = status; + return this; + } + + public GetAppDedicatedIp build() { + if ($.id == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIp", "id"); + } + if ($.ip == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIp", "ip"); + } + if ($.status == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIp", "status"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIpArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIpArgs.java new file mode 100644 index 00000000..92765285 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppDedicatedIpArgs.java @@ -0,0 +1,165 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetAppDedicatedIpArgs extends com.pulumi.resources.ResourceArgs { + + public static final GetAppDedicatedIpArgs Empty = new GetAppDedicatedIpArgs(); + + /** + * The ID of the dedicated egress IP. + * + */ + @Import(name="id", required=true) + private Output id; + + /** + * @return The ID of the dedicated egress IP. + * + */ + public Output id() { + return this.id; + } + + /** + * The IP address of the dedicated egress IP. + * + */ + @Import(name="ip", required=true) + private Output ip; + + /** + * @return The IP address of the dedicated egress IP. + * + */ + public Output ip() { + return this.ip; + } + + /** + * The status of the dedicated egress IP. + * + */ + @Import(name="status", required=true) + private Output status; + + /** + * @return The status of the dedicated egress IP. + * + */ + public Output status() { + return this.status; + } + + private GetAppDedicatedIpArgs() {} + + private GetAppDedicatedIpArgs(GetAppDedicatedIpArgs $) { + this.id = $.id; + this.ip = $.ip; + this.status = $.status; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetAppDedicatedIpArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetAppDedicatedIpArgs $; + + public Builder() { + $ = new GetAppDedicatedIpArgs(); + } + + public Builder(GetAppDedicatedIpArgs defaults) { + $ = new GetAppDedicatedIpArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param id The ID of the dedicated egress IP. + * + * @return builder + * + */ + public Builder id(Output id) { + $.id = id; + return this; + } + + /** + * @param id The ID of the dedicated egress IP. + * + * @return builder + * + */ + public Builder id(String id) { + return id(Output.of(id)); + } + + /** + * @param ip The IP address of the dedicated egress IP. + * + * @return builder + * + */ + public Builder ip(Output ip) { + $.ip = ip; + return this; + } + + /** + * @param ip The IP address of the dedicated egress IP. + * + * @return builder + * + */ + public Builder ip(String ip) { + return ip(Output.of(ip)); + } + + /** + * @param status The status of the dedicated egress IP. + * + * @return builder + * + */ + public Builder status(Output status) { + $.status = status; + return this; + } + + /** + * @param status The status of the dedicated egress IP. + * + * @return builder + * + */ + public Builder status(String status) { + return status(Output.of(status)); + } + + public GetAppDedicatedIpArgs build() { + if ($.id == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIpArgs", "id"); + } + if ($.ip == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIpArgs", "ip"); + } + if ($.status == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIpArgs", "status"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppPlainArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppPlainArgs.java index 2c3d9bd4..b5ecd7a5 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppPlainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetAppPlainArgs.java @@ -4,9 +4,13 @@ package com.pulumi.digitalocean.inputs; import com.pulumi.core.annotations.Import; +import com.pulumi.digitalocean.inputs.GetAppDedicatedIp; import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; +import java.util.List; import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; public final class GetAppPlainArgs extends com.pulumi.resources.InvokeArgs { @@ -28,10 +32,26 @@ public String appId() { return this.appId; } + /** + * A list of dedicated egress IP addresses associated with the app. + * + */ + @Import(name="dedicatedIps") + private @Nullable List dedicatedIps; + + /** + * @return A list of dedicated egress IP addresses associated with the app. + * + */ + public Optional> dedicatedIps() { + return Optional.ofNullable(this.dedicatedIps); + } + private GetAppPlainArgs() {} private GetAppPlainArgs(GetAppPlainArgs $) { this.appId = $.appId; + this.dedicatedIps = $.dedicatedIps; } public static Builder builder() { @@ -63,6 +83,27 @@ public Builder appId(String appId) { return this; } + /** + * @param dedicatedIps A list of dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(@Nullable List dedicatedIps) { + $.dedicatedIps = dedicatedIps; + return this; + } + + /** + * @param dedicatedIps A list of dedicated egress IP addresses associated with the app. + * + * @return builder + * + */ + public Builder dedicatedIps(GetAppDedicatedIp... dedicatedIps) { + return dedicatedIps(List.of(dedicatedIps)); + } + public GetAppPlainArgs build() { if ($.appId == null) { throw new MissingRequiredPropertyException("GetAppPlainArgs", "appId"); diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringArgs.java new file mode 100644 index 00000000..5e2d6594 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringArgs.java @@ -0,0 +1,168 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class GetVpcPeeringArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetVpcPeeringArgs Empty = new GetVpcPeeringArgs(); + + /** + * The unique identifier of an existing VPC Peering. + * + */ + @Import(name="id") + private @Nullable Output id; + + /** + * @return The unique identifier of an existing VPC Peering. + * + */ + public Optional> id() { + return Optional.ofNullable(this.id); + } + + /** + * The name of an existing VPC Peering. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return The name of an existing VPC Peering. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * The list of VPC IDs involved in the peering. + * + */ + @Import(name="vpcIds") + private @Nullable Output> vpcIds; + + /** + * @return The list of VPC IDs involved in the peering. + * + */ + public Optional>> vpcIds() { + return Optional.ofNullable(this.vpcIds); + } + + private GetVpcPeeringArgs() {} + + private GetVpcPeeringArgs(GetVpcPeeringArgs $) { + this.id = $.id; + this.name = $.name; + this.vpcIds = $.vpcIds; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetVpcPeeringArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetVpcPeeringArgs $; + + public Builder() { + $ = new GetVpcPeeringArgs(); + } + + public Builder(GetVpcPeeringArgs defaults) { + $ = new GetVpcPeeringArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param id The unique identifier of an existing VPC Peering. + * + * @return builder + * + */ + public Builder id(@Nullable Output id) { + $.id = id; + return this; + } + + /** + * @param id The unique identifier of an existing VPC Peering. + * + * @return builder + * + */ + public Builder id(String id) { + return id(Output.of(id)); + } + + /** + * @param name The name of an existing VPC Peering. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name The name of an existing VPC Peering. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param vpcIds The list of VPC IDs involved in the peering. + * + * @return builder + * + */ + public Builder vpcIds(@Nullable Output> vpcIds) { + $.vpcIds = vpcIds; + return this; + } + + /** + * @param vpcIds The list of VPC IDs involved in the peering. + * + * @return builder + * + */ + public Builder vpcIds(List vpcIds) { + return vpcIds(Output.of(vpcIds)); + } + + /** + * @param vpcIds The list of VPC IDs involved in the peering. + * + * @return builder + * + */ + public Builder vpcIds(String... vpcIds) { + return vpcIds(List.of(vpcIds)); + } + + public GetVpcPeeringArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringPlainArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringPlainArgs.java new file mode 100644 index 00000000..9d60dcb7 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/GetVpcPeeringPlainArgs.java @@ -0,0 +1,137 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.inputs; + +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class GetVpcPeeringPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetVpcPeeringPlainArgs Empty = new GetVpcPeeringPlainArgs(); + + /** + * The unique identifier of an existing VPC Peering. + * + */ + @Import(name="id") + private @Nullable String id; + + /** + * @return The unique identifier of an existing VPC Peering. + * + */ + public Optional id() { + return Optional.ofNullable(this.id); + } + + /** + * The name of an existing VPC Peering. + * + */ + @Import(name="name") + private @Nullable String name; + + /** + * @return The name of an existing VPC Peering. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + + /** + * The list of VPC IDs involved in the peering. + * + */ + @Import(name="vpcIds") + private @Nullable List vpcIds; + + /** + * @return The list of VPC IDs involved in the peering. + * + */ + public Optional> vpcIds() { + return Optional.ofNullable(this.vpcIds); + } + + private GetVpcPeeringPlainArgs() {} + + private GetVpcPeeringPlainArgs(GetVpcPeeringPlainArgs $) { + this.id = $.id; + this.name = $.name; + this.vpcIds = $.vpcIds; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetVpcPeeringPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetVpcPeeringPlainArgs $; + + public Builder() { + $ = new GetVpcPeeringPlainArgs(); + } + + public Builder(GetVpcPeeringPlainArgs defaults) { + $ = new GetVpcPeeringPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param id The unique identifier of an existing VPC Peering. + * + * @return builder + * + */ + public Builder id(@Nullable String id) { + $.id = id; + return this; + } + + /** + * @param name The name of an existing VPC Peering. + * + * @return builder + * + */ + public Builder name(@Nullable String name) { + $.name = name; + return this; + } + + /** + * @param vpcIds The list of VPC IDs involved in the peering. + * + * @return builder + * + */ + public Builder vpcIds(@Nullable List vpcIds) { + $.vpcIds = vpcIds; + return this; + } + + /** + * @param vpcIds The list of VPC IDs involved in the peering. + * + * @return builder + * + */ + public Builder vpcIds(String... vpcIds) { + return vpcIds(List.of(vpcIds)); + } + + public GetVpcPeeringPlainArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/LoadBalancerGlbSettingsArgs.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/LoadBalancerGlbSettingsArgs.java index f4ae9745..7e8b8406 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/LoadBalancerGlbSettingsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/LoadBalancerGlbSettingsArgs.java @@ -9,6 +9,7 @@ import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Integer; import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -33,6 +34,36 @@ public Optional> cdn() { return Optional.ofNullable(this.cdn); } + /** + * fail-over threshold + * + */ + @Import(name="failoverThreshold") + private @Nullable Output failoverThreshold; + + /** + * @return fail-over threshold + * + */ + public Optional> failoverThreshold() { + return Optional.ofNullable(this.failoverThreshold); + } + + /** + * region priority map + * + */ + @Import(name="regionPriorities") + private @Nullable Output> regionPriorities; + + /** + * @return region priority map + * + */ + public Optional>> regionPriorities() { + return Optional.ofNullable(this.regionPriorities); + } + /** * An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. * @@ -67,6 +98,8 @@ private LoadBalancerGlbSettingsArgs() {} private LoadBalancerGlbSettingsArgs(LoadBalancerGlbSettingsArgs $) { this.cdn = $.cdn; + this.failoverThreshold = $.failoverThreshold; + this.regionPriorities = $.regionPriorities; this.targetPort = $.targetPort; this.targetProtocol = $.targetProtocol; } @@ -110,6 +143,48 @@ public Builder cdn(LoadBalancerGlbSettingsCdnArgs cdn) { return cdn(Output.of(cdn)); } + /** + * @param failoverThreshold fail-over threshold + * + * @return builder + * + */ + public Builder failoverThreshold(@Nullable Output failoverThreshold) { + $.failoverThreshold = failoverThreshold; + return this; + } + + /** + * @param failoverThreshold fail-over threshold + * + * @return builder + * + */ + public Builder failoverThreshold(Integer failoverThreshold) { + return failoverThreshold(Output.of(failoverThreshold)); + } + + /** + * @param regionPriorities region priority map + * + * @return builder + * + */ + public Builder regionPriorities(@Nullable Output> regionPriorities) { + $.regionPriorities = regionPriorities; + return this; + } + + /** + * @param regionPriorities region priority map + * + * @return builder + * + */ + public Builder regionPriorities(Map regionPriorities) { + return regionPriorities(Output.of(regionPriorities)); + } + /** * @param targetPort An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. * diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/VpcPeeringState.java b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/VpcPeeringState.java new file mode 100644 index 00000000..65e06715 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/inputs/VpcPeeringState.java @@ -0,0 +1,205 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class VpcPeeringState extends com.pulumi.resources.ResourceArgs { + + public static final VpcPeeringState Empty = new VpcPeeringState(); + + /** + * The date and time of when the VPC Peering was created. + * + */ + @Import(name="createdAt") + private @Nullable Output createdAt; + + /** + * @return The date and time of when the VPC Peering was created. + * + */ + public Optional> createdAt() { + return Optional.ofNullable(this.createdAt); + } + + /** + * A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * The status of the VPC Peering. + * + */ + @Import(name="status") + private @Nullable Output status; + + /** + * @return The status of the VPC Peering. + * + */ + public Optional> status() { + return Optional.ofNullable(this.status); + } + + /** + * A set of two VPC IDs to be peered. + * + */ + @Import(name="vpcIds") + private @Nullable Output> vpcIds; + + /** + * @return A set of two VPC IDs to be peered. + * + */ + public Optional>> vpcIds() { + return Optional.ofNullable(this.vpcIds); + } + + private VpcPeeringState() {} + + private VpcPeeringState(VpcPeeringState $) { + this.createdAt = $.createdAt; + this.name = $.name; + this.status = $.status; + this.vpcIds = $.vpcIds; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(VpcPeeringState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private VpcPeeringState $; + + public Builder() { + $ = new VpcPeeringState(); + } + + public Builder(VpcPeeringState defaults) { + $ = new VpcPeeringState(Objects.requireNonNull(defaults)); + } + + /** + * @param createdAt The date and time of when the VPC Peering was created. + * + * @return builder + * + */ + public Builder createdAt(@Nullable Output createdAt) { + $.createdAt = createdAt; + return this; + } + + /** + * @param createdAt The date and time of when the VPC Peering was created. + * + * @return builder + * + */ + public Builder createdAt(String createdAt) { + return createdAt(Output.of(createdAt)); + } + + /** + * @param name A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param status The status of the VPC Peering. + * + * @return builder + * + */ + public Builder status(@Nullable Output status) { + $.status = status; + return this; + } + + /** + * @param status The status of the VPC Peering. + * + * @return builder + * + */ + public Builder status(String status) { + return status(Output.of(status)); + } + + /** + * @param vpcIds A set of two VPC IDs to be peered. + * + * @return builder + * + */ + public Builder vpcIds(@Nullable Output> vpcIds) { + $.vpcIds = vpcIds; + return this; + } + + /** + * @param vpcIds A set of two VPC IDs to be peered. + * + * @return builder + * + */ + public Builder vpcIds(List vpcIds) { + return vpcIds(Output.of(vpcIds)); + } + + /** + * @param vpcIds A set of two VPC IDs to be peered. + * + * @return builder + * + */ + public Builder vpcIds(String... vpcIds) { + return vpcIds(List.of(vpcIds)); + } + + public VpcPeeringState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppDedicatedIp.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppDedicatedIp.java new file mode 100644 index 00000000..172cdeed --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppDedicatedIp.java @@ -0,0 +1,99 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class AppDedicatedIp { + /** + * @return The ID of the app. + * + */ + private @Nullable String id; + /** + * @return The IP address of the dedicated egress IP. + * + */ + private @Nullable String ip; + /** + * @return The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + * + */ + private @Nullable String status; + + private AppDedicatedIp() {} + /** + * @return The ID of the app. + * + */ + public Optional id() { + return Optional.ofNullable(this.id); + } + /** + * @return The IP address of the dedicated egress IP. + * + */ + public Optional ip() { + return Optional.ofNullable(this.ip); + } + /** + * @return The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + * + */ + public Optional status() { + return Optional.ofNullable(this.status); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(AppDedicatedIp defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String id; + private @Nullable String ip; + private @Nullable String status; + public Builder() {} + public Builder(AppDedicatedIp defaults) { + Objects.requireNonNull(defaults); + this.id = defaults.id; + this.ip = defaults.ip; + this.status = defaults.status; + } + + @CustomType.Setter + public Builder id(@Nullable String id) { + + this.id = id; + return this; + } + @CustomType.Setter + public Builder ip(@Nullable String ip) { + + this.ip = ip; + return this; + } + @CustomType.Setter + public Builder status(@Nullable String status) { + + this.status = status; + return this; + } + public AppDedicatedIp build() { + final var _resultValue = new AppDedicatedIp(); + _resultValue.id = id; + _resultValue.ip = ip; + _resultValue.status = status; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpec.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpec.java index 6a3ea45a..0465cb90 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpec.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpec.java @@ -7,6 +7,7 @@ import com.pulumi.digitalocean.outputs.AppSpecAlert; import com.pulumi.digitalocean.outputs.AppSpecDatabase; import com.pulumi.digitalocean.outputs.AppSpecDomainName; +import com.pulumi.digitalocean.outputs.AppSpecEgress; import com.pulumi.digitalocean.outputs.AppSpecEnv; import com.pulumi.digitalocean.outputs.AppSpecFunction; import com.pulumi.digitalocean.outputs.AppSpecIngress; @@ -41,6 +42,11 @@ public final class AppSpec { */ @Deprecated /* This attribute has been replaced by `domain` which supports additional functionality. */ private @Nullable List domains; + /** + * @return Specification for app egress configurations. + * + */ + private @Nullable List egresses; /** * @return Describes an app-wide environment variable made available to all components. * @@ -99,6 +105,13 @@ public List domainNames() { public List domains() { return this.domains == null ? List.of() : this.domains; } + /** + * @return Specification for app egress configurations. + * + */ + public List egresses() { + return this.egresses == null ? List.of() : this.egresses; + } /** * @return Describes an app-wide environment variable made available to all components. * @@ -163,6 +176,7 @@ public static final class Builder { private @Nullable List databases; private @Nullable List domainNames; private @Nullable List domains; + private @Nullable List egresses; private @Nullable List envs; private @Nullable List features; private @Nullable List functions; @@ -180,6 +194,7 @@ public Builder(AppSpec defaults) { this.databases = defaults.databases; this.domainNames = defaults.domainNames; this.domains = defaults.domains; + this.egresses = defaults.egresses; this.envs = defaults.envs; this.features = defaults.features; this.functions = defaults.functions; @@ -229,6 +244,15 @@ public Builder domains(String... domains) { return domains(List.of(domains)); } @CustomType.Setter + public Builder egresses(@Nullable List egresses) { + + this.egresses = egresses; + return this; + } + public Builder egresses(AppSpecEgress... egresses) { + return egresses(List.of(egresses)); + } + @CustomType.Setter public Builder envs(@Nullable List envs) { this.envs = envs; @@ -317,6 +341,7 @@ public AppSpec build() { _resultValue.databases = databases; _resultValue.domainNames = domainNames; _resultValue.domains = domains; + _resultValue.egresses = egresses; _resultValue.envs = envs; _resultValue.features = features; _resultValue.functions = functions; diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpecEgress.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpecEgress.java new file mode 100644 index 00000000..2d056cb3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/AppSpecEgress.java @@ -0,0 +1,57 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class AppSpecEgress { + /** + * @return The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + * + */ + private @Nullable String type; + + private AppSpecEgress() {} + /** + * @return The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + * + */ + public Optional type() { + return Optional.ofNullable(this.type); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(AppSpecEgress defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String type; + public Builder() {} + public Builder(AppSpecEgress defaults) { + Objects.requireNonNull(defaults); + this.type = defaults.type; + } + + @CustomType.Setter + public Builder type(@Nullable String type) { + + this.type = type; + return this; + } + public AppSpecEgress build() { + final var _resultValue = new AppSpecEgress(); + _resultValue.type = type; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppDedicatedIp.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppDedicatedIp.java new file mode 100644 index 00000000..b963f059 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppDedicatedIp.java @@ -0,0 +1,104 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class GetAppDedicatedIp { + /** + * @return The ID of the dedicated egress IP. + * + */ + private String id; + /** + * @return The IP address of the dedicated egress IP. + * + */ + private String ip; + /** + * @return The status of the dedicated egress IP. + * + */ + private String status; + + private GetAppDedicatedIp() {} + /** + * @return The ID of the dedicated egress IP. + * + */ + public String id() { + return this.id; + } + /** + * @return The IP address of the dedicated egress IP. + * + */ + public String ip() { + return this.ip; + } + /** + * @return The status of the dedicated egress IP. + * + */ + public String status() { + return this.status; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetAppDedicatedIp defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String id; + private String ip; + private String status; + public Builder() {} + public Builder(GetAppDedicatedIp defaults) { + Objects.requireNonNull(defaults); + this.id = defaults.id; + this.ip = defaults.ip; + this.status = defaults.status; + } + + @CustomType.Setter + public Builder id(String id) { + if (id == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIp", "id"); + } + this.id = id; + return this; + } + @CustomType.Setter + public Builder ip(String ip) { + if (ip == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIp", "ip"); + } + this.ip = ip; + return this; + } + @CustomType.Setter + public Builder status(String status) { + if (status == null) { + throw new MissingRequiredPropertyException("GetAppDedicatedIp", "status"); + } + this.status = status; + return this; + } + public GetAppDedicatedIp build() { + final var _resultValue = new GetAppDedicatedIp(); + _resultValue.id = id; + _resultValue.ip = ip; + _resultValue.status = status; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppResult.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppResult.java index c2b9092b..a61b2165 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppResult.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppResult.java @@ -4,6 +4,7 @@ package com.pulumi.digitalocean.outputs; import com.pulumi.core.annotations.CustomType; +import com.pulumi.digitalocean.outputs.GetAppDedicatedIp; import com.pulumi.digitalocean.outputs.GetAppSpec; import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; @@ -23,6 +24,11 @@ public final class GetAppResult { * */ private String createdAt; + /** + * @return A list of dedicated egress IP addresses associated with the app. + * + */ + private List dedicatedIps; /** * @return The default URL to access the app. * @@ -77,6 +83,13 @@ public String appId() { public String createdAt() { return this.createdAt; } + /** + * @return A list of dedicated egress IP addresses associated with the app. + * + */ + public List dedicatedIps() { + return this.dedicatedIps; + } /** * @return The default URL to access the app. * @@ -139,6 +152,7 @@ public static final class Builder { private String activeDeploymentId; private String appId; private String createdAt; + private List dedicatedIps; private String defaultIngress; private String id; private String liveUrl; @@ -152,6 +166,7 @@ public Builder(GetAppResult defaults) { this.activeDeploymentId = defaults.activeDeploymentId; this.appId = defaults.appId; this.createdAt = defaults.createdAt; + this.dedicatedIps = defaults.dedicatedIps; this.defaultIngress = defaults.defaultIngress; this.id = defaults.id; this.liveUrl = defaults.liveUrl; @@ -186,6 +201,17 @@ public Builder createdAt(String createdAt) { return this; } @CustomType.Setter + public Builder dedicatedIps(List dedicatedIps) { + if (dedicatedIps == null) { + throw new MissingRequiredPropertyException("GetAppResult", "dedicatedIps"); + } + this.dedicatedIps = dedicatedIps; + return this; + } + public Builder dedicatedIps(GetAppDedicatedIp... dedicatedIps) { + return dedicatedIps(List.of(dedicatedIps)); + } + @CustomType.Setter public Builder defaultIngress(String defaultIngress) { if (defaultIngress == null) { throw new MissingRequiredPropertyException("GetAppResult", "defaultIngress"); @@ -249,6 +275,7 @@ public GetAppResult build() { _resultValue.activeDeploymentId = activeDeploymentId; _resultValue.appId = appId; _resultValue.createdAt = createdAt; + _resultValue.dedicatedIps = dedicatedIps; _resultValue.defaultIngress = defaultIngress; _resultValue.id = id; _resultValue.liveUrl = liveUrl; diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpec.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpec.java index f6e57a7a..c6c97759 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpec.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpec.java @@ -7,6 +7,7 @@ import com.pulumi.digitalocean.outputs.GetAppSpecAlert; import com.pulumi.digitalocean.outputs.GetAppSpecDatabase; import com.pulumi.digitalocean.outputs.GetAppSpecDomain; +import com.pulumi.digitalocean.outputs.GetAppSpecEgress; import com.pulumi.digitalocean.outputs.GetAppSpecEnv; import com.pulumi.digitalocean.outputs.GetAppSpecFunction; import com.pulumi.digitalocean.outputs.GetAppSpecIngress; @@ -37,6 +38,7 @@ public final class GetAppSpec { */ @Deprecated /* This attribute has been replaced by `domain` which supports additional functionality. */ private List domains; + private @Nullable List egresses; /** * @return Describes an environment variable made available to an app competent. * @@ -87,6 +89,9 @@ public List domain() { public List domains() { return this.domains; } + public List egresses() { + return this.egresses == null ? List.of() : this.egresses; + } /** * @return Describes an environment variable made available to an app competent. * @@ -147,6 +152,7 @@ public static final class Builder { private @Nullable List databases; private List domain; private List domains; + private @Nullable List egresses; private @Nullable List envs; private @Nullable List features; private @Nullable List functions; @@ -164,6 +170,7 @@ public Builder(GetAppSpec defaults) { this.databases = defaults.databases; this.domain = defaults.domain; this.domains = defaults.domains; + this.egresses = defaults.egresses; this.envs = defaults.envs; this.features = defaults.features; this.functions = defaults.functions; @@ -217,6 +224,15 @@ public Builder domains(String... domains) { return domains(List.of(domains)); } @CustomType.Setter + public Builder egresses(@Nullable List egresses) { + + this.egresses = egresses; + return this; + } + public Builder egresses(GetAppSpecEgress... egresses) { + return egresses(List.of(egresses)); + } + @CustomType.Setter public Builder envs(@Nullable List envs) { this.envs = envs; @@ -307,6 +323,7 @@ public GetAppSpec build() { _resultValue.databases = databases; _resultValue.domain = domain; _resultValue.domains = domains; + _resultValue.egresses = egresses; _resultValue.envs = envs; _resultValue.features = features; _resultValue.functions = functions; diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecEgress.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecEgress.java new file mode 100644 index 00000000..462b4842 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecEgress.java @@ -0,0 +1,57 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class GetAppSpecEgress { + /** + * @return The type of the environment variable, `GENERAL` or `SECRET`. + * + */ + private @Nullable String type; + + private GetAppSpecEgress() {} + /** + * @return The type of the environment variable, `GENERAL` or `SECRET`. + * + */ + public Optional type() { + return Optional.ofNullable(this.type); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetAppSpecEgress defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String type; + public Builder() {} + public Builder(GetAppSpecEgress defaults) { + Objects.requireNonNull(defaults); + this.type = defaults.type; + } + + @CustomType.Setter + public Builder type(@Nullable String type) { + + this.type = type; + return this; + } + public GetAppSpecEgress build() { + final var _resultValue = new GetAppSpecEgress(); + _resultValue.type = type; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecService.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecService.java index 98a7e185..c135fc6e 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecService.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetAppSpecService.java @@ -102,7 +102,7 @@ public final class GetAppSpecService { * @return A list of ports on which this service will listen for internal traffic. * */ - private @Nullable List internalPorts; + private List internalPorts; /** * @return Describes a log forwarding destination. * @@ -239,7 +239,7 @@ public Optional instanceSizeSlug() { * */ public List internalPorts() { - return this.internalPorts == null ? List.of() : this.internalPorts; + return this.internalPorts; } /** * @return Describes a log forwarding destination. @@ -302,7 +302,7 @@ public static final class Builder { private @Nullable GetAppSpecServiceImage image; private @Nullable Integer instanceCount; private @Nullable String instanceSizeSlug; - private @Nullable List internalPorts; + private List internalPorts; private @Nullable List logDestinations; private String name; private List routes; @@ -426,8 +426,10 @@ public Builder instanceSizeSlug(@Nullable String instanceSizeSlug) { return this; } @CustomType.Setter - public Builder internalPorts(@Nullable List internalPorts) { - + public Builder internalPorts(List internalPorts) { + if (internalPorts == null) { + throw new MissingRequiredPropertyException("GetAppSpecService", "internalPorts"); + } this.internalPorts = internalPorts; return this; } diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetLoadBalancerGlbSetting.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetLoadBalancerGlbSetting.java index 8317484f..fbb19ab1 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetLoadBalancerGlbSetting.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetLoadBalancerGlbSetting.java @@ -9,6 +9,7 @@ import java.lang.Integer; import java.lang.String; import java.util.List; +import java.util.Map; import java.util.Objects; @CustomType @@ -18,6 +19,16 @@ public final class GetLoadBalancerGlbSetting { * */ private List cdns; + /** + * @return fail-over threshold + * + */ + private Integer failoverThreshold; + /** + * @return region priority map + * + */ + private Map regionPriorities; /** * @return target port rules * @@ -37,6 +48,20 @@ private GetLoadBalancerGlbSetting() {} public List cdns() { return this.cdns; } + /** + * @return fail-over threshold + * + */ + public Integer failoverThreshold() { + return this.failoverThreshold; + } + /** + * @return region priority map + * + */ + public Map regionPriorities() { + return this.regionPriorities; + } /** * @return target port rules * @@ -62,12 +87,16 @@ public static Builder builder(GetLoadBalancerGlbSetting defaults) { @CustomType.Builder public static final class Builder { private List cdns; + private Integer failoverThreshold; + private Map regionPriorities; private Integer targetPort; private String targetProtocol; public Builder() {} public Builder(GetLoadBalancerGlbSetting defaults) { Objects.requireNonNull(defaults); this.cdns = defaults.cdns; + this.failoverThreshold = defaults.failoverThreshold; + this.regionPriorities = defaults.regionPriorities; this.targetPort = defaults.targetPort; this.targetProtocol = defaults.targetProtocol; } @@ -84,6 +113,22 @@ public Builder cdns(GetLoadBalancerGlbSettingCdn... cdns) { return cdns(List.of(cdns)); } @CustomType.Setter + public Builder failoverThreshold(Integer failoverThreshold) { + if (failoverThreshold == null) { + throw new MissingRequiredPropertyException("GetLoadBalancerGlbSetting", "failoverThreshold"); + } + this.failoverThreshold = failoverThreshold; + return this; + } + @CustomType.Setter + public Builder regionPriorities(Map regionPriorities) { + if (regionPriorities == null) { + throw new MissingRequiredPropertyException("GetLoadBalancerGlbSetting", "regionPriorities"); + } + this.regionPriorities = regionPriorities; + return this; + } + @CustomType.Setter public Builder targetPort(Integer targetPort) { if (targetPort == null) { throw new MissingRequiredPropertyException("GetLoadBalancerGlbSetting", "targetPort"); @@ -102,6 +147,8 @@ public Builder targetProtocol(String targetProtocol) { public GetLoadBalancerGlbSetting build() { final var _resultValue = new GetLoadBalancerGlbSetting(); _resultValue.cdns = cdns; + _resultValue.failoverThreshold = failoverThreshold; + _resultValue.regionPriorities = regionPriorities; _resultValue.targetPort = targetPort; _resultValue.targetProtocol = targetProtocol; return _resultValue; diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetVpcPeeringResult.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetVpcPeeringResult.java new file mode 100644 index 00000000..6bef9063 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/GetVpcPeeringResult.java @@ -0,0 +1,154 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.digitalocean.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetVpcPeeringResult { + /** + * @return The date and time of when the VPC Peering was created. + * + */ + private String createdAt; + /** + * @return The unique identifier for the VPC Peering. + * + */ + private String id; + /** + * @return The name of the VPC Peering. + * + */ + private String name; + /** + * @return The status of the VPC Peering. + * + */ + private String status; + /** + * @return The list of VPC IDs involved in the peering. + * + */ + private List vpcIds; + + private GetVpcPeeringResult() {} + /** + * @return The date and time of when the VPC Peering was created. + * + */ + public String createdAt() { + return this.createdAt; + } + /** + * @return The unique identifier for the VPC Peering. + * + */ + public String id() { + return this.id; + } + /** + * @return The name of the VPC Peering. + * + */ + public String name() { + return this.name; + } + /** + * @return The status of the VPC Peering. + * + */ + public String status() { + return this.status; + } + /** + * @return The list of VPC IDs involved in the peering. + * + */ + public List vpcIds() { + return this.vpcIds; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetVpcPeeringResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String createdAt; + private String id; + private String name; + private String status; + private List vpcIds; + public Builder() {} + public Builder(GetVpcPeeringResult defaults) { + Objects.requireNonNull(defaults); + this.createdAt = defaults.createdAt; + this.id = defaults.id; + this.name = defaults.name; + this.status = defaults.status; + this.vpcIds = defaults.vpcIds; + } + + @CustomType.Setter + public Builder createdAt(String createdAt) { + if (createdAt == null) { + throw new MissingRequiredPropertyException("GetVpcPeeringResult", "createdAt"); + } + this.createdAt = createdAt; + return this; + } + @CustomType.Setter + public Builder id(String id) { + if (id == null) { + throw new MissingRequiredPropertyException("GetVpcPeeringResult", "id"); + } + this.id = id; + return this; + } + @CustomType.Setter + public Builder name(String name) { + if (name == null) { + throw new MissingRequiredPropertyException("GetVpcPeeringResult", "name"); + } + this.name = name; + return this; + } + @CustomType.Setter + public Builder status(String status) { + if (status == null) { + throw new MissingRequiredPropertyException("GetVpcPeeringResult", "status"); + } + this.status = status; + return this; + } + @CustomType.Setter + public Builder vpcIds(List vpcIds) { + if (vpcIds == null) { + throw new MissingRequiredPropertyException("GetVpcPeeringResult", "vpcIds"); + } + this.vpcIds = vpcIds; + return this; + } + public Builder vpcIds(String... vpcIds) { + return vpcIds(List.of(vpcIds)); + } + public GetVpcPeeringResult build() { + final var _resultValue = new GetVpcPeeringResult(); + _resultValue.createdAt = createdAt; + _resultValue.id = id; + _resultValue.name = name; + _resultValue.status = status; + _resultValue.vpcIds = vpcIds; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/LoadBalancerGlbSettings.java b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/LoadBalancerGlbSettings.java index 8863a20a..3116cadd 100644 --- a/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/LoadBalancerGlbSettings.java +++ b/sdk/java/src/main/java/com/pulumi/digitalocean/outputs/LoadBalancerGlbSettings.java @@ -8,6 +8,7 @@ import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Integer; import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -19,6 +20,16 @@ public final class LoadBalancerGlbSettings { * */ private @Nullable LoadBalancerGlbSettingsCdn cdn; + /** + * @return fail-over threshold + * + */ + private @Nullable Integer failoverThreshold; + /** + * @return region priority map + * + */ + private @Nullable Map regionPriorities; /** * @return An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. * @@ -38,6 +49,20 @@ private LoadBalancerGlbSettings() {} public Optional cdn() { return Optional.ofNullable(this.cdn); } + /** + * @return fail-over threshold + * + */ + public Optional failoverThreshold() { + return Optional.ofNullable(this.failoverThreshold); + } + /** + * @return region priority map + * + */ + public Map regionPriorities() { + return this.regionPriorities == null ? Map.of() : this.regionPriorities; + } /** * @return An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. * @@ -63,12 +88,16 @@ public static Builder builder(LoadBalancerGlbSettings defaults) { @CustomType.Builder public static final class Builder { private @Nullable LoadBalancerGlbSettingsCdn cdn; + private @Nullable Integer failoverThreshold; + private @Nullable Map regionPriorities; private Integer targetPort; private String targetProtocol; public Builder() {} public Builder(LoadBalancerGlbSettings defaults) { Objects.requireNonNull(defaults); this.cdn = defaults.cdn; + this.failoverThreshold = defaults.failoverThreshold; + this.regionPriorities = defaults.regionPriorities; this.targetPort = defaults.targetPort; this.targetProtocol = defaults.targetProtocol; } @@ -80,6 +109,18 @@ public Builder cdn(@Nullable LoadBalancerGlbSettingsCdn cdn) { return this; } @CustomType.Setter + public Builder failoverThreshold(@Nullable Integer failoverThreshold) { + + this.failoverThreshold = failoverThreshold; + return this; + } + @CustomType.Setter + public Builder regionPriorities(@Nullable Map regionPriorities) { + + this.regionPriorities = regionPriorities; + return this; + } + @CustomType.Setter public Builder targetPort(Integer targetPort) { if (targetPort == null) { throw new MissingRequiredPropertyException("LoadBalancerGlbSettings", "targetPort"); @@ -98,6 +139,8 @@ public Builder targetProtocol(String targetProtocol) { public LoadBalancerGlbSettings build() { final var _resultValue = new LoadBalancerGlbSettings(); _resultValue.cdn = cdn; + _resultValue.failoverThreshold = failoverThreshold; + _resultValue.regionPriorities = regionPriorities; _resultValue.targetPort = targetPort; _resultValue.targetProtocol = targetProtocol; return _resultValue; diff --git a/sdk/nodejs/app.ts b/sdk/nodejs/app.ts index f12fda4f..0ede18b2 100644 --- a/sdk/nodejs/app.ts +++ b/sdk/nodejs/app.ts @@ -105,6 +105,10 @@ export class App extends pulumi.CustomResource { * The date and time of when the app was created. */ public /*out*/ readonly createdAt!: pulumi.Output; + /** + * The dedicated egress IP addresses associated with the app. + */ + public readonly dedicatedIps!: pulumi.Output; /** * The default URL to access the app. */ @@ -146,6 +150,7 @@ export class App extends pulumi.CustomResource { resourceInputs["activeDeploymentId"] = state ? state.activeDeploymentId : undefined; resourceInputs["appUrn"] = state ? state.appUrn : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; + resourceInputs["dedicatedIps"] = state ? state.dedicatedIps : undefined; resourceInputs["defaultIngress"] = state ? state.defaultIngress : undefined; resourceInputs["liveUrl"] = state ? state.liveUrl : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; @@ -153,6 +158,7 @@ export class App extends pulumi.CustomResource { resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; } else { const args = argsOrState as AppArgs | undefined; + resourceInputs["dedicatedIps"] = args ? args.dedicatedIps : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["spec"] = args ? args.spec : undefined; resourceInputs["activeDeploymentId"] = undefined /*out*/; @@ -183,6 +189,10 @@ export interface AppState { * The date and time of when the app was created. */ createdAt?: pulumi.Input; + /** + * The dedicated egress IP addresses associated with the app. + */ + dedicatedIps?: pulumi.Input[]>; /** * The default URL to access the app. */ @@ -213,6 +223,10 @@ export interface AppState { * The set of arguments for constructing a App resource. */ export interface AppArgs { + /** + * The dedicated egress IP addresses associated with the app. + */ + dedicatedIps?: pulumi.Input[]>; /** * The ID of the project that the app is assigned to. * diff --git a/sdk/nodejs/getApp.ts b/sdk/nodejs/getApp.ts index 329b3ad7..87f0bc46 100644 --- a/sdk/nodejs/getApp.ts +++ b/sdk/nodejs/getApp.ts @@ -29,6 +29,7 @@ export function getApp(args: GetAppArgs, opts?: pulumi.InvokeOptions): Promise; + /** + * A list of dedicated egress IP addresses associated with the app. + */ + dedicatedIps?: pulumi.Input[]>; } diff --git a/sdk/nodejs/getVpcPeering.ts b/sdk/nodejs/getVpcPeering.ts new file mode 100644 index 00000000..40b5344f --- /dev/null +++ b/sdk/nodejs/getVpcPeering.ts @@ -0,0 +1,203 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## Example Usage + * + * ### VPC Peering By Id + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * id: "example-id", + * }); + * ``` + * + * Reuse the data about a VPC Peering in other resources: + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * id: "example-id", + * }); + * const exampleDroplet = new digitalocean.Droplet("example", { + * name: "example-01", + * size: digitalocean.DropletSlug.DropletS1VCPU1GB, + * image: "ubuntu-18-04-x64", + * region: digitalocean.Region.NYC3, + * vpcUuid: example.then(example => example.vpcIds?.[0]), + * }); + * ``` + * + * ### VPC Peering By Name + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * name: "example-peering", + * }); + * ``` + * + * Reuse the data about a VPC Peering in other resources: + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * name: "example-peering", + * }); + * const exampleDroplet = new digitalocean.Droplet("example", { + * name: "example-01", + * size: digitalocean.DropletSlug.DropletS1VCPU1GB, + * image: "ubuntu-18-04-x64", + * region: digitalocean.Region.NYC3, + * vpcUuid: example.then(example => example.vpcIds?.[0]), + * }); + * ``` + */ +export function getVpcPeering(args?: GetVpcPeeringArgs, opts?: pulumi.InvokeOptions): Promise { + args = args || {}; + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("digitalocean:index/getVpcPeering:getVpcPeering", { + "id": args.id, + "name": args.name, + "vpcIds": args.vpcIds, + }, opts); +} + +/** + * A collection of arguments for invoking getVpcPeering. + */ +export interface GetVpcPeeringArgs { + /** + * The unique identifier of an existing VPC Peering. + */ + id?: string; + /** + * The name of an existing VPC Peering. + */ + name?: string; + /** + * The list of VPC IDs involved in the peering. + */ + vpcIds?: string[]; +} + +/** + * A collection of values returned by getVpcPeering. + */ +export interface GetVpcPeeringResult { + /** + * The date and time of when the VPC Peering was created. + */ + readonly createdAt: string; + /** + * The unique identifier for the VPC Peering. + */ + readonly id: string; + /** + * The name of the VPC Peering. + */ + readonly name: string; + /** + * The status of the VPC Peering. + */ + readonly status: string; + /** + * The list of VPC IDs involved in the peering. + */ + readonly vpcIds: string[]; +} +/** + * ## Example Usage + * + * ### VPC Peering By Id + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * id: "example-id", + * }); + * ``` + * + * Reuse the data about a VPC Peering in other resources: + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * id: "example-id", + * }); + * const exampleDroplet = new digitalocean.Droplet("example", { + * name: "example-01", + * size: digitalocean.DropletSlug.DropletS1VCPU1GB, + * image: "ubuntu-18-04-x64", + * region: digitalocean.Region.NYC3, + * vpcUuid: example.then(example => example.vpcIds?.[0]), + * }); + * ``` + * + * ### VPC Peering By Name + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * name: "example-peering", + * }); + * ``` + * + * Reuse the data about a VPC Peering in other resources: + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getVpcPeering({ + * name: "example-peering", + * }); + * const exampleDroplet = new digitalocean.Droplet("example", { + * name: "example-01", + * size: digitalocean.DropletSlug.DropletS1VCPU1GB, + * image: "ubuntu-18-04-x64", + * region: digitalocean.Region.NYC3, + * vpcUuid: example.then(example => example.vpcIds?.[0]), + * }); + * ``` + */ +export function getVpcPeeringOutput(args?: GetVpcPeeringOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getVpcPeering(a, opts)) +} + +/** + * A collection of arguments for invoking getVpcPeering. + */ +export interface GetVpcPeeringOutputArgs { + /** + * The unique identifier of an existing VPC Peering. + */ + id?: pulumi.Input; + /** + * The name of an existing VPC Peering. + */ + name?: pulumi.Input; + /** + * The list of VPC IDs involved in the peering. + */ + vpcIds?: pulumi.Input[]>; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 2cd2388e..f71b7430 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -320,6 +320,11 @@ export const getVpc: typeof import("./getVpc").getVpc = null as any; export const getVpcOutput: typeof import("./getVpc").getVpcOutput = null as any; utilities.lazyLoad(exports, ["getVpc","getVpcOutput"], () => require("./getVpc")); +export { GetVpcPeeringArgs, GetVpcPeeringResult, GetVpcPeeringOutputArgs } from "./getVpcPeering"; +export const getVpcPeering: typeof import("./getVpcPeering").getVpcPeering = null as any; +export const getVpcPeeringOutput: typeof import("./getVpcPeering").getVpcPeeringOutput = null as any; +utilities.lazyLoad(exports, ["getVpcPeering","getVpcPeeringOutput"], () => require("./getVpcPeering")); + export { KubernetesClusterArgs, KubernetesClusterState } from "./kubernetesCluster"; export type KubernetesCluster = import("./kubernetesCluster").KubernetesCluster; export const KubernetesCluster: typeof import("./kubernetesCluster").KubernetesCluster = null as any; @@ -425,6 +430,11 @@ export type Vpc = import("./vpc").Vpc; export const Vpc: typeof import("./vpc").Vpc = null as any; utilities.lazyLoad(exports, ["Vpc"], () => require("./vpc")); +export { VpcPeeringArgs, VpcPeeringState } from "./vpcPeering"; +export type VpcPeering = import("./vpcPeering").VpcPeering; +export const VpcPeering: typeof import("./vpcPeering").VpcPeering = null as any; +utilities.lazyLoad(exports, ["VpcPeering"], () => require("./vpcPeering")); + // Export enums: export * from "./types/enums"; @@ -528,6 +538,8 @@ const _module = { return new VolumeSnapshot(name, undefined, { urn }) case "digitalocean:index/vpc:Vpc": return new Vpc(name, undefined, { urn }) + case "digitalocean:index/vpcPeering:VpcPeering": + return new VpcPeering(name, undefined, { urn }) default: throw new Error(`unknown resource type ${type}`); } @@ -576,6 +588,7 @@ pulumi.runtime.registerResourceModule("digitalocean", "index/volume", _module) pulumi.runtime.registerResourceModule("digitalocean", "index/volumeAttachment", _module) pulumi.runtime.registerResourceModule("digitalocean", "index/volumeSnapshot", _module) pulumi.runtime.registerResourceModule("digitalocean", "index/vpc", _module) +pulumi.runtime.registerResourceModule("digitalocean", "index/vpcPeering", _module) pulumi.runtime.registerResourcePackage("digitalocean", { version: utilities.getVersion(), constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => { diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index c7763b94..c6482869 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -78,6 +78,7 @@ "getVolume.ts", "getVolumeSnapshot.ts", "getVpc.ts", + "getVpcPeering.ts", "index.ts", "kubernetesCluster.ts", "kubernetesNodePool.ts", @@ -104,6 +105,7 @@ "volume.ts", "volumeAttachment.ts", "volumeSnapshot.ts", - "vpc.ts" + "vpc.ts", + "vpcPeering.ts" ] } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 374c681e..59f66697 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -6,6 +6,21 @@ import * as inputs from "../types/input"; import * as outputs from "../types/output"; import * as enums from "../types/enums"; +export interface AppDedicatedIp { + /** + * The ID of the app. + */ + id?: pulumi.Input; + /** + * The IP address of the dedicated egress IP. + */ + ip?: pulumi.Input; + /** + * The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + */ + status?: pulumi.Input; +} + export interface AppSpec { /** * Describes an alert policy for the app. @@ -20,6 +35,10 @@ export interface AppSpec { * @deprecated This attribute has been replaced by `domain` which supports additional functionality. */ domains?: pulumi.Input[]>; + /** + * Specification for app egress configurations. + */ + egresses?: pulumi.Input[]>; /** * Describes an app-wide environment variable made available to all components. */ @@ -113,6 +132,13 @@ export interface AppSpecDomainName { zone?: pulumi.Input; } +export interface AppSpecEgress { + /** + * The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + */ + type?: pulumi.Input; +} + export interface AppSpecEnv { /** * The name of the environment variable. @@ -1723,6 +1749,36 @@ export interface FirewallPendingChange { status?: pulumi.Input; } +export interface GetAppDedicatedIp { + /** + * The ID of the dedicated egress IP. + */ + id?: string; + /** + * The IP address of the dedicated egress IP. + */ + ip?: string; + /** + * The status of the dedicated egress IP. + */ + status?: string; +} + +export interface GetAppDedicatedIpArgs { + /** + * The ID of the dedicated egress IP. + */ + id?: pulumi.Input; + /** + * The IP address of the dedicated egress IP. + */ + ip?: pulumi.Input; + /** + * The status of the dedicated egress IP. + */ + status?: pulumi.Input; +} + export interface GetDomainsFilter { /** * Set to `true` to require that a field match all of the `values` instead of just one or more of @@ -2843,6 +2899,14 @@ export interface LoadBalancerGlbSettings { * CDN configuration supporting the following: */ cdn?: pulumi.Input; + /** + * fail-over threshold + */ + failoverThreshold?: pulumi.Input; + /** + * region priority map + */ + regionPriorities?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. */ diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index f8ea01d6..35364371 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -6,6 +6,21 @@ import * as inputs from "../types/input"; import * as outputs from "../types/output"; import * as enums from "../types/enums"; +export interface AppDedicatedIp { + /** + * The ID of the app. + */ + id: string; + /** + * The IP address of the dedicated egress IP. + */ + ip: string; + /** + * The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + */ + status: string; +} + export interface AppSpec { /** * Describes an alert policy for the app. @@ -20,6 +35,10 @@ export interface AppSpec { * @deprecated This attribute has been replaced by `domain` which supports additional functionality. */ domains: string[]; + /** + * Specification for app egress configurations. + */ + egresses?: outputs.AppSpecEgress[]; /** * Describes an app-wide environment variable made available to all components. */ @@ -113,6 +132,13 @@ export interface AppSpecDomainName { zone?: string; } +export interface AppSpecEgress { + /** + * The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + */ + type?: string; +} + export interface AppSpecEnv { /** * The name of the environment variable. @@ -777,7 +803,7 @@ export interface AppSpecService { /** * A list of ports on which this service will listen for internal traffic. */ - internalPorts?: number[]; + internalPorts: number[]; /** * Describes a log forwarding destination. */ @@ -1723,6 +1749,21 @@ export interface FirewallPendingChange { status?: string; } +export interface GetAppDedicatedIp { + /** + * The ID of the dedicated egress IP. + */ + id: string; + /** + * The IP address of the dedicated egress IP. + */ + ip: string; + /** + * The status of the dedicated egress IP. + */ + status: string; +} + export interface GetAppSpec { /** * Describes an alert policy for the component. @@ -1734,6 +1775,7 @@ export interface GetAppSpec { * @deprecated This attribute has been replaced by `domain` which supports additional functionality. */ domains: string[]; + egresses?: outputs.GetAppSpecEgress[]; /** * Describes an environment variable made available to an app competent. */ @@ -1819,6 +1861,13 @@ export interface GetAppSpecDomain { zone?: string; } +export interface GetAppSpecEgress { + /** + * The type of the environment variable, `GENERAL` or `SECRET`. + */ + type?: string; +} + export interface GetAppSpecEnv { /** * The name of the environment variable. @@ -2450,7 +2499,7 @@ export interface GetAppSpecService { /** * A list of ports on which this service will listen for internal traffic. */ - internalPorts?: number[]; + internalPorts: number[]; /** * Describes a log forwarding destination. */ @@ -3734,6 +3783,14 @@ export interface GetLoadBalancerGlbSetting { * CDN specific configurations */ cdns: outputs.GetLoadBalancerGlbSettingCdn[]; + /** + * fail-over threshold + */ + failoverThreshold: number; + /** + * region priority map + */ + regionPriorities: {[key: string]: number}; /** * target port rules */ @@ -4520,6 +4577,14 @@ export interface LoadBalancerGlbSettings { * CDN configuration supporting the following: */ cdn?: outputs.LoadBalancerGlbSettingsCdn; + /** + * fail-over threshold + */ + failoverThreshold?: number; + /** + * region priority map + */ + regionPriorities?: {[key: string]: number}; /** * An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. */ diff --git a/sdk/nodejs/vpcPeering.ts b/sdk/nodejs/vpcPeering.ts new file mode 100644 index 00000000..d3fd9ac9 --- /dev/null +++ b/sdk/nodejs/vpcPeering.ts @@ -0,0 +1,187 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * Provides a DigitalOcean VPC Peering resource. + * + * VPC Peerings are used to connect two VPC networks allowing resources in each + * VPC to communicate with each other privately. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = new digitalocean.VpcPeering("example", { + * name: "example-peering", + * vpcIds: [ + * vpc1.id, + * vpc2.id, + * ], + * }); + * ``` + * + * ### Resource Assignement + * + * You can use the VPC Peering resource to allow communication between resources + * in different VPCs. For example: + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const vpc1 = new digitalocean.Vpc("vpc1", { + * name: "vpc1", + * region: "nyc3", + * }); + * const vpc2 = new digitalocean.Vpc("vpc2", { + * name: "vpc2", + * region: "nyc3", + * }); + * const example = new digitalocean.VpcPeering("example", { + * name: "example-peering", + * vpcIds: [ + * vpc1.id, + * vpc2.id, + * ], + * }); + * const example1 = new digitalocean.Droplet("example1", { + * name: "example1", + * size: digitalocean.DropletSlug.DropletS1VCPU1GB, + * image: "ubuntu-18-04-x64", + * region: digitalocean.Region.NYC3, + * vpcUuid: vpc1.id, + * }); + * const example2 = new digitalocean.Droplet("example2", { + * name: "example2", + * size: digitalocean.DropletSlug.DropletS1VCPU1GB, + * image: "ubuntu-18-04-x64", + * region: digitalocean.Region.NYC3, + * vpcUuid: vpc2.id, + * }); + * ``` + * + * ## Import + * + * A VPC Peering can be imported using its `id`, e.g. + * + * ```sh + * $ pulumi import digitalocean:index/vpcPeering:VpcPeering example 771ad360-c017-4b4e-a34e-73934f5f0190 + * ``` + */ +export class VpcPeering extends pulumi.CustomResource { + /** + * Get an existing VpcPeering resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: VpcPeeringState, opts?: pulumi.CustomResourceOptions): VpcPeering { + return new VpcPeering(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'digitalocean:index/vpcPeering:VpcPeering'; + + /** + * Returns true if the given object is an instance of VpcPeering. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is VpcPeering { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === VpcPeering.__pulumiType; + } + + /** + * The date and time of when the VPC Peering was created. + */ + public /*out*/ readonly createdAt!: pulumi.Output; + /** + * A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + */ + public readonly name!: pulumi.Output; + /** + * The status of the VPC Peering. + */ + public /*out*/ readonly status!: pulumi.Output; + /** + * A set of two VPC IDs to be peered. + */ + public readonly vpcIds!: pulumi.Output; + + /** + * Create a VpcPeering resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: VpcPeeringArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: VpcPeeringArgs | VpcPeeringState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as VpcPeeringState | undefined; + resourceInputs["createdAt"] = state ? state.createdAt : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["status"] = state ? state.status : undefined; + resourceInputs["vpcIds"] = state ? state.vpcIds : undefined; + } else { + const args = argsOrState as VpcPeeringArgs | undefined; + if ((!args || args.vpcIds === undefined) && !opts.urn) { + throw new Error("Missing required property 'vpcIds'"); + } + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["vpcIds"] = args ? args.vpcIds : undefined; + resourceInputs["createdAt"] = undefined /*out*/; + resourceInputs["status"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(VpcPeering.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering VpcPeering resources. + */ +export interface VpcPeeringState { + /** + * The date and time of when the VPC Peering was created. + */ + createdAt?: pulumi.Input; + /** + * A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + */ + name?: pulumi.Input; + /** + * The status of the VPC Peering. + */ + status?: pulumi.Input; + /** + * A set of two VPC IDs to be peered. + */ + vpcIds?: pulumi.Input[]>; +} + +/** + * The set of arguments for constructing a VpcPeering resource. + */ +export interface VpcPeeringArgs { + /** + * A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + */ + name?: pulumi.Input; + /** + * A set of two VPC IDs to be peered. + */ + vpcIds: pulumi.Input[]>; +} diff --git a/sdk/python/pulumi_digitalocean/__init__.py b/sdk/python/pulumi_digitalocean/__init__.py index a2a23984..a4b78099 100644 --- a/sdk/python/pulumi_digitalocean/__init__.py +++ b/sdk/python/pulumi_digitalocean/__init__.py @@ -69,6 +69,7 @@ from .get_volume import * from .get_volume_snapshot import * from .get_vpc import * +from .get_vpc_peering import * from .kubernetes_cluster import * from .kubernetes_node_pool import * from .load_balancer import * @@ -90,6 +91,7 @@ from .volume_attachment import * from .volume_snapshot import * from .vpc import * +from .vpc_peering import * from ._inputs import * from . import outputs @@ -446,6 +448,14 @@ "classes": { "digitalocean:index/vpc:Vpc": "Vpc" } + }, + { + "pkg": "digitalocean", + "mod": "index/vpcPeering", + "fqn": "pulumi_digitalocean", + "classes": { + "digitalocean:index/vpcPeering:VpcPeering": "VpcPeering" + } } ] """, diff --git a/sdk/python/pulumi_digitalocean/_inputs.py b/sdk/python/pulumi_digitalocean/_inputs.py index f2c8d0a1..987f631d 100644 --- a/sdk/python/pulumi_digitalocean/_inputs.py +++ b/sdk/python/pulumi_digitalocean/_inputs.py @@ -11,10 +11,12 @@ from ._enums import * __all__ = [ + 'AppDedicatedIpArgs', 'AppSpecArgs', 'AppSpecAlertArgs', 'AppSpecDatabaseArgs', 'AppSpecDomainNameArgs', + 'AppSpecEgressArgs', 'AppSpecEnvArgs', 'AppSpecFunctionArgs', 'AppSpecFunctionAlertArgs', @@ -120,6 +122,7 @@ 'SpacesBucketVersioningArgs', 'UptimeAlertNotificationArgs', 'UptimeAlertNotificationSlackArgs', + 'GetAppDedicatedIpArgs', 'GetDomainsFilterArgs', 'GetDomainsSortArgs', 'GetDropletsFilterArgs', @@ -144,6 +147,61 @@ 'GetTagsSortArgs', ] +@pulumi.input_type +class AppDedicatedIpArgs: + def __init__(__self__, *, + id: Optional[pulumi.Input[str]] = None, + ip: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] id: The ID of the app. + :param pulumi.Input[str] ip: The IP address of the dedicated egress IP. + :param pulumi.Input[str] status: The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + """ + if id is not None: + pulumi.set(__self__, "id", id) + if ip is not None: + pulumi.set(__self__, "ip", ip) + if status is not None: + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The ID of the app. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def ip(self) -> Optional[pulumi.Input[str]]: + """ + The IP address of the dedicated egress IP. + """ + return pulumi.get(self, "ip") + + @ip.setter + def ip(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "ip", value) + + @property + @pulumi.getter + def status(self) -> Optional[pulumi.Input[str]]: + """ + The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + """ + return pulumi.get(self, "status") + + @status.setter + def status(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "status", value) + + @pulumi.input_type class AppSpecArgs: def __init__(__self__, *, @@ -152,6 +210,7 @@ def __init__(__self__, *, databases: Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecDatabaseArgs']]]] = None, domain_names: Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecDomainNameArgs']]]] = None, domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + egresses: Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecEgressArgs']]]] = None, envs: Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecEnvArgs']]]] = None, features: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, functions: Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecFunctionArgs']]]] = None, @@ -165,6 +224,7 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the app. Must be unique across all apps in the same account. :param pulumi.Input[Sequence[pulumi.Input['AppSpecAlertArgs']]] alerts: Describes an alert policy for the app. :param pulumi.Input[Sequence[pulumi.Input['AppSpecDomainNameArgs']]] domain_names: Describes a domain where the application will be made available. + :param pulumi.Input[Sequence[pulumi.Input['AppSpecEgressArgs']]] egresses: Specification for app egress configurations. :param pulumi.Input[Sequence[pulumi.Input['AppSpecEnvArgs']]] envs: Describes an app-wide environment variable made available to all components. :param pulumi.Input[Sequence[pulumi.Input[str]]] features: A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/) :param pulumi.Input['AppSpecIngressArgs'] ingress: Specification for component routing, rewrites, and redirects. @@ -182,6 +242,8 @@ def __init__(__self__, *, pulumi.log.warn("""domains is deprecated: This attribute has been replaced by `domain` which supports additional functionality.""") if domains is not None: pulumi.set(__self__, "domains", domains) + if egresses is not None: + pulumi.set(__self__, "egresses", egresses) if envs is not None: pulumi.set(__self__, "envs", envs) if features is not None: @@ -258,6 +320,18 @@ def domains(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: def domains(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "domains", value) + @property + @pulumi.getter + def egresses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecEgressArgs']]]]: + """ + Specification for app egress configurations. + """ + return pulumi.get(self, "egresses") + + @egresses.setter + def egresses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecEgressArgs']]]]): + pulumi.set(self, "egresses", value) + @property @pulumi.getter def envs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AppSpecEnvArgs']]]]: @@ -589,6 +663,29 @@ def zone(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "zone", value) +@pulumi.input_type +class AppSpecEgressArgs: + def __init__(__self__, *, + type: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] type: The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + """ + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def type(self) -> Optional[pulumi.Input[str]]: + """ + The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "type", value) + + @pulumi.input_type class AppSpecEnvArgs: def __init__(__self__, *, @@ -7522,16 +7619,24 @@ class LoadBalancerGlbSettingsArgs: def __init__(__self__, *, target_port: pulumi.Input[int], target_protocol: pulumi.Input[str], - cdn: Optional[pulumi.Input['LoadBalancerGlbSettingsCdnArgs']] = None): + cdn: Optional[pulumi.Input['LoadBalancerGlbSettingsCdnArgs']] = None, + failover_threshold: Optional[pulumi.Input[int]] = None, + region_priorities: Optional[pulumi.Input[Mapping[str, pulumi.Input[int]]]] = None): """ :param pulumi.Input[int] target_port: An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. :param pulumi.Input[str] target_protocol: The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: `http` and `https`. :param pulumi.Input['LoadBalancerGlbSettingsCdnArgs'] cdn: CDN configuration supporting the following: + :param pulumi.Input[int] failover_threshold: fail-over threshold + :param pulumi.Input[Mapping[str, pulumi.Input[int]]] region_priorities: region priority map """ pulumi.set(__self__, "target_port", target_port) pulumi.set(__self__, "target_protocol", target_protocol) if cdn is not None: pulumi.set(__self__, "cdn", cdn) + if failover_threshold is not None: + pulumi.set(__self__, "failover_threshold", failover_threshold) + if region_priorities is not None: + pulumi.set(__self__, "region_priorities", region_priorities) @property @pulumi.getter(name="targetPort") @@ -7569,6 +7674,30 @@ def cdn(self) -> Optional[pulumi.Input['LoadBalancerGlbSettingsCdnArgs']]: def cdn(self, value: Optional[pulumi.Input['LoadBalancerGlbSettingsCdnArgs']]): pulumi.set(self, "cdn", value) + @property + @pulumi.getter(name="failoverThreshold") + def failover_threshold(self) -> Optional[pulumi.Input[int]]: + """ + fail-over threshold + """ + return pulumi.get(self, "failover_threshold") + + @failover_threshold.setter + def failover_threshold(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "failover_threshold", value) + + @property + @pulumi.getter(name="regionPriorities") + def region_priorities(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[int]]]]: + """ + region priority map + """ + return pulumi.get(self, "region_priorities") + + @region_priorities.setter + def region_priorities(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[int]]]]): + pulumi.set(self, "region_priorities", value) + @pulumi.input_type class LoadBalancerGlbSettingsCdnArgs: @@ -8294,6 +8423,58 @@ def url(self, value: pulumi.Input[str]): pulumi.set(self, "url", value) +@pulumi.input_type +class GetAppDedicatedIpArgs: + def __init__(__self__, *, + id: str, + ip: str, + status: str): + """ + :param str id: The ID of the dedicated egress IP. + :param str ip: The IP address of the dedicated egress IP. + :param str status: The status of the dedicated egress IP. + """ + pulumi.set(__self__, "id", id) + pulumi.set(__self__, "ip", ip) + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter + def id(self) -> str: + """ + The ID of the dedicated egress IP. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: str): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def ip(self) -> str: + """ + The IP address of the dedicated egress IP. + """ + return pulumi.get(self, "ip") + + @ip.setter + def ip(self, value: str): + pulumi.set(self, "ip", value) + + @property + @pulumi.getter + def status(self) -> str: + """ + The status of the dedicated egress IP. + """ + return pulumi.get(self, "status") + + @status.setter + def status(self, value: str): + pulumi.set(self, "status", value) + + @pulumi.input_type class GetDomainsFilterArgs: def __init__(__self__, *, diff --git a/sdk/python/pulumi_digitalocean/app.py b/sdk/python/pulumi_digitalocean/app.py index a27bf7e7..01a1a799 100644 --- a/sdk/python/pulumi_digitalocean/app.py +++ b/sdk/python/pulumi_digitalocean/app.py @@ -16,10 +16,12 @@ @pulumi.input_type class AppArgs: def __init__(__self__, *, + dedicated_ips: Optional[pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]]] = None, project_id: Optional[pulumi.Input[str]] = None, spec: Optional[pulumi.Input['AppSpecArgs']] = None): """ The set of arguments for constructing a App resource. + :param pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]] dedicated_ips: The dedicated egress IP addresses associated with the app. :param pulumi.Input[str] project_id: The ID of the project that the app is assigned to. A spec can contain multiple components. @@ -27,11 +29,25 @@ def __init__(__self__, *, A `service` can contain: :param pulumi.Input['AppSpecArgs'] spec: A DigitalOcean App spec describing the app. """ + if dedicated_ips is not None: + pulumi.set(__self__, "dedicated_ips", dedicated_ips) if project_id is not None: pulumi.set(__self__, "project_id", project_id) if spec is not None: pulumi.set(__self__, "spec", spec) + @property + @pulumi.getter(name="dedicatedIps") + def dedicated_ips(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]]]: + """ + The dedicated egress IP addresses associated with the app. + """ + return pulumi.get(self, "dedicated_ips") + + @dedicated_ips.setter + def dedicated_ips(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]]]): + pulumi.set(self, "dedicated_ips", value) + @property @pulumi.getter(name="projectId") def project_id(self) -> Optional[pulumi.Input[str]]: @@ -67,6 +83,7 @@ def __init__(__self__, *, active_deployment_id: Optional[pulumi.Input[str]] = None, app_urn: Optional[pulumi.Input[str]] = None, created_at: Optional[pulumi.Input[str]] = None, + dedicated_ips: Optional[pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]]] = None, default_ingress: Optional[pulumi.Input[str]] = None, live_url: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[str]] = None, @@ -77,6 +94,7 @@ def __init__(__self__, *, :param pulumi.Input[str] active_deployment_id: The ID the app's currently active deployment. :param pulumi.Input[str] app_urn: The uniform resource identifier for the app. :param pulumi.Input[str] created_at: The date and time of when the app was created. + :param pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]] dedicated_ips: The dedicated egress IP addresses associated with the app. :param pulumi.Input[str] default_ingress: The default URL to access the app. :param pulumi.Input[str] live_url: The live URL of the app. :param pulumi.Input[str] project_id: The ID of the project that the app is assigned to. @@ -93,6 +111,8 @@ def __init__(__self__, *, pulumi.set(__self__, "app_urn", app_urn) if created_at is not None: pulumi.set(__self__, "created_at", created_at) + if dedicated_ips is not None: + pulumi.set(__self__, "dedicated_ips", dedicated_ips) if default_ingress is not None: pulumi.set(__self__, "default_ingress", default_ingress) if live_url is not None: @@ -140,6 +160,18 @@ def created_at(self) -> Optional[pulumi.Input[str]]: def created_at(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "created_at", value) + @property + @pulumi.getter(name="dedicatedIps") + def dedicated_ips(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]]]: + """ + The dedicated egress IP addresses associated with the app. + """ + return pulumi.get(self, "dedicated_ips") + + @dedicated_ips.setter + def dedicated_ips(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AppDedicatedIpArgs']]]]): + pulumi.set(self, "dedicated_ips", value) + @property @pulumi.getter(name="defaultIngress") def default_ingress(self) -> Optional[pulumi.Input[str]]: @@ -210,6 +242,7 @@ class App(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + dedicated_ips: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AppDedicatedIpArgs']]]]] = None, project_id: Optional[pulumi.Input[str]] = None, spec: Optional[pulumi.Input[pulumi.InputType['AppSpecArgs']]] = None, __props__=None): @@ -273,6 +306,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AppDedicatedIpArgs']]]] dedicated_ips: The dedicated egress IP addresses associated with the app. :param pulumi.Input[str] project_id: The ID of the project that the app is assigned to. A spec can contain multiple components. @@ -359,6 +393,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + dedicated_ips: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AppDedicatedIpArgs']]]]] = None, project_id: Optional[pulumi.Input[str]] = None, spec: Optional[pulumi.Input[pulumi.InputType['AppSpecArgs']]] = None, __props__=None): @@ -370,6 +405,7 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AppArgs.__new__(AppArgs) + __props__.__dict__["dedicated_ips"] = dedicated_ips __props__.__dict__["project_id"] = project_id __props__.__dict__["spec"] = spec __props__.__dict__["active_deployment_id"] = None @@ -391,6 +427,7 @@ def get(resource_name: str, active_deployment_id: Optional[pulumi.Input[str]] = None, app_urn: Optional[pulumi.Input[str]] = None, created_at: Optional[pulumi.Input[str]] = None, + dedicated_ips: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AppDedicatedIpArgs']]]]] = None, default_ingress: Optional[pulumi.Input[str]] = None, live_url: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[str]] = None, @@ -406,6 +443,7 @@ def get(resource_name: str, :param pulumi.Input[str] active_deployment_id: The ID the app's currently active deployment. :param pulumi.Input[str] app_urn: The uniform resource identifier for the app. :param pulumi.Input[str] created_at: The date and time of when the app was created. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AppDedicatedIpArgs']]]] dedicated_ips: The dedicated egress IP addresses associated with the app. :param pulumi.Input[str] default_ingress: The default URL to access the app. :param pulumi.Input[str] live_url: The live URL of the app. :param pulumi.Input[str] project_id: The ID of the project that the app is assigned to. @@ -423,6 +461,7 @@ def get(resource_name: str, __props__.__dict__["active_deployment_id"] = active_deployment_id __props__.__dict__["app_urn"] = app_urn __props__.__dict__["created_at"] = created_at + __props__.__dict__["dedicated_ips"] = dedicated_ips __props__.__dict__["default_ingress"] = default_ingress __props__.__dict__["live_url"] = live_url __props__.__dict__["project_id"] = project_id @@ -454,6 +493,14 @@ def created_at(self) -> pulumi.Output[str]: """ return pulumi.get(self, "created_at") + @property + @pulumi.getter(name="dedicatedIps") + def dedicated_ips(self) -> pulumi.Output[Sequence['outputs.AppDedicatedIp']]: + """ + The dedicated egress IP addresses associated with the app. + """ + return pulumi.get(self, "dedicated_ips") + @property @pulumi.getter(name="defaultIngress") def default_ingress(self) -> pulumi.Output[str]: diff --git a/sdk/python/pulumi_digitalocean/get_app.py b/sdk/python/pulumi_digitalocean/get_app.py index 53a508cb..77258a5b 100644 --- a/sdk/python/pulumi_digitalocean/get_app.py +++ b/sdk/python/pulumi_digitalocean/get_app.py @@ -9,6 +9,7 @@ from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs +from ._inputs import * __all__ = [ 'GetAppResult', @@ -22,7 +23,7 @@ class GetAppResult: """ A collection of values returned by getApp. """ - def __init__(__self__, active_deployment_id=None, app_id=None, created_at=None, default_ingress=None, id=None, live_url=None, project_id=None, specs=None, updated_at=None, urn=None): + def __init__(__self__, active_deployment_id=None, app_id=None, created_at=None, dedicated_ips=None, default_ingress=None, id=None, live_url=None, project_id=None, specs=None, updated_at=None, urn=None): if active_deployment_id and not isinstance(active_deployment_id, str): raise TypeError("Expected argument 'active_deployment_id' to be a str") pulumi.set(__self__, "active_deployment_id", active_deployment_id) @@ -32,6 +33,9 @@ def __init__(__self__, active_deployment_id=None, app_id=None, created_at=None, if created_at and not isinstance(created_at, str): raise TypeError("Expected argument 'created_at' to be a str") pulumi.set(__self__, "created_at", created_at) + if dedicated_ips and not isinstance(dedicated_ips, list): + raise TypeError("Expected argument 'dedicated_ips' to be a list") + pulumi.set(__self__, "dedicated_ips", dedicated_ips) if default_ingress and not isinstance(default_ingress, str): raise TypeError("Expected argument 'default_ingress' to be a str") pulumi.set(__self__, "default_ingress", default_ingress) @@ -75,6 +79,14 @@ def created_at(self) -> str: """ return pulumi.get(self, "created_at") + @property + @pulumi.getter(name="dedicatedIps") + def dedicated_ips(self) -> Sequence['outputs.GetAppDedicatedIpResult']: + """ + A list of dedicated egress IP addresses associated with the app. + """ + return pulumi.get(self, "dedicated_ips") + @property @pulumi.getter(name="defaultIngress") def default_ingress(self) -> str: @@ -141,6 +153,7 @@ def __await__(self): active_deployment_id=self.active_deployment_id, app_id=self.app_id, created_at=self.created_at, + dedicated_ips=self.dedicated_ips, default_ingress=self.default_ingress, id=self.id, live_url=self.live_url, @@ -151,6 +164,7 @@ def __await__(self): def get_app(app_id: Optional[str] = None, + dedicated_ips: Optional[Sequence[pulumi.InputType['GetAppDedicatedIpArgs']]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAppResult: """ Get information on a DigitalOcean App. @@ -169,9 +183,11 @@ def get_app(app_id: Optional[str] = None, :param str app_id: The ID of the app to retrieve information about. + :param Sequence[pulumi.InputType['GetAppDedicatedIpArgs']] dedicated_ips: A list of dedicated egress IP addresses associated with the app. """ __args__ = dict() __args__['appId'] = app_id + __args__['dedicatedIps'] = dedicated_ips opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) __ret__ = pulumi.runtime.invoke('digitalocean:index/getApp:getApp', __args__, opts=opts, typ=GetAppResult).value @@ -179,6 +195,7 @@ def get_app(app_id: Optional[str] = None, active_deployment_id=pulumi.get(__ret__, 'active_deployment_id'), app_id=pulumi.get(__ret__, 'app_id'), created_at=pulumi.get(__ret__, 'created_at'), + dedicated_ips=pulumi.get(__ret__, 'dedicated_ips'), default_ingress=pulumi.get(__ret__, 'default_ingress'), id=pulumi.get(__ret__, 'id'), live_url=pulumi.get(__ret__, 'live_url'), @@ -190,6 +207,7 @@ def get_app(app_id: Optional[str] = None, @_utilities.lift_output_func(get_app) def get_app_output(app_id: Optional[pulumi.Input[str]] = None, + dedicated_ips: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetAppDedicatedIpArgs']]]]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAppResult]: """ Get information on a DigitalOcean App. @@ -208,5 +226,6 @@ def get_app_output(app_id: Optional[pulumi.Input[str]] = None, :param str app_id: The ID of the app to retrieve information about. + :param Sequence[pulumi.InputType['GetAppDedicatedIpArgs']] dedicated_ips: A list of dedicated egress IP addresses associated with the app. """ ... diff --git a/sdk/python/pulumi_digitalocean/get_vpc_peering.py b/sdk/python/pulumi_digitalocean/get_vpc_peering.py new file mode 100644 index 00000000..14e55f1c --- /dev/null +++ b/sdk/python/pulumi_digitalocean/get_vpc_peering.py @@ -0,0 +1,231 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = [ + 'GetVpcPeeringResult', + 'AwaitableGetVpcPeeringResult', + 'get_vpc_peering', + 'get_vpc_peering_output', +] + +@pulumi.output_type +class GetVpcPeeringResult: + """ + A collection of values returned by getVpcPeering. + """ + def __init__(__self__, created_at=None, id=None, name=None, status=None, vpc_ids=None): + if created_at and not isinstance(created_at, str): + raise TypeError("Expected argument 'created_at' to be a str") + pulumi.set(__self__, "created_at", created_at) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if name and not isinstance(name, str): + raise TypeError("Expected argument 'name' to be a str") + pulumi.set(__self__, "name", name) + if status and not isinstance(status, str): + raise TypeError("Expected argument 'status' to be a str") + pulumi.set(__self__, "status", status) + if vpc_ids and not isinstance(vpc_ids, list): + raise TypeError("Expected argument 'vpc_ids' to be a list") + pulumi.set(__self__, "vpc_ids", vpc_ids) + + @property + @pulumi.getter(name="createdAt") + def created_at(self) -> str: + """ + The date and time of when the VPC Peering was created. + """ + return pulumi.get(self, "created_at") + + @property + @pulumi.getter + def id(self) -> str: + """ + The unique identifier for the VPC Peering. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def name(self) -> str: + """ + The name of the VPC Peering. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def status(self) -> str: + """ + The status of the VPC Peering. + """ + return pulumi.get(self, "status") + + @property + @pulumi.getter(name="vpcIds") + def vpc_ids(self) -> Sequence[str]: + """ + The list of VPC IDs involved in the peering. + """ + return pulumi.get(self, "vpc_ids") + + +class AwaitableGetVpcPeeringResult(GetVpcPeeringResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetVpcPeeringResult( + created_at=self.created_at, + id=self.id, + name=self.name, + status=self.status, + vpc_ids=self.vpc_ids) + + +def get_vpc_peering(id: Optional[str] = None, + name: Optional[str] = None, + vpc_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVpcPeeringResult: + """ + ## Example Usage + + ### VPC Peering By Id + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(id="example-id") + ``` + + Reuse the data about a VPC Peering in other resources: + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(id="example-id") + example_droplet = digitalocean.Droplet("example", + name="example-01", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=example.vpc_ids[0]) + ``` + + ### VPC Peering By Name + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(name="example-peering") + ``` + + Reuse the data about a VPC Peering in other resources: + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(name="example-peering") + example_droplet = digitalocean.Droplet("example", + name="example-01", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=example.vpc_ids[0]) + ``` + + + :param str id: The unique identifier of an existing VPC Peering. + :param str name: The name of an existing VPC Peering. + :param Sequence[str] vpc_ids: The list of VPC IDs involved in the peering. + """ + __args__ = dict() + __args__['id'] = id + __args__['name'] = name + __args__['vpcIds'] = vpc_ids + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('digitalocean:index/getVpcPeering:getVpcPeering', __args__, opts=opts, typ=GetVpcPeeringResult).value + + return AwaitableGetVpcPeeringResult( + created_at=pulumi.get(__ret__, 'created_at'), + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name'), + status=pulumi.get(__ret__, 'status'), + vpc_ids=pulumi.get(__ret__, 'vpc_ids')) + + +@_utilities.lift_output_func(get_vpc_peering) +def get_vpc_peering_output(id: Optional[pulumi.Input[Optional[str]]] = None, + name: Optional[pulumi.Input[Optional[str]]] = None, + vpc_ids: Optional[pulumi.Input[Optional[Sequence[str]]]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetVpcPeeringResult]: + """ + ## Example Usage + + ### VPC Peering By Id + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(id="example-id") + ``` + + Reuse the data about a VPC Peering in other resources: + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(id="example-id") + example_droplet = digitalocean.Droplet("example", + name="example-01", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=example.vpc_ids[0]) + ``` + + ### VPC Peering By Name + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(name="example-peering") + ``` + + Reuse the data about a VPC Peering in other resources: + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_vpc_peering(name="example-peering") + example_droplet = digitalocean.Droplet("example", + name="example-01", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=example.vpc_ids[0]) + ``` + + + :param str id: The unique identifier of an existing VPC Peering. + :param str name: The name of an existing VPC Peering. + :param Sequence[str] vpc_ids: The list of VPC IDs involved in the peering. + """ + ... diff --git a/sdk/python/pulumi_digitalocean/outputs.py b/sdk/python/pulumi_digitalocean/outputs.py index e4cb53fc..7e145a15 100644 --- a/sdk/python/pulumi_digitalocean/outputs.py +++ b/sdk/python/pulumi_digitalocean/outputs.py @@ -12,10 +12,12 @@ from ._enums import * __all__ = [ + 'AppDedicatedIp', 'AppSpec', 'AppSpecAlert', 'AppSpecDatabase', 'AppSpecDomainName', + 'AppSpecEgress', 'AppSpecEnv', 'AppSpecFunction', 'AppSpecFunctionAlert', @@ -121,10 +123,12 @@ 'SpacesBucketVersioning', 'UptimeAlertNotification', 'UptimeAlertNotificationSlack', + 'GetAppDedicatedIpResult', 'GetAppSpecResult', 'GetAppSpecAlertResult', 'GetAppSpecDatabaseResult', 'GetAppSpecDomainResult', + 'GetAppSpecEgressResult', 'GetAppSpecEnvResult', 'GetAppSpecFunctionResult', 'GetAppSpecFunctionAlertResult', @@ -245,6 +249,49 @@ 'GetTagsTagResult', ] +@pulumi.output_type +class AppDedicatedIp(dict): + def __init__(__self__, *, + id: Optional[str] = None, + ip: Optional[str] = None, + status: Optional[str] = None): + """ + :param str id: The ID of the app. + :param str ip: The IP address of the dedicated egress IP. + :param str status: The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + """ + if id is not None: + pulumi.set(__self__, "id", id) + if ip is not None: + pulumi.set(__self__, "ip", ip) + if status is not None: + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The ID of the app. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def ip(self) -> Optional[str]: + """ + The IP address of the dedicated egress IP. + """ + return pulumi.get(self, "ip") + + @property + @pulumi.getter + def status(self) -> Optional[str]: + """ + The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' + """ + return pulumi.get(self, "status") + + @pulumi.output_type class AppSpec(dict): @staticmethod @@ -272,6 +319,7 @@ def __init__(__self__, *, databases: Optional[Sequence['outputs.AppSpecDatabase']] = None, domain_names: Optional[Sequence['outputs.AppSpecDomainName']] = None, domains: Optional[Sequence[str]] = None, + egresses: Optional[Sequence['outputs.AppSpecEgress']] = None, envs: Optional[Sequence['outputs.AppSpecEnv']] = None, features: Optional[Sequence[str]] = None, functions: Optional[Sequence['outputs.AppSpecFunction']] = None, @@ -285,6 +333,7 @@ def __init__(__self__, *, :param str name: The name of the app. Must be unique across all apps in the same account. :param Sequence['AppSpecAlertArgs'] alerts: Describes an alert policy for the app. :param Sequence['AppSpecDomainNameArgs'] domain_names: Describes a domain where the application will be made available. + :param Sequence['AppSpecEgressArgs'] egresses: Specification for app egress configurations. :param Sequence['AppSpecEnvArgs'] envs: Describes an app-wide environment variable made available to all components. :param Sequence[str] features: A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/) :param 'AppSpecIngressArgs' ingress: Specification for component routing, rewrites, and redirects. @@ -299,6 +348,8 @@ def __init__(__self__, *, pulumi.set(__self__, "domain_names", domain_names) if domains is not None: pulumi.set(__self__, "domains", domains) + if egresses is not None: + pulumi.set(__self__, "egresses", egresses) if envs is not None: pulumi.set(__self__, "envs", envs) if features is not None: @@ -355,6 +406,14 @@ def domains(self) -> Optional[Sequence[str]]: return pulumi.get(self, "domains") + @property + @pulumi.getter + def egresses(self) -> Optional[Sequence['outputs.AppSpecEgress']]: + """ + Specification for app egress configurations. + """ + return pulumi.get(self, "egresses") + @property @pulumi.getter def envs(self) -> Optional[Sequence['outputs.AppSpecEnv']]: @@ -619,6 +678,25 @@ def zone(self) -> Optional[str]: return pulumi.get(self, "zone") +@pulumi.output_type +class AppSpecEgress(dict): + def __init__(__self__, *, + type: Optional[str] = None): + """ + :param str type: The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + """ + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def type(self) -> Optional[str]: + """ + The app egress type: `AUTOASSIGN`, `DEDICATED_IP` + """ + return pulumi.get(self, "type") + + @pulumi.output_type class AppSpecEnv(dict): def __init__(__self__, *, @@ -7078,6 +7156,10 @@ def __key_warning(key: str): suggest = "target_port" elif key == "targetProtocol": suggest = "target_protocol" + elif key == "failoverThreshold": + suggest = "failover_threshold" + elif key == "regionPriorities": + suggest = "region_priorities" if suggest: pulumi.log.warn(f"Key '{key}' not found in LoadBalancerGlbSettings. Access the value via the '{suggest}' property getter instead.") @@ -7093,16 +7175,24 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, target_port: int, target_protocol: str, - cdn: Optional['outputs.LoadBalancerGlbSettingsCdn'] = None): + cdn: Optional['outputs.LoadBalancerGlbSettingsCdn'] = None, + failover_threshold: Optional[int] = None, + region_priorities: Optional[Mapping[str, int]] = None): """ :param int target_port: An integer representing the port on the backend Droplets to which the Load Balancer will send traffic. The possible values are: `80` for `http` and `443` for `https`. :param str target_protocol: The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: `http` and `https`. :param 'LoadBalancerGlbSettingsCdnArgs' cdn: CDN configuration supporting the following: + :param int failover_threshold: fail-over threshold + :param Mapping[str, int] region_priorities: region priority map """ pulumi.set(__self__, "target_port", target_port) pulumi.set(__self__, "target_protocol", target_protocol) if cdn is not None: pulumi.set(__self__, "cdn", cdn) + if failover_threshold is not None: + pulumi.set(__self__, "failover_threshold", failover_threshold) + if region_priorities is not None: + pulumi.set(__self__, "region_priorities", region_priorities) @property @pulumi.getter(name="targetPort") @@ -7128,6 +7218,22 @@ def cdn(self) -> Optional['outputs.LoadBalancerGlbSettingsCdn']: """ return pulumi.get(self, "cdn") + @property + @pulumi.getter(name="failoverThreshold") + def failover_threshold(self) -> Optional[int]: + """ + fail-over threshold + """ + return pulumi.get(self, "failover_threshold") + + @property + @pulumi.getter(name="regionPriorities") + def region_priorities(self) -> Optional[Mapping[str, int]]: + """ + region priority map + """ + return pulumi.get(self, "region_priorities") + @pulumi.output_type class LoadBalancerGlbSettingsCdn(dict): @@ -7836,6 +7942,46 @@ def url(self) -> str: return pulumi.get(self, "url") +@pulumi.output_type +class GetAppDedicatedIpResult(dict): + def __init__(__self__, *, + id: str, + ip: str, + status: str): + """ + :param str id: The ID of the dedicated egress IP. + :param str ip: The IP address of the dedicated egress IP. + :param str status: The status of the dedicated egress IP. + """ + pulumi.set(__self__, "id", id) + pulumi.set(__self__, "ip", ip) + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter + def id(self) -> str: + """ + The ID of the dedicated egress IP. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def ip(self) -> str: + """ + The IP address of the dedicated egress IP. + """ + return pulumi.get(self, "ip") + + @property + @pulumi.getter + def status(self) -> str: + """ + The status of the dedicated egress IP. + """ + return pulumi.get(self, "status") + + @pulumi.output_type class GetAppSpecResult(dict): def __init__(__self__, *, @@ -7845,6 +7991,7 @@ def __init__(__self__, *, name: str, alerts: Optional[Sequence['outputs.GetAppSpecAlertResult']] = None, databases: Optional[Sequence['outputs.GetAppSpecDatabaseResult']] = None, + egresses: Optional[Sequence['outputs.GetAppSpecEgressResult']] = None, envs: Optional[Sequence['outputs.GetAppSpecEnvResult']] = None, features: Optional[Sequence[str]] = None, functions: Optional[Sequence['outputs.GetAppSpecFunctionResult']] = None, @@ -7868,6 +8015,8 @@ def __init__(__self__, *, pulumi.set(__self__, "alerts", alerts) if databases is not None: pulumi.set(__self__, "databases", databases) + if egresses is not None: + pulumi.set(__self__, "egresses", egresses) if envs is not None: pulumi.set(__self__, "envs", envs) if features is not None: @@ -7924,6 +8073,11 @@ def alerts(self) -> Optional[Sequence['outputs.GetAppSpecAlertResult']]: def databases(self) -> Optional[Sequence['outputs.GetAppSpecDatabaseResult']]: return pulumi.get(self, "databases") + @property + @pulumi.getter + def egresses(self) -> Optional[Sequence['outputs.GetAppSpecEgressResult']]: + return pulumi.get(self, "egresses") + @property @pulumi.getter def envs(self) -> Optional[Sequence['outputs.GetAppSpecEnvResult']]: @@ -8147,6 +8301,25 @@ def zone(self) -> Optional[str]: return pulumi.get(self, "zone") +@pulumi.output_type +class GetAppSpecEgressResult(dict): + def __init__(__self__, *, + type: Optional[str] = None): + """ + :param str type: The type of the environment variable, `GENERAL` or `SECRET`. + """ + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def type(self) -> Optional[str]: + """ + The type of the environment variable, `GENERAL` or `SECRET`. + """ + return pulumi.get(self, "type") + + @pulumi.output_type class GetAppSpecEnvResult(dict): def __init__(__self__, *, @@ -9791,6 +9964,7 @@ def endpoint(self) -> str: class GetAppSpecServiceResult(dict): def __init__(__self__, *, http_port: int, + internal_ports: Sequence[int], name: str, routes: Sequence['outputs.GetAppSpecServiceRouteResult'], run_command: str, @@ -9807,11 +9981,11 @@ def __init__(__self__, *, image: Optional['outputs.GetAppSpecServiceImageResult'] = None, instance_count: Optional[int] = None, instance_size_slug: Optional[str] = None, - internal_ports: Optional[Sequence[int]] = None, log_destinations: Optional[Sequence['outputs.GetAppSpecServiceLogDestinationResult']] = None, source_dir: Optional[str] = None): """ :param int http_port: The internal port on which this service's run command will listen. + :param Sequence[int] internal_ports: A list of ports on which this service will listen for internal traffic. :param str name: The name of the component. :param str run_command: An optional run command to override the component's default. :param Sequence['GetAppSpecServiceAlertArgs'] alerts: Describes an alert policy for the component. @@ -9827,11 +10001,11 @@ def __init__(__self__, *, :param 'GetAppSpecServiceImageArgs' image: An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set. :param int instance_count: The amount of instances that this component should be scaled to. :param str instance_size_slug: The instance size to use for this component. - :param Sequence[int] internal_ports: A list of ports on which this service will listen for internal traffic. :param Sequence['GetAppSpecServiceLogDestinationArgs'] log_destinations: Describes a log forwarding destination. :param str source_dir: An optional path to the working directory to use for the build. """ pulumi.set(__self__, "http_port", http_port) + pulumi.set(__self__, "internal_ports", internal_ports) pulumi.set(__self__, "name", name) pulumi.set(__self__, "routes", routes) pulumi.set(__self__, "run_command", run_command) @@ -9861,8 +10035,6 @@ def __init__(__self__, *, pulumi.set(__self__, "instance_count", instance_count) if instance_size_slug is not None: pulumi.set(__self__, "instance_size_slug", instance_size_slug) - if internal_ports is not None: - pulumi.set(__self__, "internal_ports", internal_ports) if log_destinations is not None: pulumi.set(__self__, "log_destinations", log_destinations) if source_dir is not None: @@ -9876,6 +10048,14 @@ def http_port(self) -> int: """ return pulumi.get(self, "http_port") + @property + @pulumi.getter(name="internalPorts") + def internal_ports(self) -> Sequence[int]: + """ + A list of ports on which this service will listen for internal traffic. + """ + return pulumi.get(self, "internal_ports") + @property @pulumi.getter def name(self) -> str: @@ -10007,14 +10187,6 @@ def instance_size_slug(self) -> Optional[str]: """ return pulumi.get(self, "instance_size_slug") - @property - @pulumi.getter(name="internalPorts") - def internal_ports(self) -> Optional[Sequence[int]]: - """ - A list of ports on which this service will listen for internal traffic. - """ - return pulumi.get(self, "internal_ports") - @property @pulumi.getter(name="logDestinations") def log_destinations(self) -> Optional[Sequence['outputs.GetAppSpecServiceLogDestinationResult']]: @@ -13545,14 +13717,20 @@ def tls_passthrough(self) -> bool: class GetLoadBalancerGlbSettingResult(dict): def __init__(__self__, *, cdns: Sequence['outputs.GetLoadBalancerGlbSettingCdnResult'], + failover_threshold: int, + region_priorities: Mapping[str, int], target_port: int, target_protocol: str): """ :param Sequence['GetLoadBalancerGlbSettingCdnArgs'] cdns: CDN specific configurations + :param int failover_threshold: fail-over threshold + :param Mapping[str, int] region_priorities: region priority map :param int target_port: target port rules :param str target_protocol: target protocol rules """ pulumi.set(__self__, "cdns", cdns) + pulumi.set(__self__, "failover_threshold", failover_threshold) + pulumi.set(__self__, "region_priorities", region_priorities) pulumi.set(__self__, "target_port", target_port) pulumi.set(__self__, "target_protocol", target_protocol) @@ -13564,6 +13742,22 @@ def cdns(self) -> Sequence['outputs.GetLoadBalancerGlbSettingCdnResult']: """ return pulumi.get(self, "cdns") + @property + @pulumi.getter(name="failoverThreshold") + def failover_threshold(self) -> int: + """ + fail-over threshold + """ + return pulumi.get(self, "failover_threshold") + + @property + @pulumi.getter(name="regionPriorities") + def region_priorities(self) -> Mapping[str, int]: + """ + region priority map + """ + return pulumi.get(self, "region_priorities") + @property @pulumi.getter(name="targetPort") def target_port(self) -> int: diff --git a/sdk/python/pulumi_digitalocean/vpc_peering.py b/sdk/python/pulumi_digitalocean/vpc_peering.py new file mode 100644 index 00000000..a9d98783 --- /dev/null +++ b/sdk/python/pulumi_digitalocean/vpc_peering.py @@ -0,0 +1,369 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = ['VpcPeeringArgs', 'VpcPeering'] + +@pulumi.input_type +class VpcPeeringArgs: + def __init__(__self__, *, + vpc_ids: pulumi.Input[Sequence[pulumi.Input[str]]], + name: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a VpcPeering resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_ids: A set of two VPC IDs to be peered. + :param pulumi.Input[str] name: A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + """ + pulumi.set(__self__, "vpc_ids", vpc_ids) + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter(name="vpcIds") + def vpc_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + A set of two VPC IDs to be peered. + """ + return pulumi.get(self, "vpc_ids") + + @vpc_ids.setter + def vpc_ids(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "vpc_ids", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + +@pulumi.input_type +class _VpcPeeringState: + def __init__(__self__, *, + created_at: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + vpc_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + Input properties used for looking up and filtering VpcPeering resources. + :param pulumi.Input[str] created_at: The date and time of when the VPC Peering was created. + :param pulumi.Input[str] name: A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + :param pulumi.Input[str] status: The status of the VPC Peering. + :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_ids: A set of two VPC IDs to be peered. + """ + if created_at is not None: + pulumi.set(__self__, "created_at", created_at) + if name is not None: + pulumi.set(__self__, "name", name) + if status is not None: + pulumi.set(__self__, "status", status) + if vpc_ids is not None: + pulumi.set(__self__, "vpc_ids", vpc_ids) + + @property + @pulumi.getter(name="createdAt") + def created_at(self) -> Optional[pulumi.Input[str]]: + """ + The date and time of when the VPC Peering was created. + """ + return pulumi.get(self, "created_at") + + @created_at.setter + def created_at(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "created_at", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def status(self) -> Optional[pulumi.Input[str]]: + """ + The status of the VPC Peering. + """ + return pulumi.get(self, "status") + + @status.setter + def status(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "status", value) + + @property + @pulumi.getter(name="vpcIds") + def vpc_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + A set of two VPC IDs to be peered. + """ + return pulumi.get(self, "vpc_ids") + + @vpc_ids.setter + def vpc_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "vpc_ids", value) + + +class VpcPeering(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + name: Optional[pulumi.Input[str]] = None, + vpc_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + """ + Provides a DigitalOcean VPC Peering resource. + + VPC Peerings are used to connect two VPC networks allowing resources in each + VPC to communicate with each other privately. + + ## Example Usage + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.VpcPeering("example", + name="example-peering", + vpc_ids=[ + vpc1["id"], + vpc2["id"], + ]) + ``` + + ### Resource Assignement + + You can use the VPC Peering resource to allow communication between resources + in different VPCs. For example: + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + vpc1 = digitalocean.Vpc("vpc1", + name="vpc1", + region="nyc3") + vpc2 = digitalocean.Vpc("vpc2", + name="vpc2", + region="nyc3") + example = digitalocean.VpcPeering("example", + name="example-peering", + vpc_ids=[ + vpc1.id, + vpc2.id, + ]) + example1 = digitalocean.Droplet("example1", + name="example1", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=vpc1.id) + example2 = digitalocean.Droplet("example2", + name="example2", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=vpc2.id) + ``` + + ## Import + + A VPC Peering can be imported using its `id`, e.g. + + ```sh + $ pulumi import digitalocean:index/vpcPeering:VpcPeering example 771ad360-c017-4b4e-a34e-73934f5f0190 + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] name: A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_ids: A set of two VPC IDs to be peered. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: VpcPeeringArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Provides a DigitalOcean VPC Peering resource. + + VPC Peerings are used to connect two VPC networks allowing resources in each + VPC to communicate with each other privately. + + ## Example Usage + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.VpcPeering("example", + name="example-peering", + vpc_ids=[ + vpc1["id"], + vpc2["id"], + ]) + ``` + + ### Resource Assignement + + You can use the VPC Peering resource to allow communication between resources + in different VPCs. For example: + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + vpc1 = digitalocean.Vpc("vpc1", + name="vpc1", + region="nyc3") + vpc2 = digitalocean.Vpc("vpc2", + name="vpc2", + region="nyc3") + example = digitalocean.VpcPeering("example", + name="example-peering", + vpc_ids=[ + vpc1.id, + vpc2.id, + ]) + example1 = digitalocean.Droplet("example1", + name="example1", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=vpc1.id) + example2 = digitalocean.Droplet("example2", + name="example2", + size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB, + image="ubuntu-18-04-x64", + region=digitalocean.Region.NYC3, + vpc_uuid=vpc2.id) + ``` + + ## Import + + A VPC Peering can be imported using its `id`, e.g. + + ```sh + $ pulumi import digitalocean:index/vpcPeering:VpcPeering example 771ad360-c017-4b4e-a34e-73934f5f0190 + ``` + + :param str resource_name: The name of the resource. + :param VpcPeeringArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(VpcPeeringArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + name: Optional[pulumi.Input[str]] = None, + vpc_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = VpcPeeringArgs.__new__(VpcPeeringArgs) + + __props__.__dict__["name"] = name + if vpc_ids is None and not opts.urn: + raise TypeError("Missing required property 'vpc_ids'") + __props__.__dict__["vpc_ids"] = vpc_ids + __props__.__dict__["created_at"] = None + __props__.__dict__["status"] = None + super(VpcPeering, __self__).__init__( + 'digitalocean:index/vpcPeering:VpcPeering', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + created_at: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + vpc_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'VpcPeering': + """ + Get an existing VpcPeering resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] created_at: The date and time of when the VPC Peering was created. + :param pulumi.Input[str] name: A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + :param pulumi.Input[str] status: The status of the VPC Peering. + :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_ids: A set of two VPC IDs to be peered. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _VpcPeeringState.__new__(_VpcPeeringState) + + __props__.__dict__["created_at"] = created_at + __props__.__dict__["name"] = name + __props__.__dict__["status"] = status + __props__.__dict__["vpc_ids"] = vpc_ids + return VpcPeering(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="createdAt") + def created_at(self) -> pulumi.Output[str]: + """ + The date and time of when the VPC Peering was created. + """ + return pulumi.get(self, "created_at") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + A name for the VPC Peering. Must be unique and contain alphanumeric characters, dashes, and periods only. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def status(self) -> pulumi.Output[str]: + """ + The status of the VPC Peering. + """ + return pulumi.get(self, "status") + + @property + @pulumi.getter(name="vpcIds") + def vpc_ids(self) -> pulumi.Output[Sequence[str]]: + """ + A set of two VPC IDs to be peered. + """ + return pulumi.get(self, "vpc_ids") +