Skip to content

Commit

Permalink
Merge pull request #26 from EventStore/brock/add-upgrades
Browse files Browse the repository at this point in the history
add serverVersionTag to allow for upgrades
  • Loading branch information
bshelton authored Apr 2, 2024
2 parents 1e729b4 + 788157c commit 93d0571
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
Expand All @@ -26,7 +26,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'
always-auth: true
- name: Install pulumictl
run: curl -L https://github.com/pulumi/pulumictl/releases/download/v0.0.25/pulumictl-v0.0.25-linux-amd64.tar.gz | sudo tar zxv -C /usr/bin -f- pulumictl
run: curl -L https://github.com/pulumi/pulumictl/releases/download/v0.0.46/pulumictl-v0.0.46-linux-amd64.tar.gz | sudo tar zxv -C /usr/bin -f- pulumictl
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
16 changes: 8 additions & 8 deletions examples/nodejs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ const awsConfig = new pulumi.Config("aws");

const vpc = new awsx.ec2.Vpc("example", {
cidrBlock: "172.250.0.0/24",
numberOfAvailabilityZones: 3
numberOfAvailabilityZones: 3,
});

const project = new esc.Project("sample-project", {
name: "Improved Chicken Window"
name: "Improved Chicken Window",
});

const network = new esc.Network("sample-network", {
name: "Chicken Window Net",
projectId: project.id,
resourceProvider: "aws",
region: awsConfig.require("region"),
cidrBlock: "172.21.0.0/16"
cidrBlock: "172.21.0.0/16",
});

const peering = new esc.Peering("sample-peering", {
Expand All @@ -30,22 +30,22 @@ const peering = new esc.Peering("sample-peering", {
peerNetworkRegion: network.region,
peerAccountId: vpc.vpc.ownerId,
peerNetworkId: vpc.vpcId,
routes: [vpc.vpc.cidrBlock]
routes: [vpc.vpc.cidrBlock],
});

const peer = new aws.ec2.VpcPeeringConnectionAccepter("sample-accept", {
vpcPeeringConnectionId: peering.providerMetadata["aws_peering_link_id"],
autoAccept: true,
tags: {
Side: "Accepter",
Source: "Event Store"
}
Source: "Event Store",
},
});

const route = new aws.ec2.Route("route", {
vpcPeeringConnectionId: peer.id,
routeTableId: vpc.vpc.mainRouteTableId,
destinationCidrBlock: network.cidrBlock
destinationCidrBlock: network.cidrBlock,
});

const cluster = new esc.ManagedCluster("wings", {
Expand All @@ -56,7 +56,7 @@ const cluster = new esc.ManagedCluster("wings", {
instanceType: "F1",
diskSize: 16,
diskType: "gp3",
serverVersion: "21.10"
serverVersion: "23.10",
});

export let clusterDnsName = cluster.dnsName;
21 changes: 16 additions & 5 deletions provider/cmd/pulumi-resource-eventstorecloud/schema.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/EventStore/pulumi-eventstorecloud/provider

go 1.19
go 1.20

replace github.com/hashicorp/go-getter => github.com/hashicorp/go-getter v1.4.0

replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20230710100801-03a71d0fca3d

require (
github.com/EventStore/terraform-provider-eventstorecloud v1.5.26
github.com/EventStore/terraform-provider-eventstorecloud v1.5.28
github.com/pulumi/pulumi-terraform-bridge/v3 v3.57.0
github.com/pulumi/pulumi/sdk/v3 v3.76.1
)
Expand Down
2 changes: 2 additions & 0 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/EventStore/terraform-provider-eventstorecloud v1.5.26 h1:zHoCr6VknEpxbe+Veb8dDBKR1k2tA1xzkCLpV/nhkew=
github.com/EventStore/terraform-provider-eventstorecloud v1.5.26/go.mod h1:4BJvRyKhwKym+y+PlHJ0QOdt/kGvhl/3YxRHh2tsJ20=
github.com/EventStore/terraform-provider-eventstorecloud v1.5.28 h1:Zce5TWutqX9ZVeuFYT0yD5pJoLk/FoatQ4KuJ+sa5AE=
github.com/EventStore/terraform-provider-eventstorecloud v1.5.28/go.mod h1:4BJvRyKhwKym+y+PlHJ0QOdt/kGvhl/3YxRHh2tsJ20=
github.com/GoogleCloudPlatform/cloudsql-proxy v1.31.2/go.mod h1:qR6jVnZTKDCW3j+fC9mOEPHm++1nKDMkqbbkD6KNsfo=
github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
Expand Down
20 changes: 19 additions & 1 deletion sdk/dotnet/ManagedCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace Pulumi.EventStoreCloud
/// DiskType = "gp3",
/// DiskIops = 3000,
/// DiskThroughput = 125,
/// ServerVersion = "20.6",
/// ServerVersion = "23.10",
/// });
///
/// });
Expand Down Expand Up @@ -144,6 +144,12 @@ public partial class ManagedCluster : global::Pulumi.CustomResource
[Output("serverVersion")]
public Output<string> ServerVersion { get; private set; } = null!;

/// <summary>
/// Server version tag to provision (find the list of valid values below). A higher server*version*tag will prompt an upgrade.
/// </summary>
[Output("serverVersionTag")]
public Output<string> ServerVersionTag { get; private set; } = null!;

/// <summary>
/// Topology of the managed cluster (`single-node` or `three-node-multi-zone`)
/// </summary>
Expand Down Expand Up @@ -263,6 +269,12 @@ public sealed class ManagedClusterArgs : global::Pulumi.ResourceArgs
[Input("serverVersion", required: true)]
public Input<string> ServerVersion { get; set; } = null!;

/// <summary>
/// Server version tag to provision (find the list of valid values below). A higher server*version*tag will prompt an upgrade.
/// </summary>
[Input("serverVersionTag")]
public Input<string>? ServerVersionTag { get; set; }

/// <summary>
/// Topology of the managed cluster (`single-node` or `three-node-multi-zone`)
/// </summary>
Expand Down Expand Up @@ -361,6 +373,12 @@ public sealed class ManagedClusterState : global::Pulumi.ResourceArgs
[Input("serverVersion")]
public Input<string>? ServerVersion { get; set; }

/// <summary>
/// Server version tag to provision (find the list of valid values below). A higher server*version*tag will prompt an upgrade.
/// </summary>
[Input("serverVersionTag")]
public Input<string>? ServerVersionTag { get; set; }

/// <summary>
/// Topology of the managed cluster (`single-node` or `three-node-multi-zone`)
/// </summary>
Expand Down
17 changes: 16 additions & 1 deletion sdk/go/eventstorecloud/managedCluster.go

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

16 changes: 15 additions & 1 deletion sdk/nodejs/managedCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import * as utilities from "./utilities";
* diskType: "gp3",
* diskIops: 3000,
* diskThroughput: 125,
* serverVersion: "20.6",
* serverVersion: "23.10",
* });
* ```
*
Expand Down Expand Up @@ -126,6 +126,10 @@ export class ManagedCluster extends pulumi.CustomResource {
* Server version to provision (find the list of valid values below)
*/
public readonly serverVersion!: pulumi.Output<string>;
/**
* Server version tag to provision (find the list of valid values below). A higher server*version*tag will prompt an upgrade.
*/
public readonly serverVersionTag!: pulumi.Output<string>;
/**
* Topology of the managed cluster (`single-node` or `three-node-multi-zone`)
*/
Expand Down Expand Up @@ -158,6 +162,7 @@ export class ManagedCluster extends pulumi.CustomResource {
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["resourceProvider"] = state ? state.resourceProvider : undefined;
resourceInputs["serverVersion"] = state ? state.serverVersion : undefined;
resourceInputs["serverVersionTag"] = state ? state.serverVersionTag : undefined;
resourceInputs["topology"] = state ? state.topology : undefined;
} else {
const args = argsOrState as ManagedClusterArgs | undefined;
Expand Down Expand Up @@ -193,6 +198,7 @@ export class ManagedCluster extends pulumi.CustomResource {
resourceInputs["projectionLevel"] = args ? args.projectionLevel : undefined;
resourceInputs["protected"] = args ? args.protected : undefined;
resourceInputs["serverVersion"] = args ? args.serverVersion : undefined;
resourceInputs["serverVersionTag"] = args ? args.serverVersionTag : undefined;
resourceInputs["topology"] = args ? args.topology : undefined;
resourceInputs["dnsName"] = undefined /*out*/;
resourceInputs["region"] = undefined /*out*/;
Expand Down Expand Up @@ -263,6 +269,10 @@ export interface ManagedClusterState {
* Server version to provision (find the list of valid values below)
*/
serverVersion?: pulumi.Input<string>;
/**
* Server version tag to provision (find the list of valid values below). A higher server*version*tag will prompt an upgrade.
*/
serverVersionTag?: pulumi.Input<string>;
/**
* Topology of the managed cluster (`single-node` or `three-node-multi-zone`)
*/
Expand Down Expand Up @@ -317,6 +327,10 @@ export interface ManagedClusterArgs {
* Server version to provision (find the list of valid values below)
*/
serverVersion: pulumi.Input<string>;
/**
* Server version tag to provision (find the list of valid values below). A higher server*version*tag will prompt an upgrade.
*/
serverVersionTag?: pulumi.Input<string>;
/**
* Topology of the managed cluster (`single-node` or `three-node-multi-zone`)
*/
Expand Down
Loading

0 comments on commit 93d0571

Please sign in to comment.