diff --git a/provider/cmd/pulumi-resource-nuage/nuage_provider/VERSION b/provider/cmd/pulumi-resource-nuage/nuage_provider/VERSION index 5a5831ab..d169b2f2 100644 --- a/provider/cmd/pulumi-resource-nuage/nuage_provider/VERSION +++ b/provider/cmd/pulumi-resource-nuage/nuage_provider/VERSION @@ -1 +1 @@ -0.0.7 +0.0.8 diff --git a/schema.json b/schema.json index 3509e0ec..c1c4a215 100644 --- a/schema.json +++ b/schema.json @@ -1,6 +1,6 @@ { "name": "nuage", - "version":"0.0.7", + "version":"0.0.8", "pluginDownloadURL": "github://api.github.com/nuage/pulumi-nuage", "types": { "nuage:aws:ArchitectureType": { diff --git a/sdk/dotnet/Aws/Bastion.cs b/sdk/dotnet/Aws/Bastion.cs deleted file mode 100644 index f43fb3b2..00000000 --- a/sdk/dotnet/Aws/Bastion.cs +++ /dev/null @@ -1,77 +0,0 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** -// *** 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.Nuage.Aws -{ - [NuageResourceType("nuage:aws:Bastion")] - public partial class Bastion : Pulumi.ComponentResource - { - [Output("private_key_pem")] - public Output Private_key_pem { get; private set; } = null!; - - [Output("public_ip")] - public Output Public_ip { get; private set; } = null!; - - - /// - /// Create a Bastion 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 Bastion(string name, BastionArgs args, ComponentResourceOptions? options = null) - : base("nuage:aws:Bastion", name, args ?? new BastionArgs(), MakeResourceOptions(options, ""), remote: true) - { - } - - private static ComponentResourceOptions MakeResourceOptions(ComponentResourceOptions? options, Input? id) - { - var defaultOptions = new ComponentResourceOptions - { - Version = Utilities.Version, - }; - var merged = ComponentResourceOptions.Merge(defaultOptions, options); - // Override the ID if one was specified for consistency with other language SDKs. - merged.Id = id ?? merged.Id; - return merged; - } - } - - public sealed class BastionArgs : Pulumi.ResourceArgs - { - /// - /// Ssh port for bastion host. Defaults to 22 - /// - [Input("sshPort")] - public Input? SshPort { get; set; } - - /// - /// Vpc id. - /// - [Input("vpcId", required: true)] - public Input VpcId { get; set; } = null!; - - [Input("vpcSubnets", required: true)] - private InputList? _vpcSubnets; - - /// - /// List of subnet ip addresses of Vpc. - /// - public InputList VpcSubnets - { - get => _vpcSubnets ?? (_vpcSubnets = new InputList()); - set => _vpcSubnets = value; - } - - public BastionArgs() - { - } - } -} diff --git a/sdk/dotnet/Aws/ServerlessDatabase.cs b/sdk/dotnet/Aws/ServerlessDatabase.cs deleted file mode 100644 index 220f407c..00000000 --- a/sdk/dotnet/Aws/ServerlessDatabase.cs +++ /dev/null @@ -1,155 +0,0 @@ -// *** WARNING: this file was generated by Pulumi SDK Generator. *** -// *** 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.Nuage.Aws -{ - [NuageResourceType("nuage:aws:ServerlessDatabase")] - public partial class ServerlessDatabase : Pulumi.ComponentResource - { - [Output("bastion_ip")] - public Output Bastion_ip { get; private set; } = null!; - - [Output("bastion_private_key")] - public Output Bastion_private_key { get; private set; } = null!; - - [Output("cluster_arn")] - public Output Cluster_arn { get; private set; } = null!; - - [Output("host")] - public Output Host { get; private set; } = null!; - - [Output("name")] - public Output Name { get; private set; } = null!; - - [Output("password")] - public Output Password { get; private set; } = null!; - - [Output("policy_document")] - public Output Policy_document { get; private set; } = null!; - - [Output("port")] - public Output Port { get; private set; } = null!; - - [Output("uri")] - public Output Uri { get; private set; } = null!; - - [Output("user")] - public Output User { get; private set; } = null!; - - - /// - /// Create a ServerlessDatabase 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 ServerlessDatabase(string name, ServerlessDatabaseArgs args, ComponentResourceOptions? options = null) - : base("nuage:aws:ServerlessDatabase", name, args ?? new ServerlessDatabaseArgs(), MakeResourceOptions(options, ""), remote: true) - { - } - - private static ComponentResourceOptions MakeResourceOptions(ComponentResourceOptions? options, Input? id) - { - var defaultOptions = new ComponentResourceOptions - { - Version = Utilities.Version, - }; - var merged = ComponentResourceOptions.Merge(defaultOptions, options); - // Override the ID if one was specified for consistency with other language SDKs. - merged.Id = id ?? merged.Id; - return merged; - } - } - - public sealed class ServerlessDatabaseArgs : Pulumi.ResourceArgs - { - /// - /// Enable data api. Defaults to `false` - /// - [Input("bastionEnabled")] - public Input? BastionEnabled { get; set; } - - [Input("bastionSubnets")] - private InputList? _bastionSubnets; - - /// - /// List of public subnet ip addresses for the bastion host. - /// - public InputList BastionSubnets - { - get => _bastionSubnets ?? (_bastionSubnets = new InputList()); - set => _bastionSubnets = value; - } - - /// - /// Enable data api. Defaults to `false` - /// - [Input("dataApi")] - public Input? DataApi { get; set; } - - /// - /// Name of the database. - /// - [Input("databaseName")] - public Input? DatabaseName { get; set; } - - /// - /// Database type. `mysql` or `postgresql` - /// - [Input("databaseType", required: true)] - public Input DatabaseType { get; set; } = null!; - - [Input("ipWhitelist")] - private InputList? _ipWhitelist; - - /// - /// List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0 - /// - public InputList IpWhitelist - { - get => _ipWhitelist ?? (_ipWhitelist = new InputList()); - set => _ipWhitelist = value; - } - - /// - /// Master user name of the db. - /// - [Input("masterUserName")] - public Input? MasterUserName { get; set; } - - /// - /// Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to `false` - /// - [Input("skipFinalSnapshot")] - public Input? SkipFinalSnapshot { get; set; } - - /// - /// Vpc id. - /// - [Input("vpcId", required: true)] - public Input VpcId { get; set; } = null!; - - [Input("vpcSubnets", required: true)] - private InputList? _vpcSubnets; - - /// - /// List of subnet ip addresses. - /// - public InputList VpcSubnets - { - get => _vpcSubnets ?? (_vpcSubnets = new InputList()); - set => _vpcSubnets = value; - } - - public ServerlessDatabaseArgs() - { - } - } -} diff --git a/sdk/dotnet/version.txt b/sdk/dotnet/version.txt deleted file mode 100644 index 4e379d2b..00000000 --- a/sdk/dotnet/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.0.2 diff --git a/sdk/go/nuage/aws/bastion.go b/sdk/go/nuage/aws/bastion.go index ff2837fe..9f576649 100644 --- a/sdk/go/nuage/aws/bastion.go +++ b/sdk/go/nuage/aws/bastion.go @@ -11,6 +11,9 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) +// Pulumi Nuage's Bastion resource enables the creation of a bastion host through the submission of provided VPC information. The resource creates a private key, security group, and an AWS EC2 `t4g.nano` instance that can serve as the bastion host. This allows secure connectivity to sensitive resources within the VPC, while maintaining isolation from the public internet. You can leverage the outputted private key to establish a connection to the bastion host. +// +// ## Example Usage type Bastion struct { pulumi.ResourceState @@ -25,12 +28,13 @@ func NewBastion(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.SubnetId == nil { + return nil, errors.New("invalid value for required argument 'SubnetId'") + } if args.VpcId == nil { return nil, errors.New("invalid value for required argument 'VpcId'") } - if args.VpcSubnets == nil { - return nil, errors.New("invalid value for required argument 'VpcSubnets'") - } + opts = pkgResourceDefaultOpts(opts) var resource Bastion err := ctx.RegisterRemoteComponentResource("nuage:aws:Bastion", name, args, &resource, opts...) if err != nil { @@ -42,20 +46,20 @@ func NewBastion(ctx *pulumi.Context, type bastionArgs struct { // Ssh port for bastion host. Defaults to 22 SshPort *float64 `pulumi:"sshPort"` + // Public subnet id of the Vpc. + SubnetId string `pulumi:"subnetId"` // Vpc id. VpcId string `pulumi:"vpcId"` - // List of subnet ip addresses of Vpc. - VpcSubnets []string `pulumi:"vpcSubnets"` } // The set of arguments for constructing a Bastion resource. type BastionArgs struct { // Ssh port for bastion host. Defaults to 22 SshPort pulumi.Float64PtrInput + // Public subnet id of the Vpc. + SubnetId pulumi.StringInput // Vpc id. VpcId pulumi.StringInput - // List of subnet ip addresses of Vpc. - VpcSubnets pulumi.StringArrayInput } func (BastionArgs) ElementType() reflect.Type { diff --git a/sdk/go/nuage/aws/containerFunction.go b/sdk/go/nuage/aws/containerFunction.go index 3d4bb2ff..5c437018 100644 --- a/sdk/go/nuage/aws/containerFunction.go +++ b/sdk/go/nuage/aws/containerFunction.go @@ -17,10 +17,10 @@ import ( type ContainerFunction struct { pulumi.ResourceState - Arn pulumi.StringOutput `pulumi:"arn"` - Function_url pulumi.StringOutput `pulumi:"function_url"` - Image_uri pulumi.StringOutput `pulumi:"image_uri"` - Name pulumi.StringOutput `pulumi:"name"` + Arn pulumi.StringOutput `pulumi:"arn"` + Image_uri pulumi.StringOutput `pulumi:"image_uri"` + Name pulumi.StringOutput `pulumi:"name"` + Url pulumi.StringPtrOutput `pulumi:"url"` } // NewContainerFunction registers a new resource with the given unique name, arguments, and options. @@ -70,7 +70,7 @@ type containerFunctionArgs struct { // Amount of time your Lambda Function has to run in seconds. Defaults to `3` Timeout *int `pulumi:"timeout"` // Use Lambda URL. Defaults to `false` - Url *bool `pulumi:"url"` + UrlEnabled *bool `pulumi:"urlEnabled"` } // The set of arguments for constructing a ContainerFunction resource. @@ -102,7 +102,7 @@ type ContainerFunctionArgs struct { // Amount of time your Lambda Function has to run in seconds. Defaults to `3` Timeout pulumi.IntPtrInput // Use Lambda URL. Defaults to `false` - Url pulumi.BoolPtrInput + UrlEnabled pulumi.BoolPtrInput } func (ContainerFunctionArgs) ElementType() reflect.Type { diff --git a/sdk/go/nuage/aws/serverlessDatabase.go b/sdk/go/nuage/aws/serverlessDatabase.go index fe676433..9010ac03 100644 --- a/sdk/go/nuage/aws/serverlessDatabase.go +++ b/sdk/go/nuage/aws/serverlessDatabase.go @@ -20,10 +20,9 @@ type ServerlessDatabase struct { Bastion_ip pulumi.StringPtrOutput `pulumi:"bastion_ip"` Bastion_private_key pulumi.StringPtrOutput `pulumi:"bastion_private_key"` Cluster_arn pulumi.StringOutput `pulumi:"cluster_arn"` + Database_name pulumi.StringOutput `pulumi:"database_name"` Host pulumi.StringOutput `pulumi:"host"` - Name pulumi.StringOutput `pulumi:"name"` Password pulumi.StringPtrOutput `pulumi:"password"` - Policy_document pulumi.StringPtrOutput `pulumi:"policy_document"` Port pulumi.Float64Output `pulumi:"port"` Uri pulumi.StringOutput `pulumi:"uri"` User pulumi.StringOutput `pulumi:"user"` @@ -36,15 +35,21 @@ func NewServerlessDatabase(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.DatabaseName == nil { + return nil, errors.New("invalid value for required argument 'DatabaseName'") + } if args.DatabaseType == nil { return nil, errors.New("invalid value for required argument 'DatabaseType'") } + if args.MasterUserName == nil { + return nil, errors.New("invalid value for required argument 'MasterUserName'") + } + if args.SubnetIds == nil { + return nil, errors.New("invalid value for required argument 'SubnetIds'") + } if args.VpcId == nil { return nil, errors.New("invalid value for required argument 'VpcId'") } - if args.VpcSubnets == nil { - return nil, errors.New("invalid value for required argument 'VpcSubnets'") - } opts = pkgResourceDefaultOpts(opts) var resource ServerlessDatabase err := ctx.RegisterRemoteComponentResource("nuage:aws:ServerlessDatabase", name, args, &resource, opts...) @@ -57,58 +62,44 @@ func NewServerlessDatabase(ctx *pulumi.Context, type serverlessDatabaseArgs struct { // Enable data api. Defaults to `false` BastionEnabled *bool `pulumi:"bastionEnabled"` - // List of public subnet ip addresses for the bastion host. - BastionSubnets []string `pulumi:"bastionSubnets"` - // Enable data api. Defaults to `false` - DataApi *bool `pulumi:"dataApi"` + // Public subnet id for the bastion host. You may use`awsx.ec2.Vpc.public_subnet_ids[0]` + BastionSubnetId *string `pulumi:"bastionSubnetId"` // Name of the database. - DatabaseName *string `pulumi:"databaseName"` + DatabaseName string `pulumi:"databaseName"` // Database type. `mysql` or `postgresql` DatabaseType string `pulumi:"databaseType"` // List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0 IpWhitelist []string `pulumi:"ipWhitelist"` // Master user name of the db. - MasterUserName *string `pulumi:"masterUserName"` -<<<<<<< HEAD -======= - // Resource name. - ResourceName string `pulumi:"resourceName"` ->>>>>>> master + MasterUserName string `pulumi:"masterUserName"` // Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to `false` SkipFinalSnapshot *bool `pulumi:"skipFinalSnapshot"` + // List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (`vpc.public_subnet_ids`). Otherwise, you can use private subnets (`vpc.private_subnet_ids`). + SubnetIds []string `pulumi:"subnetIds"` // Vpc id. VpcId string `pulumi:"vpcId"` - // List of subnet ip addresses. - VpcSubnets []string `pulumi:"vpcSubnets"` } // The set of arguments for constructing a ServerlessDatabase resource. type ServerlessDatabaseArgs struct { // Enable data api. Defaults to `false` BastionEnabled pulumi.BoolPtrInput - // List of public subnet ip addresses for the bastion host. - BastionSubnets pulumi.StringArrayInput - // Enable data api. Defaults to `false` - DataApi pulumi.BoolPtrInput + // Public subnet id for the bastion host. You may use`awsx.ec2.Vpc.public_subnet_ids[0]` + BastionSubnetId pulumi.StringPtrInput // Name of the database. - DatabaseName pulumi.StringPtrInput + DatabaseName pulumi.StringInput // Database type. `mysql` or `postgresql` DatabaseType pulumi.StringInput // List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0 IpWhitelist pulumi.StringArrayInput // Master user name of the db. - MasterUserName pulumi.StringPtrInput -<<<<<<< HEAD -======= - // Resource name. - ResourceName pulumi.StringInput ->>>>>>> master + MasterUserName pulumi.StringInput // Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to `false` SkipFinalSnapshot pulumi.BoolPtrInput + // List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (`vpc.public_subnet_ids`). Otherwise, you can use private subnets (`vpc.private_subnet_ids`). + SubnetIds pulumi.StringArrayInput // Vpc id. VpcId pulumi.StringInput - // List of subnet ip addresses. - VpcSubnets pulumi.StringArrayInput } func (ServerlessDatabaseArgs) ElementType() reflect.Type { diff --git a/sdk/go/nuage/pulumi-plugin.json b/sdk/go/nuage/pulumi-plugin.json index 4836ba6b..3dae4143 100644 --- a/sdk/go/nuage/pulumi-plugin.json +++ b/sdk/go/nuage/pulumi-plugin.json @@ -1,6 +1,6 @@ { "resource": true, "name": "nuage", - "version": "0.0.7", + "version": "0.0.8", "server": "github://api.github.com/nuage/pulumi-nuage" } diff --git a/sdk/nodejs/aws/bastion.ts b/sdk/nodejs/aws/bastion.ts index 26a0d47a..bf829285 100644 --- a/sdk/nodejs/aws/bastion.ts +++ b/sdk/nodejs/aws/bastion.ts @@ -4,6 +4,11 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; +/** + * Pulumi Nuage's Bastion resource enables the creation of a bastion host through the submission of provided VPC information. The resource creates a private key, security group, and an AWS EC2 `t4g.nano` instance that can serve as the bastion host. This allows secure connectivity to sensitive resources within the VPC, while maintaining isolation from the public internet. You can leverage the outputted private key to establish a connection to the bastion host. + * + * ## Example Usage + */ export class Bastion extends pulumi.ComponentResource { /** @internal */ public static readonly __pulumiType = 'nuage:aws:Bastion'; @@ -33,15 +38,15 @@ export class Bastion extends pulumi.ComponentResource { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (!opts.id) { + if ((!args || args.subnetId === undefined) && !opts.urn) { + throw new Error("Missing required property 'subnetId'"); + } if ((!args || args.vpcId === undefined) && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } - if ((!args || args.vpcSubnets === undefined) && !opts.urn) { - throw new Error("Missing required property 'vpcSubnets'"); - } resourceInputs["sshPort"] = args ? args.sshPort : undefined; + resourceInputs["subnetId"] = args ? args.subnetId : undefined; resourceInputs["vpcId"] = args ? args.vpcId : undefined; - resourceInputs["vpcSubnets"] = args ? args.vpcSubnets : undefined; resourceInputs["private_key_pem"] = undefined /*out*/; resourceInputs["public_ip"] = undefined /*out*/; } else { @@ -62,11 +67,11 @@ export interface BastionArgs { */ sshPort?: pulumi.Input; /** - * Vpc id. + * Public subnet id of the Vpc. */ - vpcId: pulumi.Input; + subnetId: pulumi.Input; /** - * List of subnet ip addresses of Vpc. + * Vpc id. */ - vpcSubnets: pulumi.Input[]>; + vpcId: pulumi.Input; } diff --git a/sdk/nodejs/aws/containerFunction.ts b/sdk/nodejs/aws/containerFunction.ts index 91e7cbd1..3b765e92 100644 --- a/sdk/nodejs/aws/containerFunction.ts +++ b/sdk/nodejs/aws/containerFunction.ts @@ -25,9 +25,9 @@ export class ContainerFunction extends pulumi.ComponentResource { } public /*out*/ readonly arn!: pulumi.Output; - public /*out*/ readonly function_url!: pulumi.Output; public /*out*/ readonly image_uri!: pulumi.Output; public readonly name!: pulumi.Output; + public /*out*/ readonly url!: pulumi.Output; /** * Create a ContainerFunction resource with the given unique name, arguments, and options. @@ -56,15 +56,15 @@ export class ContainerFunction extends pulumi.ComponentResource { resourceInputs["policyDocument"] = args ? args.policyDocument : undefined; resourceInputs["repositoryUrl"] = args ? args.repositoryUrl : undefined; resourceInputs["timeout"] = args ? args.timeout : undefined; - resourceInputs["url"] = args ? args.url : undefined; + resourceInputs["urlEnabled"] = args ? args.urlEnabled : undefined; resourceInputs["arn"] = undefined /*out*/; - resourceInputs["function_url"] = undefined /*out*/; resourceInputs["image_uri"] = undefined /*out*/; + resourceInputs["url"] = undefined /*out*/; } else { resourceInputs["arn"] = undefined /*out*/; - resourceInputs["function_url"] = undefined /*out*/; resourceInputs["image_uri"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; + resourceInputs["url"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ContainerFunction.__pulumiType, name, resourceInputs, opts, true /*remote*/); @@ -130,5 +130,5 @@ export interface ContainerFunctionArgs { /** * Use Lambda URL. Defaults to `false` */ - url?: pulumi.Input; + urlEnabled?: pulumi.Input; } diff --git a/sdk/nodejs/aws/serverlessDatabase.ts b/sdk/nodejs/aws/serverlessDatabase.ts index 6966082f..7c482b2f 100644 --- a/sdk/nodejs/aws/serverlessDatabase.ts +++ b/sdk/nodejs/aws/serverlessDatabase.ts @@ -27,10 +27,9 @@ export class ServerlessDatabase extends pulumi.ComponentResource { public /*out*/ readonly bastion_ip!: pulumi.Output; public /*out*/ readonly bastion_private_key!: pulumi.Output; public /*out*/ readonly cluster_arn!: pulumi.Output; + public /*out*/ readonly database_name!: pulumi.Output; public /*out*/ readonly host!: pulumi.Output; - public /*out*/ readonly name!: pulumi.Output; public /*out*/ readonly password!: pulumi.Output; - public /*out*/ readonly policy_document!: pulumi.Output; public /*out*/ readonly port!: pulumi.Output; public /*out*/ readonly uri!: pulumi.Output; public /*out*/ readonly user!: pulumi.Output; @@ -46,32 +45,36 @@ export class ServerlessDatabase extends pulumi.ComponentResource { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (!opts.id) { + if ((!args || args.databaseName === undefined) && !opts.urn) { + throw new Error("Missing required property 'databaseName'"); + } if ((!args || args.databaseType === undefined) && !opts.urn) { throw new Error("Missing required property 'databaseType'"); } + if ((!args || args.masterUserName === undefined) && !opts.urn) { + throw new Error("Missing required property 'masterUserName'"); + } + if ((!args || args.subnetIds === undefined) && !opts.urn) { + throw new Error("Missing required property 'subnetIds'"); + } if ((!args || args.vpcId === undefined) && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } - if ((!args || args.vpcSubnets === undefined) && !opts.urn) { - throw new Error("Missing required property 'vpcSubnets'"); - } resourceInputs["bastionEnabled"] = args ? args.bastionEnabled : undefined; - resourceInputs["bastionSubnets"] = args ? args.bastionSubnets : undefined; - resourceInputs["dataApi"] = args ? args.dataApi : undefined; + resourceInputs["bastionSubnetId"] = args ? args.bastionSubnetId : undefined; resourceInputs["databaseName"] = args ? args.databaseName : undefined; resourceInputs["databaseType"] = args ? args.databaseType : undefined; resourceInputs["ipWhitelist"] = args ? args.ipWhitelist : undefined; resourceInputs["masterUserName"] = args ? args.masterUserName : undefined; resourceInputs["skipFinalSnapshot"] = args ? args.skipFinalSnapshot : undefined; + resourceInputs["subnetIds"] = args ? args.subnetIds : undefined; resourceInputs["vpcId"] = args ? args.vpcId : undefined; - resourceInputs["vpcSubnets"] = args ? args.vpcSubnets : undefined; resourceInputs["bastion_ip"] = undefined /*out*/; resourceInputs["bastion_private_key"] = undefined /*out*/; resourceInputs["cluster_arn"] = undefined /*out*/; + resourceInputs["database_name"] = undefined /*out*/; resourceInputs["host"] = undefined /*out*/; - resourceInputs["name"] = undefined /*out*/; resourceInputs["password"] = undefined /*out*/; - resourceInputs["policy_document"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["uri"] = undefined /*out*/; resourceInputs["user"] = undefined /*out*/; @@ -79,10 +82,9 @@ export class ServerlessDatabase extends pulumi.ComponentResource { resourceInputs["bastion_ip"] = undefined /*out*/; resourceInputs["bastion_private_key"] = undefined /*out*/; resourceInputs["cluster_arn"] = undefined /*out*/; + resourceInputs["database_name"] = undefined /*out*/; resourceInputs["host"] = undefined /*out*/; - resourceInputs["name"] = undefined /*out*/; resourceInputs["password"] = undefined /*out*/; - resourceInputs["policy_document"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["uri"] = undefined /*out*/; resourceInputs["user"] = undefined /*out*/; @@ -101,17 +103,13 @@ export interface ServerlessDatabaseArgs { */ bastionEnabled?: pulumi.Input; /** - * List of public subnet ip addresses for the bastion host. + * Public subnet id for the bastion host. You may use`awsx.ec2.Vpc.public_subnet_ids[0]` */ - bastionSubnets?: pulumi.Input[]>; - /** - * Enable data api. Defaults to `false` - */ - dataApi?: pulumi.Input; + bastionSubnetId?: pulumi.Input; /** * Name of the database. */ - databaseName?: pulumi.Input; + databaseName: pulumi.Input; /** * Database type. `mysql` or `postgresql` */ @@ -123,17 +121,17 @@ export interface ServerlessDatabaseArgs { /** * Master user name of the db. */ - masterUserName?: pulumi.Input; + masterUserName: pulumi.Input; /** * Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to `false` */ skipFinalSnapshot?: pulumi.Input; /** - * Vpc id. + * List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (`vpc.public_subnet_ids`). Otherwise, you can use private subnets (`vpc.private_subnet_ids`). */ - vpcId: pulumi.Input; + subnetIds: pulumi.Input[]>; /** - * List of subnet ip addresses. + * Vpc id. */ - vpcSubnets: pulumi.Input[]>; + vpcId: pulumi.Input; } diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 65e578a0..6efeb2d0 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,9 +1,9 @@ { "name": "@pulumi/nuage", - "version": "0.0.7", + "version": "0.0.8", "scripts": { "build": "tsc", - "install": "node scripts/install-pulumi-plugin.js resource nuage 0.0.7" + "install": "node scripts/install-pulumi-plugin.js resource nuage 0.0.8" }, "dependencies": { "@pulumi/aws": "^5.0.0", @@ -19,7 +19,7 @@ "@pulumi/pulumi": "latest" }, "pulumi": { - "version": "0.0.7", + "version": "0.0.8", "resource": true, "pluginDownloadURL": "github://api.github.com/nuage/pulumi-nuage" } diff --git a/sdk/nodejs/yarn.lock b/sdk/nodejs/yarn.lock index 4e9aa11b..5f3a9070 100644 --- a/sdk/nodejs/yarn.lock +++ b/sdk/nodejs/yarn.lock @@ -121,9 +121,9 @@ integrity sha512-oPQdbFDmZvjXk5ZDoBGXG8B4tSB/qW5vQunJWQMFUBp7Xe8O1ByPANueJ+Jzg58esEBegyyxZ7LRmfJr7kFcFg== "@pulumi/aws@^5.0.0": - version "5.29.1" - resolved "https://registry.yarnpkg.com/@pulumi/aws/-/aws-5.29.1.tgz#387f5a6517362b632051def719c3b95a97a73a0f" - integrity sha512-IHMSCrdkssoqN1u3SUMOCUOJos0BjVpJ8tkbby6yqASe5p3LCRpkQXwVPoSPRpS7TEoCvJpLw0f8ue+MEcCRdQ== + version "5.30.0" + resolved "https://registry.yarnpkg.com/@pulumi/aws/-/aws-5.30.0.tgz#a2c9db50d1a43e0472bff6125852131d8c977c4b" + integrity sha512-75MsXKJgQZZa34ugt3hAC6uXmh6CLJSUEH3d6lOT92+L8eIfwoqNd9QLuiiRMPZ5/X+vLPNfVk7hdjqtj3Pd0Q== dependencies: "@pulumi/pulumi" "^3.0.0" aws-sdk "^2.0.0" @@ -142,9 +142,9 @@ mime "^2.0.0" "@pulumi/command@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@pulumi/command/-/command-0.7.0.tgz#a759340336770f1d89885e306422947c9b909f9a" - integrity sha512-DvI/YjAVm9bbmI26OSA/54t59S+RUJPOCMeBvkRIt2iH1rLPO5Ke1FuXp7HMACCCHJBEP+rA8Xr82wHuyTERtQ== + version "0.7.1" + resolved "https://registry.yarnpkg.com/@pulumi/command/-/command-0.7.1.tgz#a8baabd053a40eef38221c66c29b484dfce26d27" + integrity sha512-glPRnkR+jKK/av1CsarIxRuyRSaDiV8Ht4OV5qsTXHRFu8jGbbJrTXT8K1rq1ZImQioS4L/NL9BjhzNjZcKEfA== dependencies: "@pulumi/pulumi" "^3.0.0" @@ -196,9 +196,9 @@ integrity sha512-Vsyi9ogDAY3REZDjYnXMRJJa62SDvxHXxJI5nGDQdZW058dDE+av/anynN2rLKbCKXDRNw3D/sQmqxVflZFi4A== "@types/node@>=12.12.47": - version "18.13.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850" - integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg== + version "18.14.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.0.tgz#94c47b9217bbac49d4a67a967fdcdeed89ebb7d0" + integrity sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A== "@types/node@^17.0.21": version "17.0.45" @@ -239,9 +239,9 @@ available-typed-arrays@^1.0.5: integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== aws-sdk@^2.0.0: - version "2.1315.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1315.0.tgz#24e485c21ea443b0bbc02c219601737ec2e5e1bb" - integrity sha512-fDlK3iqA0bpXW6azVBAB8RTKhJ5YUjfe6sqKQF1lKT2cYT5qU4rtH5qUlMixlWkb8oKeSMA2voW3wZZtSpBFKQ== + version "2.1321.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1321.0.tgz#8284143facf5e7ac1b4f23f86f3594c939d7ea5a" + integrity sha512-VBNsTl13/JWYpvo7H9BgAUMZam4BxKNhlt7GlsuVdK30MdirIEsB0ZeqGeAO9KXRBLCv/FUnF/nV73+97qLKWw== dependencies: buffer "4.9.2" events "1.1.1" diff --git a/sdk/python/pulumi_nuage/aws/bastion.py b/sdk/python/pulumi_nuage/aws/bastion.py index a91bf7a0..cb5d17f2 100644 --- a/sdk/python/pulumi_nuage/aws/bastion.py +++ b/sdk/python/pulumi_nuage/aws/bastion.py @@ -13,20 +13,32 @@ @pulumi.input_type class BastionArgs: def __init__(__self__, *, + subnet_id: pulumi.Input[str], vpc_id: pulumi.Input[str], - vpc_subnets: pulumi.Input[Sequence[pulumi.Input[str]]], ssh_port: Optional[pulumi.Input[float]] = None): """ The set of arguments for constructing a Bastion resource. + :param pulumi.Input[str] subnet_id: Public subnet id of the Vpc. :param pulumi.Input[str] vpc_id: Vpc id. - :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_subnets: List of subnet ip addresses of Vpc. :param pulumi.Input[float] ssh_port: Ssh port for bastion host. Defaults to 22 """ + pulumi.set(__self__, "subnet_id", subnet_id) pulumi.set(__self__, "vpc_id", vpc_id) - pulumi.set(__self__, "vpc_subnets", vpc_subnets) if ssh_port is not None: pulumi.set(__self__, "ssh_port", ssh_port) + @property + @pulumi.getter(name="subnetId") + def subnet_id(self) -> pulumi.Input[str]: + """ + Public subnet id of the Vpc. + """ + return pulumi.get(self, "subnet_id") + + @subnet_id.setter + def subnet_id(self, value: pulumi.Input[str]): + pulumi.set(self, "subnet_id", value) + @property @pulumi.getter(name="vpcId") def vpc_id(self) -> pulumi.Input[str]: @@ -39,18 +51,6 @@ def vpc_id(self) -> pulumi.Input[str]: def vpc_id(self, value: pulumi.Input[str]): pulumi.set(self, "vpc_id", value) - @property - @pulumi.getter(name="vpcSubnets") - def vpc_subnets(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: - """ - List of subnet ip addresses of Vpc. - """ - return pulumi.get(self, "vpc_subnets") - - @vpc_subnets.setter - def vpc_subnets(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): - pulumi.set(self, "vpc_subnets", value) - @property @pulumi.getter(name="sshPort") def ssh_port(self) -> Optional[pulumi.Input[float]]: @@ -70,16 +70,52 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, ssh_port: Optional[pulumi.Input[float]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, vpc_id: Optional[pulumi.Input[str]] = None, - vpc_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): """ - Create a Bastion resource with the given unique name, props, and options. + Pulumi Nuage's Bastion resource enables the creation of a bastion host through the submission of provided VPC information. The resource creates a private key, security group, and an AWS EC2 `t4g.nano` instance that can serve as the bastion host. This allows secure connectivity to sensitive resources within the VPC, while maintaining isolation from the public internet. You can leverage the outputted private key to establish a connection to the bastion host. + + ## Example Usage + ### Basic Example + + ```python + import pulumi_nuage as nuage + import pulumi_awsx as awsx + + vpc = awsx.ec2.Vpc( + resource_name=f"foo", + enable_dns_hostnames=True, + number_of_availability_zones=2, + nat_gateways=awsx.ec2.NatGatewayConfigurationArgs( + strategy=awsx.ec2.NatGatewayStrategy.NONE + ), + subnet_specs=[ + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PUBLIC, + ), + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PRIVATE, + ), + ], + ) + + + db = nuage.aws.Bastion( + "foo", + name="bastion-host", + vpc_id=my_vpc.id, + subnet_id=vpc.public_subnet_ids[0] + ) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[float] ssh_port: Ssh port for bastion host. Defaults to 22 + :param pulumi.Input[str] subnet_id: Public subnet id of the Vpc. :param pulumi.Input[str] vpc_id: Vpc id. - :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_subnets: List of subnet ip addresses of Vpc. """ ... @overload @@ -88,7 +124,43 @@ def __init__(__self__, args: BastionArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - Create a Bastion resource with the given unique name, props, and options. + Pulumi Nuage's Bastion resource enables the creation of a bastion host through the submission of provided VPC information. The resource creates a private key, security group, and an AWS EC2 `t4g.nano` instance that can serve as the bastion host. This allows secure connectivity to sensitive resources within the VPC, while maintaining isolation from the public internet. You can leverage the outputted private key to establish a connection to the bastion host. + + ## Example Usage + ### Basic Example + + ```python + import pulumi_nuage as nuage + import pulumi_awsx as awsx + + vpc = awsx.ec2.Vpc( + resource_name=f"foo", + enable_dns_hostnames=True, + number_of_availability_zones=2, + nat_gateways=awsx.ec2.NatGatewayConfigurationArgs( + strategy=awsx.ec2.NatGatewayStrategy.NONE + ), + subnet_specs=[ + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PUBLIC, + ), + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PRIVATE, + ), + ], + ) + + + db = nuage.aws.Bastion( + "foo", + name="bastion-host", + vpc_id=my_vpc.id, + subnet_id=vpc.public_subnet_ids[0] + ) + ``` + :param str resource_name: The name of the resource. :param BastionArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -105,8 +177,8 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, ssh_port: Optional[pulumi.Input[float]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, vpc_id: Optional[pulumi.Input[str]] = None, - vpc_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() @@ -114,6 +186,8 @@ def _internal_init(__self__, raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() + if opts.plugin_download_url is None: + opts.plugin_download_url = _utilities.get_plugin_download_url() if opts.id is not None: raise ValueError('ComponentResource classes do not support opts.id') else: @@ -122,12 +196,12 @@ def _internal_init(__self__, __props__ = BastionArgs.__new__(BastionArgs) __props__.__dict__["ssh_port"] = ssh_port + if subnet_id is None and not opts.urn: + raise TypeError("Missing required property 'subnet_id'") + __props__.__dict__["subnet_id"] = subnet_id if vpc_id is None and not opts.urn: raise TypeError("Missing required property 'vpc_id'") __props__.__dict__["vpc_id"] = vpc_id - if vpc_subnets is None and not opts.urn: - raise TypeError("Missing required property 'vpc_subnets'") - __props__.__dict__["vpc_subnets"] = vpc_subnets __props__.__dict__["private_key_pem"] = None __props__.__dict__["public_ip"] = None super(Bastion, __self__).__init__( diff --git a/sdk/python/pulumi_nuage/aws/container_function.py b/sdk/python/pulumi_nuage/aws/container_function.py index 08ac3a0f..71986bc4 100644 --- a/sdk/python/pulumi_nuage/aws/container_function.py +++ b/sdk/python/pulumi_nuage/aws/container_function.py @@ -26,7 +26,7 @@ def __init__(__self__, *, name_prefix: Optional[pulumi.Input[str]] = None, policy_document: Optional[pulumi.Input[str]] = None, timeout: Optional[pulumi.Input[int]] = None, - url: Optional[pulumi.Input[bool]] = None): + url_enabled: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a ContainerFunction resource. :param pulumi.Input[str] repository_url: Existing ECR repository name @@ -42,7 +42,7 @@ def __init__(__self__, *, :param pulumi.Input[str] name_prefix: Name prefix as an alternative to name and adds random suffix at the end. :param pulumi.Input[str] policy_document: Policy Document for lambda. :param pulumi.Input[int] timeout: Amount of time your Lambda Function has to run in seconds. Defaults to `3` - :param pulumi.Input[bool] url: Use Lambda URL. Defaults to `false` + :param pulumi.Input[bool] url_enabled: Use Lambda URL. Defaults to `false` """ pulumi.set(__self__, "repository_url", repository_url) if architecture is not None: @@ -69,8 +69,8 @@ def __init__(__self__, *, pulumi.set(__self__, "policy_document", policy_document) if timeout is not None: pulumi.set(__self__, "timeout", timeout) - if url is not None: - pulumi.set(__self__, "url", url) + if url_enabled is not None: + pulumi.set(__self__, "url_enabled", url_enabled) @property @pulumi.getter(name="repositoryUrl") @@ -229,16 +229,16 @@ def timeout(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "timeout", value) @property - @pulumi.getter - def url(self) -> Optional[pulumi.Input[bool]]: + @pulumi.getter(name="urlEnabled") + def url_enabled(self) -> Optional[pulumi.Input[bool]]: """ Use Lambda URL. Defaults to `false` """ - return pulumi.get(self, "url") + return pulumi.get(self, "url_enabled") - @url.setter - def url(self, value: Optional[pulumi.Input[bool]]): - pulumi.set(self, "url", value) + @url_enabled.setter + def url_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "url_enabled", value) class ContainerFunction(pulumi.ComponentResource): @@ -259,7 +259,7 @@ def __init__(__self__, policy_document: Optional[pulumi.Input[str]] = None, repository_url: Optional[pulumi.Input[str]] = None, timeout: Optional[pulumi.Input[int]] = None, - url: Optional[pulumi.Input[bool]] = None, + url_enabled: Optional[pulumi.Input[bool]] = None, __props__=None): """ Provides an AWS Lambda Function with additional necesary resources. It bundles several resources such as `Lambda Functions`, `Function URLs`, `CloudWatch keep-warm rules`, `Log Group with a Retention Policy`, `Role to run Lambda and Write Logs`. It also has a feature to manage build and deployment of Docker builds, removal of docker build artifacts (randomly generated image names that pollute your local docker) and automated X-Ray tracing. @@ -305,7 +305,7 @@ def __init__(__self__, :param pulumi.Input[str] policy_document: Policy Document for lambda. :param pulumi.Input[str] repository_url: Existing ECR repository name :param pulumi.Input[int] timeout: Amount of time your Lambda Function has to run in seconds. Defaults to `3` - :param pulumi.Input[bool] url: Use Lambda URL. Defaults to `false` + :param pulumi.Input[bool] url_enabled: Use Lambda URL. Defaults to `false` """ ... @overload @@ -370,7 +370,7 @@ def _internal_init(__self__, policy_document: Optional[pulumi.Input[str]] = None, repository_url: Optional[pulumi.Input[str]] = None, timeout: Optional[pulumi.Input[int]] = None, - url: Optional[pulumi.Input[bool]] = None, + url_enabled: Optional[pulumi.Input[bool]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() @@ -402,10 +402,10 @@ def _internal_init(__self__, raise TypeError("Missing required property 'repository_url'") __props__.__dict__["repository_url"] = repository_url __props__.__dict__["timeout"] = timeout - __props__.__dict__["url"] = url + __props__.__dict__["url_enabled"] = url_enabled __props__.__dict__["arn"] = None - __props__.__dict__["function_url"] = None __props__.__dict__["image_uri"] = None + __props__.__dict__["url"] = None super(ContainerFunction, __self__).__init__( 'nuage:aws:ContainerFunction', resource_name, @@ -418,11 +418,6 @@ def _internal_init(__self__, def arn(self) -> pulumi.Output[str]: return pulumi.get(self, "arn") - @property - @pulumi.getter - def function_url(self) -> pulumi.Output[str]: - return pulumi.get(self, "function_url") - @property @pulumi.getter def image_uri(self) -> pulumi.Output[str]: @@ -433,3 +428,8 @@ def image_uri(self) -> pulumi.Output[str]: def name(self) -> pulumi.Output[str]: return pulumi.get(self, "name") + @property + @pulumi.getter + def url(self) -> pulumi.Output[Optional[str]]: + return pulumi.get(self, "url") + diff --git a/sdk/python/pulumi_nuage/aws/serverless_database.py b/sdk/python/pulumi_nuage/aws/serverless_database.py index 36ee5fe5..7835e2b8 100644 --- a/sdk/python/pulumi_nuage/aws/serverless_database.py +++ b/sdk/python/pulumi_nuage/aws/serverless_database.py @@ -13,47 +13,53 @@ @pulumi.input_type class ServerlessDatabaseArgs: def __init__(__self__, *, + database_name: pulumi.Input[str], database_type: pulumi.Input[str], + master_user_name: pulumi.Input[str], + subnet_ids: pulumi.Input[Sequence[pulumi.Input[str]]], vpc_id: pulumi.Input[str], - vpc_subnets: pulumi.Input[Sequence[pulumi.Input[str]]], bastion_enabled: Optional[pulumi.Input[bool]] = None, - bastion_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - data_api: Optional[pulumi.Input[bool]] = None, - database_name: Optional[pulumi.Input[str]] = None, + bastion_subnet_id: Optional[pulumi.Input[str]] = None, ip_whitelist: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - master_user_name: Optional[pulumi.Input[str]] = None, skip_final_snapshot: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a ServerlessDatabase resource. + :param pulumi.Input[str] database_name: Name of the database. :param pulumi.Input[str] database_type: Database type. `mysql` or `postgresql` + :param pulumi.Input[str] master_user_name: Master user name of the db. + :param pulumi.Input[Sequence[pulumi.Input[str]]] subnet_ids: List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (`vpc.public_subnet_ids`). Otherwise, you can use private subnets (`vpc.private_subnet_ids`). :param pulumi.Input[str] vpc_id: Vpc id. - :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_subnets: List of subnet ip addresses. :param pulumi.Input[bool] bastion_enabled: Enable data api. Defaults to `false` - :param pulumi.Input[Sequence[pulumi.Input[str]]] bastion_subnets: List of public subnet ip addresses for the bastion host. - :param pulumi.Input[bool] data_api: Enable data api. Defaults to `false` - :param pulumi.Input[str] database_name: Name of the database. + :param pulumi.Input[str] bastion_subnet_id: Public subnet id for the bastion host. You may use`awsx.ec2.Vpc.public_subnet_ids[0]` :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_whitelist: List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0 - :param pulumi.Input[str] master_user_name: Master user name of the db. :param pulumi.Input[bool] skip_final_snapshot: Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to `false` """ + pulumi.set(__self__, "database_name", database_name) pulumi.set(__self__, "database_type", database_type) + pulumi.set(__self__, "master_user_name", master_user_name) + pulumi.set(__self__, "subnet_ids", subnet_ids) pulumi.set(__self__, "vpc_id", vpc_id) - pulumi.set(__self__, "vpc_subnets", vpc_subnets) if bastion_enabled is not None: pulumi.set(__self__, "bastion_enabled", bastion_enabled) - if bastion_subnets is not None: - pulumi.set(__self__, "bastion_subnets", bastion_subnets) - if data_api is not None: - pulumi.set(__self__, "data_api", data_api) - if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + if bastion_subnet_id is not None: + pulumi.set(__self__, "bastion_subnet_id", bastion_subnet_id) if ip_whitelist is not None: pulumi.set(__self__, "ip_whitelist", ip_whitelist) - if master_user_name is not None: - pulumi.set(__self__, "master_user_name", master_user_name) if skip_final_snapshot is not None: pulumi.set(__self__, "skip_final_snapshot", skip_final_snapshot) + @property + @pulumi.getter(name="databaseName") + def database_name(self) -> pulumi.Input[str]: + """ + Name of the database. + """ + return pulumi.get(self, "database_name") + + @database_name.setter + def database_name(self, value: pulumi.Input[str]): + pulumi.set(self, "database_name", value) + @property @pulumi.getter(name="databaseType") def database_type(self) -> pulumi.Input[str]: @@ -66,6 +72,30 @@ def database_type(self) -> pulumi.Input[str]: def database_type(self, value: pulumi.Input[str]): pulumi.set(self, "database_type", value) + @property + @pulumi.getter(name="masterUserName") + def master_user_name(self) -> pulumi.Input[str]: + """ + Master user name of the db. + """ + return pulumi.get(self, "master_user_name") + + @master_user_name.setter + def master_user_name(self, value: pulumi.Input[str]): + pulumi.set(self, "master_user_name", value) + + @property + @pulumi.getter(name="subnetIds") + def subnet_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (`vpc.public_subnet_ids`). Otherwise, you can use private subnets (`vpc.private_subnet_ids`). + """ + return pulumi.get(self, "subnet_ids") + + @subnet_ids.setter + def subnet_ids(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "subnet_ids", value) + @property @pulumi.getter(name="vpcId") def vpc_id(self) -> pulumi.Input[str]: @@ -78,18 +108,6 @@ def vpc_id(self) -> pulumi.Input[str]: def vpc_id(self, value: pulumi.Input[str]): pulumi.set(self, "vpc_id", value) - @property - @pulumi.getter(name="vpcSubnets") - def vpc_subnets(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: - """ - List of subnet ip addresses. - """ - return pulumi.get(self, "vpc_subnets") - - @vpc_subnets.setter - def vpc_subnets(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): - pulumi.set(self, "vpc_subnets", value) - @property @pulumi.getter(name="bastionEnabled") def bastion_enabled(self) -> Optional[pulumi.Input[bool]]: @@ -103,40 +121,16 @@ def bastion_enabled(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "bastion_enabled", value) @property - @pulumi.getter(name="bastionSubnets") - def bastion_subnets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: - """ - List of public subnet ip addresses for the bastion host. - """ - return pulumi.get(self, "bastion_subnets") - - @bastion_subnets.setter - def bastion_subnets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): - pulumi.set(self, "bastion_subnets", value) - - @property - @pulumi.getter(name="dataApi") - def data_api(self) -> Optional[pulumi.Input[bool]]: + @pulumi.getter(name="bastionSubnetId") + def bastion_subnet_id(self) -> Optional[pulumi.Input[str]]: """ - Enable data api. Defaults to `false` + Public subnet id for the bastion host. You may use`awsx.ec2.Vpc.public_subnet_ids[0]` """ - return pulumi.get(self, "data_api") + return pulumi.get(self, "bastion_subnet_id") - @data_api.setter - def data_api(self, value: Optional[pulumi.Input[bool]]): - pulumi.set(self, "data_api", value) - - @property - @pulumi.getter(name="databaseName") - def database_name(self) -> Optional[pulumi.Input[str]]: - """ - Name of the database. - """ - return pulumi.get(self, "database_name") - - @database_name.setter - def database_name(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "database_name", value) + @bastion_subnet_id.setter + def bastion_subnet_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "bastion_subnet_id", value) @property @pulumi.getter(name="ipWhitelist") @@ -150,18 +144,6 @@ def ip_whitelist(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: def ip_whitelist(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "ip_whitelist", value) - @property - @pulumi.getter(name="masterUserName") - def master_user_name(self) -> Optional[pulumi.Input[str]]: - """ - Master user name of the db. - """ - return pulumi.get(self, "master_user_name") - - @master_user_name.setter - def master_user_name(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "master_user_name", value) - @property @pulumi.getter(name="skipFinalSnapshot") def skip_final_snapshot(self) -> Optional[pulumi.Input[bool]]: @@ -181,15 +163,14 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bastion_enabled: Optional[pulumi.Input[bool]] = None, - bastion_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - data_api: Optional[pulumi.Input[bool]] = None, + bastion_subnet_id: Optional[pulumi.Input[str]] = None, database_name: Optional[pulumi.Input[str]] = None, database_type: Optional[pulumi.Input[str]] = None, ip_whitelist: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, master_user_name: Optional[pulumi.Input[str]] = None, skip_final_snapshot: Optional[pulumi.Input[bool]] = None, + subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, vpc_id: Optional[pulumi.Input[str]] = None, - vpc_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): """ The ServerlessDatabase component is a convenient and efficient solution for creating serverless databases using Amazon RDS Aurora. It automatically creates components such as subnet group, security group, security group rules, and RDS cluster, and securely manages the DB credentials. With support for both MySQL and PostgreSQL, it provides a fully configured serverless database resource for your serverless database needs. @@ -199,31 +180,54 @@ def __init__(__self__, ```python import pulumi_nuage as nuage + import pulumi_awsx as awsx + + vpc = awsx.ec2.Vpc( + resource_name=f"foo", + enable_dns_hostnames=True, + number_of_availability_zones=2, + nat_gateways=awsx.ec2.NatGatewayConfigurationArgs( + strategy=awsx.ec2.NatGatewayStrategy.NONE + ), + subnet_specs=[ + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PUBLIC, + ), + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PRIVATE, + ), + ], + ) + db = nuage.aws.ServerlessDatabase( "foo", + name="serverless-db", vpc_id=my_vpc.id, - vpc_subnets=my_vpc.private_subnet_ids, + subnet_ids=my_vpc.private_subnet_ids, database_type="mysql", database_name="bar", master_username="root", ip_whitelist=["0.0.0.0/0"], - skip_final_snapshot=True + skip_final_snapshot=True, + bastion_enabled=True, + bastion_subnet_id=vpc.public_subnet_ids[0] ) ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] bastion_enabled: Enable data api. Defaults to `false` - :param pulumi.Input[Sequence[pulumi.Input[str]]] bastion_subnets: List of public subnet ip addresses for the bastion host. - :param pulumi.Input[bool] data_api: Enable data api. Defaults to `false` + :param pulumi.Input[str] bastion_subnet_id: Public subnet id for the bastion host. You may use`awsx.ec2.Vpc.public_subnet_ids[0]` :param pulumi.Input[str] database_name: Name of the database. :param pulumi.Input[str] database_type: Database type. `mysql` or `postgresql` :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_whitelist: List of whitelisted IP addresses. If not specified, it will be public 0.0.0.0/0 :param pulumi.Input[str] master_user_name: Master user name of the db. :param pulumi.Input[bool] skip_final_snapshot: Determines whether a final DB snapshot is created before the DB instance is deleted. Defaults to `false` + :param pulumi.Input[Sequence[pulumi.Input[str]]] subnet_ids: List of subnet ip addresses. If you want your database will be accessible from the internet, it should be public (`vpc.public_subnet_ids`). Otherwise, you can use private subnets (`vpc.private_subnet_ids`). :param pulumi.Input[str] vpc_id: Vpc id. - :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_subnets: List of subnet ip addresses. """ ... @overload @@ -239,16 +243,40 @@ def __init__(__self__, ```python import pulumi_nuage as nuage + import pulumi_awsx as awsx + + vpc = awsx.ec2.Vpc( + resource_name=f"foo", + enable_dns_hostnames=True, + number_of_availability_zones=2, + nat_gateways=awsx.ec2.NatGatewayConfigurationArgs( + strategy=awsx.ec2.NatGatewayStrategy.NONE + ), + subnet_specs=[ + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PUBLIC, + ), + awsx.ec2.SubnetSpecArgs( + cidr_mask=24, + type=awsx.ec2.SubnetType.PRIVATE, + ), + ], + ) + db = nuage.aws.ServerlessDatabase( "foo", + name="serverless-db", vpc_id=my_vpc.id, - vpc_subnets=my_vpc.private_subnet_ids, + subnet_ids=my_vpc.private_subnet_ids, database_type="mysql", database_name="bar", master_username="root", ip_whitelist=["0.0.0.0/0"], - skip_final_snapshot=True + skip_final_snapshot=True, + bastion_enabled=True, + bastion_subnet_id=vpc.public_subnet_ids[0] ) ``` @@ -268,15 +296,14 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, bastion_enabled: Optional[pulumi.Input[bool]] = None, - bastion_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - data_api: Optional[pulumi.Input[bool]] = None, + bastion_subnet_id: Optional[pulumi.Input[str]] = None, database_name: Optional[pulumi.Input[str]] = None, database_type: Optional[pulumi.Input[str]] = None, ip_whitelist: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, master_user_name: Optional[pulumi.Input[str]] = None, skip_final_snapshot: Optional[pulumi.Input[bool]] = None, + subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, vpc_id: Optional[pulumi.Input[str]] = None, - vpc_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() @@ -294,28 +321,30 @@ def _internal_init(__self__, __props__ = ServerlessDatabaseArgs.__new__(ServerlessDatabaseArgs) __props__.__dict__["bastion_enabled"] = bastion_enabled - __props__.__dict__["bastion_subnets"] = bastion_subnets - __props__.__dict__["data_api"] = data_api + __props__.__dict__["bastion_subnet_id"] = bastion_subnet_id + if database_name is None and not opts.urn: + raise TypeError("Missing required property 'database_name'") __props__.__dict__["database_name"] = database_name if database_type is None and not opts.urn: raise TypeError("Missing required property 'database_type'") __props__.__dict__["database_type"] = database_type __props__.__dict__["ip_whitelist"] = ip_whitelist + if master_user_name is None and not opts.urn: + raise TypeError("Missing required property 'master_user_name'") __props__.__dict__["master_user_name"] = master_user_name __props__.__dict__["skip_final_snapshot"] = skip_final_snapshot + if subnet_ids is None and not opts.urn: + raise TypeError("Missing required property 'subnet_ids'") + __props__.__dict__["subnet_ids"] = subnet_ids if vpc_id is None and not opts.urn: raise TypeError("Missing required property 'vpc_id'") __props__.__dict__["vpc_id"] = vpc_id - if vpc_subnets is None and not opts.urn: - raise TypeError("Missing required property 'vpc_subnets'") - __props__.__dict__["vpc_subnets"] = vpc_subnets __props__.__dict__["bastion_ip"] = None __props__.__dict__["bastion_private_key"] = None __props__.__dict__["cluster_arn"] = None + __props__.__dict__["database_name"] = None __props__.__dict__["host"] = None - __props__.__dict__["name"] = None __props__.__dict__["password"] = None - __props__.__dict__["policy_document"] = None __props__.__dict__["port"] = None __props__.__dict__["uri"] = None __props__.__dict__["user"] = None @@ -343,24 +372,19 @@ def cluster_arn(self) -> pulumi.Output[str]: @property @pulumi.getter - def host(self) -> pulumi.Output[str]: - return pulumi.get(self, "host") + def database_name(self) -> pulumi.Output[str]: + return pulumi.get(self, "database_name") @property @pulumi.getter - def name(self) -> pulumi.Output[str]: - return pulumi.get(self, "name") + def host(self) -> pulumi.Output[str]: + return pulumi.get(self, "host") @property @pulumi.getter def password(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "password") - @property - @pulumi.getter - def policy_document(self) -> pulumi.Output[Optional[str]]: - return pulumi.get(self, "policy_document") - @property @pulumi.getter def port(self) -> pulumi.Output[float]: diff --git a/sdk/python/pulumi_nuage/pulumi-plugin.json b/sdk/python/pulumi_nuage/pulumi-plugin.json index 4836ba6b..3dae4143 100644 --- a/sdk/python/pulumi_nuage/pulumi-plugin.json +++ b/sdk/python/pulumi_nuage/pulumi-plugin.json @@ -1,6 +1,6 @@ { "resource": true, "name": "nuage", - "version": "0.0.7", + "version": "0.0.8", "server": "github://api.github.com/nuage/pulumi-nuage" } diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 6c46aecd..a1d2b6ae 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -8,8 +8,8 @@ from subprocess import check_call -VERSION = "0.0.7" -PLUGIN_VERSION = "0.0.7" +VERSION = "0.0.8" +PLUGIN_VERSION = "0.0.8" class InstallPluginCommand(install): def run(self):