From 5874871168ee0197147aa2ca024351523698a3ad Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:49:41 -0700 Subject: [PATCH] Upgrade pulumi-terraform-bridge to v3.63.1 (#310) This PR was generated via `$ upgrade-provider pulumi/pulumi-civo --kind=bridge --target-bridge-version=v3.63.1 --pr-reviewers=t0yv0 --pr-description=`. --- - Upgrading pulumi-terraform-bridge from v3.63.0 to v3.63.1. --- provider/go.mod | 2 +- provider/go.sum | 4 +- sdk/dotnet/DnsDomainName.cs | 16 +++ sdk/dotnet/Firewall.cs | 82 ++++++++++++++ sdk/dotnet/GetDatabase.cs | 46 ++++++++ sdk/dotnet/GetDnsDomainName.cs | 54 ++++++++++ sdk/dotnet/GetDnsDomainRecord.cs | 66 ++++++++++++ sdk/dotnet/GetFirewall.cs | 46 ++++++++ sdk/dotnet/GetInstance.cs | 52 +++++++++ sdk/dotnet/GetInstances.cs | 66 ++++++++++++ sdk/dotnet/GetKubernetesCluster.cs | 52 +++++++++ sdk/dotnet/GetKubernetesVersion.cs | 94 ++++++++++++++++ sdk/dotnet/GetLoadBalancer.cs | 54 ++++++++++ sdk/dotnet/GetNetwork.cs | 46 ++++++++ sdk/dotnet/GetObjectStore.cs | 44 ++++++++ sdk/dotnet/GetObjectStoreCredential.cs | 60 +++++++++++ sdk/dotnet/GetVolume.cs | 52 +++++++++ sdk/dotnet/InstanceReservedIpAssignment.cs | 23 ++++ sdk/dotnet/Network.cs | 18 ++++ sdk/dotnet/ObjectStore.cs | 24 +++++ sdk/dotnet/ObjectStoreCredential.cs | 33 ++++++ sdk/dotnet/ReservedIp.cs | 15 +++ sdk/dotnet/SshKey.cs | 19 ++++ sdk/dotnet/Volume.cs | 31 ++++++ sdk/go/civo/dnsDomainName.go | 24 +++++ sdk/go/civo/firewall.go | 81 ++++++++++++++ sdk/go/civo/getDatabase.go | 27 +++++ sdk/go/civo/getDnsDomainName.go | 28 +++++ sdk/go/civo/getDnsDomainRecord.go | 35 ++++++ sdk/go/civo/getFirewall.go | 27 +++++ sdk/go/civo/getInstance.go | 27 +++++ sdk/go/civo/getInstances.go | 32 ++++++ sdk/go/civo/getKubernetesCluster.go | 27 +++++ sdk/go/civo/getKubernetesVersion.go | 46 ++++++++ sdk/go/civo/getLoadBalancer.go | 28 +++++ sdk/go/civo/getNetwork.go | 27 +++++ sdk/go/civo/getObjectStore.go | 26 +++++ sdk/go/civo/getObjectStoreCredential.go | 34 ++++++ sdk/go/civo/getVolume.go | 27 +++++ sdk/go/civo/instanceReservedIpAssignment.go | 31 ++++++ sdk/go/civo/network.go | 26 +++++ sdk/go/civo/objectStore.go | 30 ++++++ sdk/go/civo/objectStoreCredential.go | 41 +++++++ sdk/go/civo/reservedIp.go | 24 +++++ sdk/go/civo/sshKey.go | 36 +++++++ sdk/go/civo/volume.go | 35 ++++++ sdk/nodejs/dnsDomainName.ts | 10 ++ sdk/nodejs/firewall.ts | 53 +++++++++ sdk/nodejs/getDatabase.ts | 24 +++++ sdk/nodejs/getDnsDomainName.ts | 26 +++++ sdk/nodejs/getDnsDomainRecord.ts | 34 ++++++ sdk/nodejs/getFirewall.ts | 24 +++++ sdk/nodejs/getInstance.ts | 24 +++++ sdk/nodejs/getInstances.ts | 30 ++++++ sdk/nodejs/getKubernetesCluster.ts | 24 +++++ sdk/nodejs/getKubernetesVersion.ts | 40 +++++++ sdk/nodejs/getLoadBalancer.ts | 26 +++++ sdk/nodejs/getNetwork.ts | 24 +++++ sdk/nodejs/getObjectStore.ts | 22 ++++ sdk/nodejs/getObjectStoreCredential.ts | 34 ++++++ sdk/nodejs/getVolume.ts | 24 +++++ sdk/nodejs/instanceReservedIpAssignment.ts | 15 +++ sdk/nodejs/network.ts | 9 ++ sdk/nodejs/objectStore.ts | 15 +++ sdk/nodejs/objectStoreCredential.ts | 22 ++++ sdk/nodejs/reservedIp.ts | 9 ++ sdk/nodejs/sshKey.ts | 10 ++ sdk/nodejs/volume.ts | 18 ++++ sdk/python/pulumi_civo/dns_domain_name.py | 20 ++++ sdk/python/pulumi_civo/firewall.py | 102 ++++++++++++++++++ sdk/python/pulumi_civo/get_database.py | 20 ++++ sdk/python/pulumi_civo/get_dns_domain_name.py | 22 ++++ .../pulumi_civo/get_dns_domain_record.py | 26 +++++ sdk/python/pulumi_civo/get_firewall.py | 20 ++++ sdk/python/pulumi_civo/get_instance.py | 20 ++++ sdk/python/pulumi_civo/get_instances.py | 26 +++++ .../pulumi_civo/get_kubernetes_cluster.py | 20 ++++ .../pulumi_civo/get_kubernetes_version.py | 32 ++++++ sdk/python/pulumi_civo/get_load_balancer.py | 22 ++++ sdk/python/pulumi_civo/get_network.py | 20 ++++ sdk/python/pulumi_civo/get_object_store.py | 18 ++++ .../get_object_store_credential.py | 28 +++++ sdk/python/pulumi_civo/get_volume.py | 20 ++++ .../instance_reserved_ip_assignment.py | 28 +++++ sdk/python/pulumi_civo/network.py | 18 ++++ sdk/python/pulumi_civo/object_store.py | 24 +++++ .../pulumi_civo/object_store_credential.py | 36 +++++++ sdk/python/pulumi_civo/reserved_ip.py | 18 ++++ sdk/python/pulumi_civo/ssh_key.py | 18 ++++ sdk/python/pulumi_civo/volume.py | 28 +++++ 90 files changed, 2818 insertions(+), 3 deletions(-) diff --git a/provider/go.mod b/provider/go.mod index 182ab2ce..5acc058c 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -6,7 +6,7 @@ replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraf require ( github.com/civo/terraform-provider-civo v1.0.39 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1 github.com/pulumi/pulumi/sdk/v3 v3.90.1 ) diff --git a/provider/go.sum b/provider/go.sum index 69769b51..3c20489e 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2197,8 +2197,8 @@ github.com/pulumi/pulumi-java/pkg v0.9.8 h1:c8mYsalnRXA2Ibgvv6scefOn6mW1Vb0UT0mc github.com/pulumi/pulumi-java/pkg v0.9.8/go.mod h1:c6rSw/+q4O0IImgJ9axxoC6QesbPYWBaG5gimbHouUQ= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1/go.mod h1:7OeUPH8rpt5ipyj9EFcnXpuzQ8SHL0dyqdfa8nOacdk= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0 h1:otdmkNsMGyZ+proUZClznZo+cEchkSSkmaGcq+Gf+6s= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0/go.mod h1:6YVbDo019OeHkQWo9MnUbBy6cCgCQeoXZDjmR9SYmUA= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1 h1:hBgediyT2LdS5yfD5AMiCmBJ/TYP94Xxv6a4TcAfV0g= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1/go.mod h1:6YVbDo019OeHkQWo9MnUbBy6cCgCQeoXZDjmR9SYmUA= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 h1:rIzMmtcVpPX8ynaz6/nW5AHNY63DiNfCohqmxWvMpM4= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4/go.mod h1:Kt8RIZWa/N8rW3+0g6NrqCBmF3o+HuIhFaZpssEkG6w= github.com/pulumi/pulumi-yaml v1.2.2 h1:W6BeUBLhDrJ2GSU0em1AUVelG9PBI4ABY61DdhJOO3E= diff --git a/sdk/dotnet/DnsDomainName.cs b/sdk/dotnet/DnsDomainName.cs index 989fee64..ced32435 100644 --- a/sdk/dotnet/DnsDomainName.cs +++ b/sdk/dotnet/DnsDomainName.cs @@ -12,6 +12,22 @@ namespace Pulumi.Civo /// /// Provides a Civo DNS domain name resource. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Create a new domain name + /// var main = new Civo.DnsDomainName("main"); + /// + /// }); + /// ``` + /// /// ## Import /// /// using domain name diff --git a/sdk/dotnet/Firewall.cs b/sdk/dotnet/Firewall.cs index c8b0a541..4b9125f2 100644 --- a/sdk/dotnet/Firewall.cs +++ b/sdk/dotnet/Firewall.cs @@ -12,6 +12,88 @@ namespace Pulumi.Civo /// /// Provides a Civo firewall resource. This can be used to create, modify, and delete firewalls. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Create a network + /// var customNet = new Civo.Network("customNet", new() + /// { + /// Label = "my-custom-network", + /// }); + /// + /// // Create a firewall + /// var wwwFirewall = new Civo.Firewall("wwwFirewall", new() + /// { + /// NetworkId = customNet.Id, + /// }); + /// + /// // Create a firewall with the default rules + /// var wwwIndex_firewallFirewall = new Civo.Firewall("wwwIndex/firewallFirewall", new() + /// { + /// NetworkId = customNet.Id, + /// CreateDefaultRules = true, + /// }); + /// + /// // Create a firewall withouth the default rules but with a custom rule + /// var wwwCivoIndex_firewallFirewall = new Civo.Firewall("wwwCivoIndex/firewallFirewall", new() + /// { + /// NetworkId = customNet.Id, + /// CreateDefaultRules = false, + /// IngressRules = new[] + /// { + /// new Civo.Inputs.FirewallIngressRuleArgs + /// { + /// Label = "k8s", + /// Protocol = "tcp", + /// PortRange = "6443", + /// Cidrs = new[] + /// { + /// "192.168.1.1/32", + /// "192.168.10.4/32", + /// "192.168.10.10/32", + /// }, + /// Action = "allow", + /// }, + /// new Civo.Inputs.FirewallIngressRuleArgs + /// { + /// Label = "ssh", + /// Protocol = "tcp", + /// PortRange = "22", + /// Cidrs = new[] + /// { + /// "192.168.1.1/32", + /// "192.168.10.4/32", + /// "192.168.10.10/32", + /// }, + /// Action = "allow", + /// }, + /// }, + /// EgressRules = new[] + /// { + /// new Civo.Inputs.FirewallEgressRuleArgs + /// { + /// Label = "all", + /// Protocol = "tcp", + /// PortRange = "1-65535", + /// Cidrs = new[] + /// { + /// "0.0.0.0/0", + /// }, + /// Action = "allow", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// using ID diff --git a/sdk/dotnet/GetDatabase.cs b/sdk/dotnet/GetDatabase.cs index a168c8ff..c8d27a8d 100644 --- a/sdk/dotnet/GetDatabase.cs +++ b/sdk/dotnet/GetDatabase.cs @@ -15,6 +15,29 @@ public static class GetDatabase /// Get information of an Database for use in other resources. This data source provides all of the Database's properties as configured on your Civo account. /// /// Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = Civo.GetDatabase.Invoke(new() + /// { + /// Name = "test-database", + /// Region = "LON1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetDatabaseArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getDatabase:getDatabase", args ?? new GetDatabaseArgs(), options.WithDefaults()); @@ -23,6 +46,29 @@ public static Task InvokeAsync(GetDatabaseArgs? args = null, /// Get information of an Database for use in other resources. This data source provides all of the Database's properties as configured on your Civo account. /// /// Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = Civo.GetDatabase.Invoke(new() + /// { + /// Name = "test-database", + /// Region = "LON1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetDatabaseInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getDatabase:getDatabase", args ?? new GetDatabaseInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetDnsDomainName.cs b/sdk/dotnet/GetDnsDomainName.cs index 207918cd..43878f89 100644 --- a/sdk/dotnet/GetDnsDomainName.cs +++ b/sdk/dotnet/GetDnsDomainName.cs @@ -15,6 +15,33 @@ public static class GetDnsDomainName /// Get information on a domain. This data source provides the name and the id. /// /// An error will be raised if the provided domain name is not in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var domain = Civo.GetDnsDomainName.Invoke(new() + /// { + /// Name = "domain.com", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["domainOutput"] = domain.Apply(getDnsDomainNameResult => getDnsDomainNameResult.Name), + /// ["domainIdOutput"] = domain.Apply(getDnsDomainNameResult => getDnsDomainNameResult.Id), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetDnsDomainNameArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getDnsDomainName:getDnsDomainName", args ?? new GetDnsDomainNameArgs(), options.WithDefaults()); @@ -23,6 +50,33 @@ public static Task InvokeAsync(GetDnsDomainNameArgs? arg /// Get information on a domain. This data source provides the name and the id. /// /// An error will be raised if the provided domain name is not in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var domain = Civo.GetDnsDomainName.Invoke(new() + /// { + /// Name = "domain.com", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["domainOutput"] = domain.Apply(getDnsDomainNameResult => getDnsDomainNameResult.Name), + /// ["domainIdOutput"] = domain.Apply(getDnsDomainNameResult => getDnsDomainNameResult.Id), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetDnsDomainNameInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getDnsDomainName:getDnsDomainName", args ?? new GetDnsDomainNameInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetDnsDomainRecord.cs b/sdk/dotnet/GetDnsDomainRecord.cs index f33268cc..8636623c 100644 --- a/sdk/dotnet/GetDnsDomainRecord.cs +++ b/sdk/dotnet/GetDnsDomainRecord.cs @@ -15,6 +15,39 @@ public static class GetDnsDomainRecord /// Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your Civo account. /// /// An error will be raised if the provided domain name or record are not in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var domain = Civo.GetDnsDomainName.Invoke(new() + /// { + /// Name = "domain.com", + /// }); + /// + /// var www = Civo.GetDnsDomainRecord.Invoke(new() + /// { + /// DomainId = domain.Apply(getDnsDomainNameResult => getDnsDomainNameResult.Id), + /// Name = "www", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["recordType"] = www.Apply(getDnsDomainRecordResult => getDnsDomainRecordResult.Type), + /// ["recordTtl"] = www.Apply(getDnsDomainRecordResult => getDnsDomainRecordResult.Ttl), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetDnsDomainRecordArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getDnsDomainRecord:getDnsDomainRecord", args ?? new GetDnsDomainRecordArgs(), options.WithDefaults()); @@ -23,6 +56,39 @@ public static Task InvokeAsync(GetDnsDomainRecordArgs /// Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your Civo account. /// /// An error will be raised if the provided domain name or record are not in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var domain = Civo.GetDnsDomainName.Invoke(new() + /// { + /// Name = "domain.com", + /// }); + /// + /// var www = Civo.GetDnsDomainRecord.Invoke(new() + /// { + /// DomainId = domain.Apply(getDnsDomainNameResult => getDnsDomainNameResult.Id), + /// Name = "www", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["recordType"] = www.Apply(getDnsDomainRecordResult => getDnsDomainRecordResult.Type), + /// ["recordTtl"] = www.Apply(getDnsDomainRecordResult => getDnsDomainRecordResult.Ttl), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetDnsDomainRecordInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getDnsDomainRecord:getDnsDomainRecord", args ?? new GetDnsDomainRecordInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetFirewall.cs b/sdk/dotnet/GetFirewall.cs index efc97092..5eec874e 100644 --- a/sdk/dotnet/GetFirewall.cs +++ b/sdk/dotnet/GetFirewall.cs @@ -17,6 +17,29 @@ public static class GetFirewall /// This data source provides all of the firewall's properties as configured on your Civo account. /// /// Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = Civo.GetFirewall.Invoke(new() + /// { + /// Name = "test-firewall", + /// Region = "LON1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetFirewallArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getFirewall:getFirewall", args ?? new GetFirewallArgs(), options.WithDefaults()); @@ -27,6 +50,29 @@ public static Task InvokeAsync(GetFirewallArgs? args = null, /// This data source provides all of the firewall's properties as configured on your Civo account. /// /// Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = Civo.GetFirewall.Invoke(new() + /// { + /// Name = "test-firewall", + /// Region = "LON1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetFirewallInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getFirewall:getFirewall", args ?? new GetFirewallInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetInstance.cs b/sdk/dotnet/GetInstance.cs index 8510de8d..b9299bb6 100644 --- a/sdk/dotnet/GetInstance.cs +++ b/sdk/dotnet/GetInstance.cs @@ -15,6 +15,32 @@ public static class GetInstance /// Get information on an instance for use in other resources. This data source provides all of the instance's properties as configured on your Civo account. /// /// Note: This data source returns a single instance. When specifying a hostname, an error will be raised if more than one instances found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var myhostaname = Civo.GetInstance.Invoke(new() + /// { + /// Hostname = "myhostname.com", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["instanceOutput"] = myhostaname.Apply(getInstanceResult => getInstanceResult.PublicIp), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetInstanceArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getInstance:getInstance", args ?? new GetInstanceArgs(), options.WithDefaults()); @@ -23,6 +49,32 @@ public static Task InvokeAsync(GetInstanceArgs? args = null, /// Get information on an instance for use in other resources. This data source provides all of the instance's properties as configured on your Civo account. /// /// Note: This data source returns a single instance. When specifying a hostname, an error will be raised if more than one instances found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var myhostaname = Civo.GetInstance.Invoke(new() + /// { + /// Hostname = "myhostname.com", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["instanceOutput"] = myhostaname.Apply(getInstanceResult => getInstanceResult.PublicIp), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetInstanceInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getInstance:getInstance", args ?? new GetInstanceInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetInstances.cs b/sdk/dotnet/GetInstances.cs index 71883d89..c485d6e7 100644 --- a/sdk/dotnet/GetInstances.cs +++ b/sdk/dotnet/GetInstances.cs @@ -15,6 +15,39 @@ public static class GetInstances /// Get information on instances for use in other resources, with the ability to filter and sort the results. If no filters are specified, all instances will be returned. /// /// Note: You can use the `civo.Instance` data source to obtain metadata about a single instance if you already know the id, unique hostname, or unique tag to retrieve. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var small_size = Civo.GetInstances.Invoke(new() + /// { + /// Region = "LON1", + /// Filters = new[] + /// { + /// new Civo.Inputs.GetInstancesFilterInputArgs + /// { + /// Key = "size", + /// Values = new[] + /// { + /// g3.Small, + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetInstancesArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getInstances:getInstances", args ?? new GetInstancesArgs(), options.WithDefaults()); @@ -23,6 +56,39 @@ public static Task InvokeAsync(GetInstancesArgs? args = null /// Get information on instances for use in other resources, with the ability to filter and sort the results. If no filters are specified, all instances will be returned. /// /// Note: You can use the `civo.Instance` data source to obtain metadata about a single instance if you already know the id, unique hostname, or unique tag to retrieve. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var small_size = Civo.GetInstances.Invoke(new() + /// { + /// Region = "LON1", + /// Filters = new[] + /// { + /// new Civo.Inputs.GetInstancesFilterInputArgs + /// { + /// Key = "size", + /// Values = new[] + /// { + /// g3.Small, + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetInstancesInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getInstances:getInstances", args ?? new GetInstancesInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetKubernetesCluster.cs b/sdk/dotnet/GetKubernetesCluster.cs index b0c600ae..d3b17f45 100644 --- a/sdk/dotnet/GetKubernetesCluster.cs +++ b/sdk/dotnet/GetKubernetesCluster.cs @@ -15,6 +15,32 @@ public static class GetKubernetesCluster /// Provides a Civo Kubernetes cluster data source. /// /// Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var my_cluster = Civo.GetKubernetesCluster.Invoke(new() + /// { + /// Name = "my-super-cluster", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["kubernetesClusterOutput"] = my_cluster.Apply(my_cluster => my_cluster.Apply(getKubernetesClusterResult => getKubernetesClusterResult.MasterIp)), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetKubernetesClusterArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getKubernetesCluster:getKubernetesCluster", args ?? new GetKubernetesClusterArgs(), options.WithDefaults()); @@ -23,6 +49,32 @@ public static Task InvokeAsync(GetKubernetesClusterA /// Provides a Civo Kubernetes cluster data source. /// /// Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var my_cluster = Civo.GetKubernetesCluster.Invoke(new() + /// { + /// Name = "my-super-cluster", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["kubernetesClusterOutput"] = my_cluster.Apply(my_cluster => my_cluster.Apply(getKubernetesClusterResult => getKubernetesClusterResult.MasterIp)), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetKubernetesClusterInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getKubernetesCluster:getKubernetesCluster", args ?? new GetKubernetesClusterInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetKubernetesVersion.cs b/sdk/dotnet/GetKubernetesVersion.cs index 96709cad..4ab7caae 100644 --- a/sdk/dotnet/GetKubernetesVersion.cs +++ b/sdk/dotnet/GetKubernetesVersion.cs @@ -13,12 +13,106 @@ public static class GetKubernetesVersion { /// /// Provides access to the available Civo Kubernetes versions, with the ability to filter the results. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var talos = Civo.GetKubernetesVersion.Invoke(new() + /// { + /// Filters = new[] + /// { + /// new Civo.Inputs.GetKubernetesVersionFilterInputArgs + /// { + /// Key = "type", + /// Values = new[] + /// { + /// "talos", + /// }, + /// }, + /// }, + /// }); + /// + /// var k3s = Civo.GetKubernetesVersion.Invoke(new() + /// { + /// Filters = new[] + /// { + /// new Civo.Inputs.GetKubernetesVersionFilterInputArgs + /// { + /// Key = "type", + /// Values = new[] + /// { + /// "k3s", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetKubernetesVersionArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getKubernetesVersion:getKubernetesVersion", args ?? new GetKubernetesVersionArgs(), options.WithDefaults()); /// /// Provides access to the available Civo Kubernetes versions, with the ability to filter the results. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var talos = Civo.GetKubernetesVersion.Invoke(new() + /// { + /// Filters = new[] + /// { + /// new Civo.Inputs.GetKubernetesVersionFilterInputArgs + /// { + /// Key = "type", + /// Values = new[] + /// { + /// "talos", + /// }, + /// }, + /// }, + /// }); + /// + /// var k3s = Civo.GetKubernetesVersion.Invoke(new() + /// { + /// Filters = new[] + /// { + /// new Civo.Inputs.GetKubernetesVersionFilterInputArgs + /// { + /// Key = "type", + /// Values = new[] + /// { + /// "k3s", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetKubernetesVersionInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getKubernetesVersion:getKubernetesVersion", args ?? new GetKubernetesVersionInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetLoadBalancer.cs b/sdk/dotnet/GetLoadBalancer.cs index bffb7dea..86927f2f 100644 --- a/sdk/dotnet/GetLoadBalancer.cs +++ b/sdk/dotnet/GetLoadBalancer.cs @@ -15,6 +15,33 @@ public static class GetLoadBalancer /// Get information on a load balancer for use in other resources. This data source provides all of the load balancers properties as configured on your Civo account. /// /// An error will be raised if the provided load balancer name does not exist in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var my_lb = Civo.GetLoadBalancer.Invoke(new() + /// { + /// Name = "lb-name", + /// Region = "LON1", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["civoLoadbalancerOutput"] = my_lb.Apply(my_lb => my_lb.Apply(getLoadBalancerResult => getLoadBalancerResult.PublicIp)), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetLoadBalancerArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getLoadBalancer:getLoadBalancer", args ?? new GetLoadBalancerArgs(), options.WithDefaults()); @@ -23,6 +50,33 @@ public static Task InvokeAsync(GetLoadBalancerArgs? args /// Get information on a load balancer for use in other resources. This data source provides all of the load balancers properties as configured on your Civo account. /// /// An error will be raised if the provided load balancer name does not exist in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var my_lb = Civo.GetLoadBalancer.Invoke(new() + /// { + /// Name = "lb-name", + /// Region = "LON1", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["civoLoadbalancerOutput"] = my_lb.Apply(my_lb => my_lb.Apply(getLoadBalancerResult => getLoadBalancerResult.PublicIp)), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetLoadBalancerInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getLoadBalancer:getLoadBalancer", args ?? new GetLoadBalancerInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetNetwork.cs b/sdk/dotnet/GetNetwork.cs index d9a4a671..ff97d6be 100644 --- a/sdk/dotnet/GetNetwork.cs +++ b/sdk/dotnet/GetNetwork.cs @@ -17,6 +17,29 @@ public static class GetNetwork /// This data source provides all of the network's properties as configured on your Civo account. /// /// Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = Civo.GetNetwork.Invoke(new() + /// { + /// Label = "test-network", + /// Region = "LON1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetNetworkArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getNetwork:getNetwork", args ?? new GetNetworkArgs(), options.WithDefaults()); @@ -27,6 +50,29 @@ public static Task InvokeAsync(GetNetworkArgs? args = null, In /// This data source provides all of the network's properties as configured on your Civo account. /// /// Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = Civo.GetNetwork.Invoke(new() + /// { + /// Label = "test-network", + /// Region = "LON1", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetNetworkInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getNetwork:getNetwork", args ?? new GetNetworkInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetObjectStore.cs b/sdk/dotnet/GetObjectStore.cs index 5acf95d1..f59162f9 100644 --- a/sdk/dotnet/GetObjectStore.cs +++ b/sdk/dotnet/GetObjectStore.cs @@ -15,6 +15,28 @@ public static class GetObjectStore /// Get information of an Object Store for use in other resources. This data source provides all of the Object Store's properties as configured on your Civo account. /// /// Note: This data source returns a single Object Store. When specifying a name, an error will be raised if more than one Object Stores with the same name found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var backup = Civo.GetObjectStore.Invoke(new() + /// { + /// Name = "backup-server", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetObjectStoreArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getObjectStore:getObjectStore", args ?? new GetObjectStoreArgs(), options.WithDefaults()); @@ -23,6 +45,28 @@ public static Task InvokeAsync(GetObjectStoreArgs? args = /// Get information of an Object Store for use in other resources. This data source provides all of the Object Store's properties as configured on your Civo account. /// /// Note: This data source returns a single Object Store. When specifying a name, an error will be raised if more than one Object Stores with the same name found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var backup = Civo.GetObjectStore.Invoke(new() + /// { + /// Name = "backup-server", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetObjectStoreInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getObjectStore:getObjectStore", args ?? new GetObjectStoreInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetObjectStoreCredential.cs b/sdk/dotnet/GetObjectStoreCredential.cs index 4c972bad..8cf1acc7 100644 --- a/sdk/dotnet/GetObjectStoreCredential.cs +++ b/sdk/dotnet/GetObjectStoreCredential.cs @@ -15,6 +15,36 @@ public static class GetObjectStoreCredential /// Get information of an Object Store Credential for use in other resources. This data source provides all of the Object Store Credential's properties as configured on your Civo account. /// /// Note: This data source returns a single Object Store Credential. When specifying a name, an error will be raised if more than one Object Store Credentials with the same name found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var backupObjectStoreCredential = Civo.GetObjectStoreCredential.Invoke(new() + /// { + /// Name = "backup-server", + /// }); + /// + /// // Use the credential to create a bucket + /// var backupObjectStore = new Civo.ObjectStore("backupObjectStore", new() + /// { + /// MaxSizeGb = 500, + /// Region = "LON1", + /// AccessKeyId = backupObjectStoreCredential.Apply(getObjectStoreCredentialResult => getObjectStoreCredentialResult.AccessKeyId), + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetObjectStoreCredentialArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getObjectStoreCredential:getObjectStoreCredential", args ?? new GetObjectStoreCredentialArgs(), options.WithDefaults()); @@ -23,6 +53,36 @@ public static Task InvokeAsync(GetObjectStoreCre /// Get information of an Object Store Credential for use in other resources. This data source provides all of the Object Store Credential's properties as configured on your Civo account. /// /// Note: This data source returns a single Object Store Credential. When specifying a name, an error will be raised if more than one Object Store Credentials with the same name found. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var backupObjectStoreCredential = Civo.GetObjectStoreCredential.Invoke(new() + /// { + /// Name = "backup-server", + /// }); + /// + /// // Use the credential to create a bucket + /// var backupObjectStore = new Civo.ObjectStore("backupObjectStore", new() + /// { + /// MaxSizeGb = 500, + /// Region = "LON1", + /// AccessKeyId = backupObjectStoreCredential.Apply(getObjectStoreCredentialResult => getObjectStoreCredentialResult.AccessKeyId), + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetObjectStoreCredentialInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getObjectStoreCredential:getObjectStoreCredential", args ?? new GetObjectStoreCredentialInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetVolume.cs b/sdk/dotnet/GetVolume.cs index 5a838796..2429d6a9 100644 --- a/sdk/dotnet/GetVolume.cs +++ b/sdk/dotnet/GetVolume.cs @@ -15,6 +15,32 @@ public static class GetVolume /// Get information on a volume for use in other resources. This data source provides all of the volumes properties as configured on your Civo account. /// /// An error will be raised if the provided volume name does not exist in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var myvolume = Civo.GetVolume.Invoke(new() + /// { + /// Name = "test-volume-name", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["volumeOutput"] = myvolume, + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Task InvokeAsync(GetVolumeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("civo:index/getVolume:getVolume", args ?? new GetVolumeArgs(), options.WithDefaults()); @@ -23,6 +49,32 @@ public static Task InvokeAsync(GetVolumeArgs? args = null, Invo /// Get information on a volume for use in other resources. This data source provides all of the volumes properties as configured on your Civo account. /// /// An error will be raised if the provided volume name does not exist in your Civo account. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var myvolume = Civo.GetVolume.Invoke(new() + /// { + /// Name = "test-volume-name", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["volumeOutput"] = myvolume, + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} /// public static Output Invoke(GetVolumeInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("civo:index/getVolume:getVolume", args ?? new GetVolumeInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/InstanceReservedIpAssignment.cs b/sdk/dotnet/InstanceReservedIpAssignment.cs index 62c47db0..9548440c 100644 --- a/sdk/dotnet/InstanceReservedIpAssignment.cs +++ b/sdk/dotnet/InstanceReservedIpAssignment.cs @@ -11,6 +11,29 @@ namespace Pulumi.Civo { /// /// The instance reserved ip assignment resource schema definition + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // Send to create a reserved IP + /// var www = new Civo.ReservedIp("www"); + /// + /// // We assign the reserved IP to the instance + /// var webserver_www = new Civo.InstanceReservedIpAssignment("webserver-www", new() + /// { + /// InstanceId = civo_instance.Www.Id, + /// ReservedIpId = civo_reserved_ip.Web_server.Id, + /// }); + /// + /// }); + /// ``` /// [CivoResourceType("civo:index/instanceReservedIpAssignment:InstanceReservedIpAssignment")] public partial class InstanceReservedIpAssignment : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Network.cs b/sdk/dotnet/Network.cs index 20f1f4c6..074686dd 100644 --- a/sdk/dotnet/Network.cs +++ b/sdk/dotnet/Network.cs @@ -12,6 +12,24 @@ namespace Pulumi.Civo /// /// Provides a Civo network resource. This can be used to create, modify, and delete networks. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var customNet = new Civo.Network("customNet", new() + /// { + /// Label = "test_network", + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// using ID diff --git a/sdk/dotnet/ObjectStore.cs b/sdk/dotnet/ObjectStore.cs index 03b26665..c511b569 100644 --- a/sdk/dotnet/ObjectStore.cs +++ b/sdk/dotnet/ObjectStore.cs @@ -12,6 +12,30 @@ namespace Pulumi.Civo /// /// Provides an Object Store resource. This can be used to create, modify, and delete object stores. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var backupObjectStore = new Civo.ObjectStore("backupObjectStore", new() + /// { + /// MaxSizeGb = 500, + /// Region = "LON1", + /// }); + /// + /// var backupObjectStoreCredential = Civo.GetObjectStoreCredential.Invoke(new() + /// { + /// Id = backupObjectStore.AccessKeyId, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// using ID diff --git a/sdk/dotnet/ObjectStoreCredential.cs b/sdk/dotnet/ObjectStoreCredential.cs index ae0b5ba7..1da3e98b 100644 --- a/sdk/dotnet/ObjectStoreCredential.cs +++ b/sdk/dotnet/ObjectStoreCredential.cs @@ -12,6 +12,39 @@ namespace Pulumi.Civo /// /// Provides an Object Store Credential resource. This can be used to create, modify, and delete object stores credential. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var backupObjectStoreCredential = Civo.GetObjectStoreCredential.Invoke(new() + /// { + /// Name = "backup-server", + /// }); + /// + /// // Create a credential for the object store with a specific access key and secret key + /// var backupIndex_objectStoreCredentialObjectStoreCredential = new Civo.ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", new() + /// { + /// AccessKeyId = "my-access-key", + /// SecretAccessKey = "my-secret-key", + /// }); + /// + /// // Use the credential to create a bucket + /// var backupObjectStore = new Civo.ObjectStore("backupObjectStore", new() + /// { + /// MaxSizeGb = 500, + /// Region = "LON1", + /// AccessKeyId = backupIndex / objectStoreCredentialObjectStoreCredential.AccessKeyId, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// using ID diff --git a/sdk/dotnet/ReservedIp.cs b/sdk/dotnet/ReservedIp.cs index f8632fa1..ada75825 100644 --- a/sdk/dotnet/ReservedIp.cs +++ b/sdk/dotnet/ReservedIp.cs @@ -12,6 +12,21 @@ namespace Pulumi.Civo /// /// Provides a Civo reserved IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Instancesor Load Balancer. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var www = new Civo.ReservedIp("www"); + /// + /// }); + /// ``` + /// /// ## Import /// /// terrafom import civo_reserved_ip.www 9f0e86fc-b2c6-46b4-82ed-2f28419f8ae3 diff --git a/sdk/dotnet/SshKey.cs b/sdk/dotnet/SshKey.cs index 3d1c7175..386ee054 100644 --- a/sdk/dotnet/SshKey.cs +++ b/sdk/dotnet/SshKey.cs @@ -12,6 +12,25 @@ namespace Pulumi.Civo /// /// Provides a Civo SSH key resource to allow you to manage SSH keys for instance access. Keys created with this resource can be referenced in your instance configuration via their ID. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.IO; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var my_user = new Civo.SshKey("my-user", new() + /// { + /// PublicKey = File.ReadAllText("~/.ssh/id_rsa.pub"), + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// using ID diff --git a/sdk/dotnet/Volume.cs b/sdk/dotnet/Volume.cs index 2595ccc4..e0a49e99 100644 --- a/sdk/dotnet/Volume.cs +++ b/sdk/dotnet/Volume.cs @@ -12,6 +12,37 @@ namespace Pulumi.Civo /// /// Provides a Civo volume which can be attached to an instance in order to provide expanded storage. /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Civo = Pulumi.Civo; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var defaultNetwork = Civo.GetNetwork.Invoke(new() + /// { + /// Label = "Default", + /// }); + /// + /// // Create volume + /// var db = new Civo.Volume("db", new() + /// { + /// SizeGb = 5, + /// NetworkId = defaultNetwork.Apply(getNetworkResult => getNetworkResult.Id), + /// }, new CustomResourceOptions + /// { + /// DependsOn = new[] + /// { + /// defaultNetwork, + /// }, + /// }); + /// + /// }); + /// ``` + /// /// ## Import /// /// using ID diff --git a/sdk/go/civo/dnsDomainName.go b/sdk/go/civo/dnsDomainName.go index 8554b6e8..d92685d4 100644 --- a/sdk/go/civo/dnsDomainName.go +++ b/sdk/go/civo/dnsDomainName.go @@ -14,6 +14,30 @@ import ( // Provides a Civo DNS domain name resource. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.NewDnsDomainName(ctx, "main", nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // using domain name diff --git a/sdk/go/civo/firewall.go b/sdk/go/civo/firewall.go index c44543a1..6cfa3d9c 100644 --- a/sdk/go/civo/firewall.go +++ b/sdk/go/civo/firewall.go @@ -14,6 +14,87 @@ import ( // Provides a Civo firewall resource. This can be used to create, modify, and delete firewalls. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// customNet, err := civo.NewNetwork(ctx, "customNet", &civo.NetworkArgs{ +// Label: pulumi.String("my-custom-network"), +// }) +// if err != nil { +// return err +// } +// _, err = civo.NewFirewall(ctx, "wwwFirewall", &civo.FirewallArgs{ +// NetworkId: customNet.ID(), +// }) +// if err != nil { +// return err +// } +// _, err = civo.NewFirewall(ctx, "wwwIndex/firewallFirewall", &civo.FirewallArgs{ +// NetworkId: customNet.ID(), +// CreateDefaultRules: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// _, err = civo.NewFirewall(ctx, "wwwCivoIndex/firewallFirewall", &civo.FirewallArgs{ +// NetworkId: customNet.ID(), +// CreateDefaultRules: pulumi.Bool(false), +// IngressRules: civo.FirewallIngressRuleArray{ +// &civo.FirewallIngressRuleArgs{ +// Label: pulumi.String("k8s"), +// Protocol: pulumi.String("tcp"), +// PortRange: pulumi.String("6443"), +// Cidrs: pulumi.StringArray{ +// pulumi.String("192.168.1.1/32"), +// pulumi.String("192.168.10.4/32"), +// pulumi.String("192.168.10.10/32"), +// }, +// Action: pulumi.String("allow"), +// }, +// &civo.FirewallIngressRuleArgs{ +// Label: pulumi.String("ssh"), +// Protocol: pulumi.String("tcp"), +// PortRange: pulumi.String("22"), +// Cidrs: pulumi.StringArray{ +// pulumi.String("192.168.1.1/32"), +// pulumi.String("192.168.10.4/32"), +// pulumi.String("192.168.10.10/32"), +// }, +// Action: pulumi.String("allow"), +// }, +// }, +// EgressRules: civo.FirewallEgressRuleArray{ +// &civo.FirewallEgressRuleArgs{ +// Label: pulumi.String("all"), +// Protocol: pulumi.String("tcp"), +// PortRange: pulumi.String("1-65535"), +// Cidrs: pulumi.StringArray{ +// pulumi.String("0.0.0.0/0"), +// }, +// Action: pulumi.String("allow"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // using ID diff --git a/sdk/go/civo/getDatabase.go b/sdk/go/civo/getDatabase.go index 1f76ae09..20cb147b 100644 --- a/sdk/go/civo/getDatabase.go +++ b/sdk/go/civo/getDatabase.go @@ -15,6 +15,33 @@ import ( // Get information of an Database for use in other resources. This data source provides all of the Database's properties as configured on your Civo account. // // Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.LookupDatabase(ctx, &civo.LookupDatabaseArgs{ +// Name: pulumi.StringRef("test-database"), +// Region: pulumi.StringRef("LON1"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupDatabase(ctx *pulumi.Context, args *LookupDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupDatabaseResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDatabaseResult diff --git a/sdk/go/civo/getDnsDomainName.go b/sdk/go/civo/getDnsDomainName.go index e3b0f233..4334bf66 100644 --- a/sdk/go/civo/getDnsDomainName.go +++ b/sdk/go/civo/getDnsDomainName.go @@ -15,6 +15,34 @@ import ( // Get information on a domain. This data source provides the name and the id. // // An error will be raised if the provided domain name is not in your Civo account. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// domain, err := civo.LookupDnsDomainName(ctx, &civo.LookupDnsDomainNameArgs{ +// Name: pulumi.StringRef("domain.com"), +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("domainOutput", domain.Name) +// ctx.Export("domainIdOutput", domain.Id) +// return nil +// }) +// } +// +// ``` func LookupDnsDomainName(ctx *pulumi.Context, args *LookupDnsDomainNameArgs, opts ...pulumi.InvokeOption) (*LookupDnsDomainNameResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDnsDomainNameResult diff --git a/sdk/go/civo/getDnsDomainRecord.go b/sdk/go/civo/getDnsDomainRecord.go index 8c1f74b5..c54196b1 100644 --- a/sdk/go/civo/getDnsDomainRecord.go +++ b/sdk/go/civo/getDnsDomainRecord.go @@ -15,6 +15,41 @@ import ( // Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your Civo account. // // An error will be raised if the provided domain name or record are not in your Civo account. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// domain, err := civo.LookupDnsDomainName(ctx, &civo.LookupDnsDomainNameArgs{ +// Name: pulumi.StringRef("domain.com"), +// }, nil) +// if err != nil { +// return err +// } +// www, err := civo.LookupDnsDomainRecord(ctx, &civo.LookupDnsDomainRecordArgs{ +// DomainId: domain.Id, +// Name: "www", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("recordType", www.Type) +// ctx.Export("recordTtl", www.Ttl) +// return nil +// }) +// } +// +// ``` func LookupDnsDomainRecord(ctx *pulumi.Context, args *LookupDnsDomainRecordArgs, opts ...pulumi.InvokeOption) (*LookupDnsDomainRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDnsDomainRecordResult diff --git a/sdk/go/civo/getFirewall.go b/sdk/go/civo/getFirewall.go index 22d1f86e..a02e3d76 100644 --- a/sdk/go/civo/getFirewall.go +++ b/sdk/go/civo/getFirewall.go @@ -17,6 +17,33 @@ import ( // This data source provides all of the firewall's properties as configured on your Civo account. // // Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.LookupFirewall(ctx, &civo.LookupFirewallArgs{ +// Name: pulumi.StringRef("test-firewall"), +// Region: pulumi.StringRef("LON1"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupFirewall(ctx *pulumi.Context, args *LookupFirewallArgs, opts ...pulumi.InvokeOption) (*LookupFirewallResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupFirewallResult diff --git a/sdk/go/civo/getInstance.go b/sdk/go/civo/getInstance.go index e59ee9dc..2adda52f 100644 --- a/sdk/go/civo/getInstance.go +++ b/sdk/go/civo/getInstance.go @@ -15,6 +15,33 @@ import ( // Get information on an instance for use in other resources. This data source provides all of the instance's properties as configured on your Civo account. // // Note: This data source returns a single instance. When specifying a hostname, an error will be raised if more than one instances found. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// myhostaname, err := civo.LookupInstance(ctx, &civo.LookupInstanceArgs{ +// Hostname: pulumi.StringRef("myhostname.com"), +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("instanceOutput", myhostaname.PublicIp) +// return nil +// }) +// } +// +// ``` func LookupInstance(ctx *pulumi.Context, args *LookupInstanceArgs, opts ...pulumi.InvokeOption) (*LookupInstanceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupInstanceResult diff --git a/sdk/go/civo/getInstances.go b/sdk/go/civo/getInstances.go index 8e5ed35e..6e9d1422 100644 --- a/sdk/go/civo/getInstances.go +++ b/sdk/go/civo/getInstances.go @@ -15,6 +15,38 @@ import ( // Get information on instances for use in other resources, with the ability to filter and sort the results. If no filters are specified, all instances will be returned. // // Note: You can use the `Instance` data source to obtain metadata about a single instance if you already know the id, unique hostname, or unique tag to retrieve. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.GetInstances(ctx, &civo.GetInstancesArgs{ +// Region: pulumi.StringRef("LON1"), +// Filters: []civo.GetInstancesFilter{ +// { +// Key: "size", +// Values: interface{}{ +// g3.Small, +// }, +// }, +// }, +// }, nil); +// if err != nil { +// return err +// } +// return nil +// }) +// } +// ``` func GetInstances(ctx *pulumi.Context, args *GetInstancesArgs, opts ...pulumi.InvokeOption) (*GetInstancesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetInstancesResult diff --git a/sdk/go/civo/getKubernetesCluster.go b/sdk/go/civo/getKubernetesCluster.go index e4da9342..80f82e23 100644 --- a/sdk/go/civo/getKubernetesCluster.go +++ b/sdk/go/civo/getKubernetesCluster.go @@ -15,6 +15,33 @@ import ( // Provides a Civo Kubernetes cluster data source. // // Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// my_cluster, err := civo.LookupKubernetesCluster(ctx, &civo.LookupKubernetesClusterArgs{ +// Name: pulumi.StringRef("my-super-cluster"), +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("kubernetesClusterOutput", my_cluster.MasterIp) +// return nil +// }) +// } +// +// ``` func LookupKubernetesCluster(ctx *pulumi.Context, args *LookupKubernetesClusterArgs, opts ...pulumi.InvokeOption) (*LookupKubernetesClusterResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupKubernetesClusterResult diff --git a/sdk/go/civo/getKubernetesVersion.go b/sdk/go/civo/getKubernetesVersion.go index 38a5741b..ee4ea349 100644 --- a/sdk/go/civo/getKubernetesVersion.go +++ b/sdk/go/civo/getKubernetesVersion.go @@ -13,6 +13,52 @@ import ( ) // Provides access to the available Civo Kubernetes versions, with the ability to filter the results. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.GetKubernetesVersion(ctx, &civo.GetKubernetesVersionArgs{ +// Filters: []civo.GetKubernetesVersionFilter{ +// { +// Key: "type", +// Values: []string{ +// "talos", +// }, +// }, +// }, +// }, nil) +// if err != nil { +// return err +// } +// _, err = civo.GetKubernetesVersion(ctx, &civo.GetKubernetesVersionArgs{ +// Filters: []civo.GetKubernetesVersionFilter{ +// { +// Key: "type", +// Values: []string{ +// "k3s", +// }, +// }, +// }, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetKubernetesVersion(ctx *pulumi.Context, args *GetKubernetesVersionArgs, opts ...pulumi.InvokeOption) (*GetKubernetesVersionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetKubernetesVersionResult diff --git a/sdk/go/civo/getLoadBalancer.go b/sdk/go/civo/getLoadBalancer.go index 3d52c19a..7afb7d63 100644 --- a/sdk/go/civo/getLoadBalancer.go +++ b/sdk/go/civo/getLoadBalancer.go @@ -15,6 +15,34 @@ import ( // Get information on a load balancer for use in other resources. This data source provides all of the load balancers properties as configured on your Civo account. // // An error will be raised if the provided load balancer name does not exist in your Civo account. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// my_lb, err := civo.GetLoadBalancer(ctx, &civo.GetLoadBalancerArgs{ +// Name: pulumi.StringRef("lb-name"), +// Region: pulumi.StringRef("LON1"), +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("civoLoadbalancerOutput", my_lb.PublicIp) +// return nil +// }) +// } +// +// ``` func GetLoadBalancer(ctx *pulumi.Context, args *GetLoadBalancerArgs, opts ...pulumi.InvokeOption) (*GetLoadBalancerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetLoadBalancerResult diff --git a/sdk/go/civo/getNetwork.go b/sdk/go/civo/getNetwork.go index 6e387272..eb28b7f8 100644 --- a/sdk/go/civo/getNetwork.go +++ b/sdk/go/civo/getNetwork.go @@ -17,6 +17,33 @@ import ( // This data source provides all of the network's properties as configured on your Civo account. // // Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.LookupNetwork(ctx, &civo.LookupNetworkArgs{ +// Label: pulumi.StringRef("test-network"), +// Region: pulumi.StringRef("LON1"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupNetwork(ctx *pulumi.Context, args *LookupNetworkArgs, opts ...pulumi.InvokeOption) (*LookupNetworkResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkResult diff --git a/sdk/go/civo/getObjectStore.go b/sdk/go/civo/getObjectStore.go index b90ce1cb..0d894e92 100644 --- a/sdk/go/civo/getObjectStore.go +++ b/sdk/go/civo/getObjectStore.go @@ -15,6 +15,32 @@ import ( // Get information of an Object Store for use in other resources. This data source provides all of the Object Store's properties as configured on your Civo account. // // Note: This data source returns a single Object Store. When specifying a name, an error will be raised if more than one Object Stores with the same name found. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.LookupObjectStore(ctx, &civo.LookupObjectStoreArgs{ +// Name: pulumi.StringRef("backup-server"), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupObjectStore(ctx *pulumi.Context, args *LookupObjectStoreArgs, opts ...pulumi.InvokeOption) (*LookupObjectStoreResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupObjectStoreResult diff --git a/sdk/go/civo/getObjectStoreCredential.go b/sdk/go/civo/getObjectStoreCredential.go index 24a27494..942cea43 100644 --- a/sdk/go/civo/getObjectStoreCredential.go +++ b/sdk/go/civo/getObjectStoreCredential.go @@ -15,6 +15,40 @@ import ( // Get information of an Object Store Credential for use in other resources. This data source provides all of the Object Store Credential's properties as configured on your Civo account. // // Note: This data source returns a single Object Store Credential. When specifying a name, an error will be raised if more than one Object Store Credentials with the same name found. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// backupObjectStoreCredential, err := civo.LookupObjectStoreCredential(ctx, &civo.LookupObjectStoreCredentialArgs{ +// Name: pulumi.StringRef("backup-server"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = civo.NewObjectStore(ctx, "backupObjectStore", &civo.ObjectStoreArgs{ +// MaxSizeGb: pulumi.Int(500), +// Region: pulumi.String("LON1"), +// AccessKeyId: *pulumi.String(backupObjectStoreCredential.AccessKeyId), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func LookupObjectStoreCredential(ctx *pulumi.Context, args *LookupObjectStoreCredentialArgs, opts ...pulumi.InvokeOption) (*LookupObjectStoreCredentialResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupObjectStoreCredentialResult diff --git a/sdk/go/civo/getVolume.go b/sdk/go/civo/getVolume.go index 78afb99f..d90acdcc 100644 --- a/sdk/go/civo/getVolume.go +++ b/sdk/go/civo/getVolume.go @@ -15,6 +15,33 @@ import ( // Get information on a volume for use in other resources. This data source provides all of the volumes properties as configured on your Civo account. // // An error will be raised if the provided volume name does not exist in your Civo account. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// myvolume, err := civo.LookupVolume(ctx, &civo.LookupVolumeArgs{ +// Name: pulumi.StringRef("test-volume-name"), +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("volumeOutput", myvolume) +// return nil +// }) +// } +// +// ``` func LookupVolume(ctx *pulumi.Context, args *LookupVolumeArgs, opts ...pulumi.InvokeOption) (*LookupVolumeResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVolumeResult diff --git a/sdk/go/civo/instanceReservedIpAssignment.go b/sdk/go/civo/instanceReservedIpAssignment.go index bcb670f1..d87c8dee 100644 --- a/sdk/go/civo/instanceReservedIpAssignment.go +++ b/sdk/go/civo/instanceReservedIpAssignment.go @@ -14,6 +14,37 @@ import ( ) // The instance reserved ip assignment resource schema definition +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.NewReservedIp(ctx, "www", nil) +// if err != nil { +// return err +// } +// _, err = civo.NewInstanceReservedIpAssignment(ctx, "webserver-www", &civo.InstanceReservedIpAssignmentArgs{ +// InstanceId: pulumi.Any(civo_instance.Www.Id), +// ReservedIpId: pulumi.Any(civo_reserved_ip.WebServer.Id), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type InstanceReservedIpAssignment struct { pulumi.CustomResourceState diff --git a/sdk/go/civo/network.go b/sdk/go/civo/network.go index 738bac09..3f6ec772 100644 --- a/sdk/go/civo/network.go +++ b/sdk/go/civo/network.go @@ -15,6 +15,32 @@ import ( // Provides a Civo network resource. This can be used to create, modify, and delete networks. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.NewNetwork(ctx, "customNet", &civo.NetworkArgs{ +// Label: pulumi.String("test_network"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // using ID diff --git a/sdk/go/civo/objectStore.go b/sdk/go/civo/objectStore.go index 9c5f5671..1669e822 100644 --- a/sdk/go/civo/objectStore.go +++ b/sdk/go/civo/objectStore.go @@ -14,6 +14,36 @@ import ( // Provides an Object Store resource. This can be used to create, modify, and delete object stores. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// backupObjectStore, err := civo.NewObjectStore(ctx, "backupObjectStore", &civo.ObjectStoreArgs{ +// MaxSizeGb: pulumi.Int(500), +// Region: pulumi.String("LON1"), +// }) +// if err != nil { +// return err +// } +// _ = civo.LookupObjectStoreCredentialOutput(ctx, civo.GetObjectStoreCredentialOutputArgs{ +// Id: backupObjectStore.AccessKeyId, +// }, nil) +// return nil +// }) +// } +// +// ``` +// // ## Import // // using ID diff --git a/sdk/go/civo/objectStoreCredential.go b/sdk/go/civo/objectStoreCredential.go index 5788e0cb..63f57ebe 100644 --- a/sdk/go/civo/objectStoreCredential.go +++ b/sdk/go/civo/objectStoreCredential.go @@ -14,6 +14,47 @@ import ( // Provides an Object Store Credential resource. This can be used to create, modify, and delete object stores credential. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.LookupObjectStoreCredential(ctx, &civo.LookupObjectStoreCredentialArgs{ +// Name: pulumi.StringRef("backup-server"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = civo.NewObjectStoreCredential(ctx, "backupIndex/objectStoreCredentialObjectStoreCredential", &civo.ObjectStoreCredentialArgs{ +// AccessKeyId: pulumi.String("my-access-key"), +// SecretAccessKey: pulumi.String("my-secret-key"), +// }) +// if err != nil { +// return err +// } +// _, err = civo.NewObjectStore(ctx, "backupObjectStore", &civo.ObjectStoreArgs{ +// MaxSizeGb: pulumi.Int(500), +// Region: pulumi.String("LON1"), +// AccessKeyId: backupIndex / objectStoreCredentialObjectStoreCredential.AccessKeyId, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // using ID diff --git a/sdk/go/civo/reservedIp.go b/sdk/go/civo/reservedIp.go index 10ed5174..c197d4c5 100644 --- a/sdk/go/civo/reservedIp.go +++ b/sdk/go/civo/reservedIp.go @@ -14,6 +14,30 @@ import ( // Provides a Civo reserved IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Instancesor Load Balancer. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.NewReservedIp(ctx, "www", nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // terrafom import civo_reserved_ip.www 9f0e86fc-b2c6-46b4-82ed-2f28419f8ae3 diff --git a/sdk/go/civo/sshKey.go b/sdk/go/civo/sshKey.go index 34b4c1fb..550d8094 100644 --- a/sdk/go/civo/sshKey.go +++ b/sdk/go/civo/sshKey.go @@ -15,6 +15,42 @@ import ( // Provides a Civo SSH key resource to allow you to manage SSH keys for instance access. Keys created with this resource can be referenced in your instance configuration via their ID. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "os" +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func readFileOrPanic(path string) pulumi.StringPtrInput { +// data, err := os.ReadFile(path) +// if err != nil { +// panic(err.Error()) +// } +// return pulumi.String(string(data)) +// } +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := civo.NewSshKey(ctx, "my-user", &civo.SshKeyArgs{ +// PublicKey: readFileOrPanic("~/.ssh/id_rsa.pub"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // using ID diff --git a/sdk/go/civo/volume.go b/sdk/go/civo/volume.go index a41246a8..1c4a3c42 100644 --- a/sdk/go/civo/volume.go +++ b/sdk/go/civo/volume.go @@ -15,6 +15,41 @@ import ( // Provides a Civo volume which can be attached to an instance in order to provide expanded storage. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-civo/sdk/v2/go/civo" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// defaultNetwork, err := civo.LookupNetwork(ctx, &civo.LookupNetworkArgs{ +// Label: pulumi.StringRef("Default"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = civo.NewVolume(ctx, "db", &civo.VolumeArgs{ +// SizeGb: pulumi.Int(5), +// NetworkId: *pulumi.String(defaultNetwork.Id), +// }, pulumi.DependsOn([]pulumi.Resource{ +// defaultNetwork, +// })) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // using ID diff --git a/sdk/nodejs/dnsDomainName.ts b/sdk/nodejs/dnsDomainName.ts index ec6d762e..4a06eef9 100644 --- a/sdk/nodejs/dnsDomainName.ts +++ b/sdk/nodejs/dnsDomainName.ts @@ -7,6 +7,16 @@ import * as utilities from "./utilities"; /** * Provides a Civo DNS domain name resource. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * // Create a new domain name + * const main = new civo.DnsDomainName("main", {}); + * ``` + * * ## Import * * using domain name diff --git a/sdk/nodejs/firewall.ts b/sdk/nodejs/firewall.ts index ba4a48ce..452c5db8 100644 --- a/sdk/nodejs/firewall.ts +++ b/sdk/nodejs/firewall.ts @@ -9,6 +9,59 @@ import * as utilities from "./utilities"; /** * Provides a Civo firewall resource. This can be used to create, modify, and delete firewalls. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * // Create a network + * const customNet = new civo.Network("customNet", {label: "my-custom-network"}); + * // Create a firewall + * const wwwFirewall = new civo.Firewall("wwwFirewall", {networkId: customNet.id}); + * // Create a firewall with the default rules + * const wwwIndex_firewallFirewall = new civo.Firewall("wwwIndex/firewallFirewall", { + * networkId: customNet.id, + * createDefaultRules: true, + * }); + * // Create a firewall withouth the default rules but with a custom rule + * const wwwCivoIndex_firewallFirewall = new civo.Firewall("wwwCivoIndex/firewallFirewall", { + * networkId: customNet.id, + * createDefaultRules: false, + * ingressRules: [ + * { + * label: "k8s", + * protocol: "tcp", + * portRange: "6443", + * cidrs: [ + * "192.168.1.1/32", + * "192.168.10.4/32", + * "192.168.10.10/32", + * ], + * action: "allow", + * }, + * { + * label: "ssh", + * protocol: "tcp", + * portRange: "22", + * cidrs: [ + * "192.168.1.1/32", + * "192.168.10.4/32", + * "192.168.10.10/32", + * ], + * action: "allow", + * }, + * ], + * egressRules: [{ + * label: "all", + * protocol: "tcp", + * portRange: "1-65535", + * cidrs: ["0.0.0.0/0"], + * action: "allow", + * }], + * }); + * ``` + * * ## Import * * using ID diff --git a/sdk/nodejs/getDatabase.ts b/sdk/nodejs/getDatabase.ts index fa17e2ea..80fd7c60 100644 --- a/sdk/nodejs/getDatabase.ts +++ b/sdk/nodejs/getDatabase.ts @@ -8,6 +8,18 @@ import * as utilities from "./utilities"; * Get information of an Database for use in other resources. This data source provides all of the Database's properties as configured on your Civo account. * * Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const test = civo.getDatabase({ + * name: "test-database", + * region: "LON1", + * }); + * ``` */ export function getDatabase(args?: GetDatabaseArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -107,6 +119,18 @@ export interface GetDatabaseResult { * Get information of an Database for use in other resources. This data source provides all of the Database's properties as configured on your Civo account. * * Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const test = civo.getDatabase({ + * name: "test-database", + * region: "LON1", + * }); + * ``` */ export function getDatabaseOutput(args?: GetDatabaseOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDatabase(a, opts)) diff --git a/sdk/nodejs/getDnsDomainName.ts b/sdk/nodejs/getDnsDomainName.ts index 669dbd36..09e72c88 100644 --- a/sdk/nodejs/getDnsDomainName.ts +++ b/sdk/nodejs/getDnsDomainName.ts @@ -8,6 +8,19 @@ import * as utilities from "./utilities"; * Get information on a domain. This data source provides the name and the id. * * An error will be raised if the provided domain name is not in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const domain = civo.getDnsDomainName({ + * name: "domain.com", + * }); + * export const domainOutput = domain.then(domain => domain.name); + * export const domainIdOutput = domain.then(domain => domain.id); + * ``` */ export function getDnsDomainName(args?: GetDnsDomainNameArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -50,6 +63,19 @@ export interface GetDnsDomainNameResult { * Get information on a domain. This data source provides the name and the id. * * An error will be raised if the provided domain name is not in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const domain = civo.getDnsDomainName({ + * name: "domain.com", + * }); + * export const domainOutput = domain.then(domain => domain.name); + * export const domainIdOutput = domain.then(domain => domain.id); + * ``` */ export function getDnsDomainNameOutput(args?: GetDnsDomainNameOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDnsDomainName(a, opts)) diff --git a/sdk/nodejs/getDnsDomainRecord.ts b/sdk/nodejs/getDnsDomainRecord.ts index f2cbd65e..c259e5cd 100644 --- a/sdk/nodejs/getDnsDomainRecord.ts +++ b/sdk/nodejs/getDnsDomainRecord.ts @@ -8,6 +8,23 @@ import * as utilities from "./utilities"; * Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your Civo account. * * An error will be raised if the provided domain name or record are not in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const domain = civo.getDnsDomainName({ + * name: "domain.com", + * }); + * const www = domain.then(domain => civo.getDnsDomainRecord({ + * domainId: domain.id, + * name: "www", + * })); + * export const recordType = www.then(www => www.type); + * export const recordTtl = www.then(www => www.ttl); + * ``` */ export function getDnsDomainRecord(args: GetDnsDomainRecordArgs, opts?: pulumi.InvokeOptions): Promise { @@ -81,6 +98,23 @@ export interface GetDnsDomainRecordResult { * Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your Civo account. * * An error will be raised if the provided domain name or record are not in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const domain = civo.getDnsDomainName({ + * name: "domain.com", + * }); + * const www = domain.then(domain => civo.getDnsDomainRecord({ + * domainId: domain.id, + * name: "www", + * })); + * export const recordType = www.then(www => www.type); + * export const recordTtl = www.then(www => www.ttl); + * ``` */ export function getDnsDomainRecordOutput(args: GetDnsDomainRecordOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDnsDomainRecord(a, opts)) diff --git a/sdk/nodejs/getFirewall.ts b/sdk/nodejs/getFirewall.ts index 1d7f703d..a8f1f042 100644 --- a/sdk/nodejs/getFirewall.ts +++ b/sdk/nodejs/getFirewall.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * This data source provides all of the firewall's properties as configured on your Civo account. * * Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const test = civo.getFirewall({ + * name: "test-firewall", + * region: "LON1", + * }); + * ``` */ export function getFirewall(args?: GetFirewallArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -67,6 +79,18 @@ export interface GetFirewallResult { * This data source provides all of the firewall's properties as configured on your Civo account. * * Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const test = civo.getFirewall({ + * name: "test-firewall", + * region: "LON1", + * }); + * ``` */ export function getFirewallOutput(args?: GetFirewallOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getFirewall(a, opts)) diff --git a/sdk/nodejs/getInstance.ts b/sdk/nodejs/getInstance.ts index 429c354e..160b77bb 100644 --- a/sdk/nodejs/getInstance.ts +++ b/sdk/nodejs/getInstance.ts @@ -8,6 +8,18 @@ import * as utilities from "./utilities"; * Get information on an instance for use in other resources. This data source provides all of the instance's properties as configured on your Civo account. * * Note: This data source returns a single instance. When specifying a hostname, an error will be raised if more than one instances found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const myhostaname = civo.getInstance({ + * hostname: "myhostname.com", + * }); + * export const instanceOutput = myhostaname.then(myhostaname => myhostaname.publicIp); + * ``` */ export function getInstance(args?: GetInstanceArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -135,6 +147,18 @@ export interface GetInstanceResult { * Get information on an instance for use in other resources. This data source provides all of the instance's properties as configured on your Civo account. * * Note: This data source returns a single instance. When specifying a hostname, an error will be raised if more than one instances found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const myhostaname = civo.getInstance({ + * hostname: "myhostname.com", + * }); + * export const instanceOutput = myhostaname.then(myhostaname => myhostaname.publicIp); + * ``` */ export function getInstanceOutput(args?: GetInstanceOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getInstance(a, opts)) diff --git a/sdk/nodejs/getInstances.ts b/sdk/nodejs/getInstances.ts index 5215d618..ed3adde4 100644 --- a/sdk/nodejs/getInstances.ts +++ b/sdk/nodejs/getInstances.ts @@ -10,6 +10,21 @@ import * as utilities from "./utilities"; * Get information on instances for use in other resources, with the ability to filter and sort the results. If no filters are specified, all instances will be returned. * * Note: You can use the `civo.Instance` data source to obtain metadata about a single instance if you already know the id, unique hostname, or unique tag to retrieve. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const small-size = civo.getInstances({ + * region: "LON1", + * filters: [{ + * key: "size", + * values: [g3.small], + * }], + * }); + * ``` */ export function getInstances(args?: GetInstancesArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -63,6 +78,21 @@ export interface GetInstancesResult { * Get information on instances for use in other resources, with the ability to filter and sort the results. If no filters are specified, all instances will be returned. * * Note: You can use the `civo.Instance` data source to obtain metadata about a single instance if you already know the id, unique hostname, or unique tag to retrieve. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const small-size = civo.getInstances({ + * region: "LON1", + * filters: [{ + * key: "size", + * values: [g3.small], + * }], + * }); + * ``` */ export function getInstancesOutput(args?: GetInstancesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getInstances(a, opts)) diff --git a/sdk/nodejs/getKubernetesCluster.ts b/sdk/nodejs/getKubernetesCluster.ts index 342a47dc..0b56bd9a 100644 --- a/sdk/nodejs/getKubernetesCluster.ts +++ b/sdk/nodejs/getKubernetesCluster.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * Provides a Civo Kubernetes cluster data source. * * Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const my-cluster = civo.getKubernetesCluster({ + * name: "my-super-cluster", + * }); + * export const kubernetesClusterOutput = my_cluster.then(my_cluster => my_cluster.masterIp); + * ``` */ export function getKubernetesCluster(args?: GetKubernetesClusterArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -119,6 +131,18 @@ export interface GetKubernetesClusterResult { * Provides a Civo Kubernetes cluster data source. * * Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const my-cluster = civo.getKubernetesCluster({ + * name: "my-super-cluster", + * }); + * export const kubernetesClusterOutput = my_cluster.then(my_cluster => my_cluster.masterIp); + * ``` */ export function getKubernetesClusterOutput(args?: GetKubernetesClusterOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getKubernetesCluster(a, opts)) diff --git a/sdk/nodejs/getKubernetesVersion.ts b/sdk/nodejs/getKubernetesVersion.ts index e9534ad2..a526a506 100644 --- a/sdk/nodejs/getKubernetesVersion.ts +++ b/sdk/nodejs/getKubernetesVersion.ts @@ -8,6 +8,26 @@ import * as utilities from "./utilities"; /** * Provides access to the available Civo Kubernetes versions, with the ability to filter the results. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const talos = civo.getKubernetesVersion({ + * filters: [{ + * key: "type", + * values: ["talos"], + * }], + * }); + * const k3s = civo.getKubernetesVersion({ + * filters: [{ + * key: "type", + * values: ["k3s"], + * }], + * }); + * ``` */ export function getKubernetesVersion(args?: GetKubernetesVersionArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -53,6 +73,26 @@ export interface GetKubernetesVersionResult { } /** * Provides access to the available Civo Kubernetes versions, with the ability to filter the results. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const talos = civo.getKubernetesVersion({ + * filters: [{ + * key: "type", + * values: ["talos"], + * }], + * }); + * const k3s = civo.getKubernetesVersion({ + * filters: [{ + * key: "type", + * values: ["k3s"], + * }], + * }); + * ``` */ export function getKubernetesVersionOutput(args?: GetKubernetesVersionOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getKubernetesVersion(a, opts)) diff --git a/sdk/nodejs/getLoadBalancer.ts b/sdk/nodejs/getLoadBalancer.ts index 76eb5249..b926ae65 100644 --- a/sdk/nodejs/getLoadBalancer.ts +++ b/sdk/nodejs/getLoadBalancer.ts @@ -10,6 +10,19 @@ import * as utilities from "./utilities"; * Get information on a load balancer for use in other resources. This data source provides all of the load balancers properties as configured on your Civo account. * * An error will be raised if the provided load balancer name does not exist in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const my-lb = civo.getLoadBalancer({ + * name: "lb-name", + * region: "LON1", + * }); + * export const civoLoadbalancerOutput = my_lb.then(my_lb => my_lb.publicIp); + * ``` */ export function getLoadBalancer(args?: GetLoadBalancerArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -102,6 +115,19 @@ export interface GetLoadBalancerResult { * Get information on a load balancer for use in other resources. This data source provides all of the load balancers properties as configured on your Civo account. * * An error will be raised if the provided load balancer name does not exist in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const my-lb = civo.getLoadBalancer({ + * name: "lb-name", + * region: "LON1", + * }); + * export const civoLoadbalancerOutput = my_lb.then(my_lb => my_lb.publicIp); + * ``` */ export function getLoadBalancerOutput(args?: GetLoadBalancerOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getLoadBalancer(a, opts)) diff --git a/sdk/nodejs/getNetwork.ts b/sdk/nodejs/getNetwork.ts index 5dfe219d..9a58ea3b 100644 --- a/sdk/nodejs/getNetwork.ts +++ b/sdk/nodejs/getNetwork.ts @@ -10,6 +10,18 @@ import * as utilities from "./utilities"; * This data source provides all of the network's properties as configured on your Civo account. * * Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const test = civo.getNetwork({ + * label: "test-network", + * region: "LON1", + * }); + * ``` */ export function getNetwork(args?: GetNetworkArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -71,6 +83,18 @@ export interface GetNetworkResult { * This data source provides all of the network's properties as configured on your Civo account. * * Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const test = civo.getNetwork({ + * label: "test-network", + * region: "LON1", + * }); + * ``` */ export function getNetworkOutput(args?: GetNetworkOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getNetwork(a, opts)) diff --git a/sdk/nodejs/getObjectStore.ts b/sdk/nodejs/getObjectStore.ts index ecd5219f..a3ed130f 100644 --- a/sdk/nodejs/getObjectStore.ts +++ b/sdk/nodejs/getObjectStore.ts @@ -8,6 +8,17 @@ import * as utilities from "./utilities"; * Get information of an Object Store for use in other resources. This data source provides all of the Object Store's properties as configured on your Civo account. * * Note: This data source returns a single Object Store. When specifying a name, an error will be raised if more than one Object Stores with the same name found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const backup = civo.getObjectStore({ + * name: "backup-server", + * }); + * ``` */ export function getObjectStore(args?: GetObjectStoreArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -75,6 +86,17 @@ export interface GetObjectStoreResult { * Get information of an Object Store for use in other resources. This data source provides all of the Object Store's properties as configured on your Civo account. * * Note: This data source returns a single Object Store. When specifying a name, an error will be raised if more than one Object Stores with the same name found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const backup = civo.getObjectStore({ + * name: "backup-server", + * }); + * ``` */ export function getObjectStoreOutput(args?: GetObjectStoreOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getObjectStore(a, opts)) diff --git a/sdk/nodejs/getObjectStoreCredential.ts b/sdk/nodejs/getObjectStoreCredential.ts index 10bad19a..c3d3e157 100644 --- a/sdk/nodejs/getObjectStoreCredential.ts +++ b/sdk/nodejs/getObjectStoreCredential.ts @@ -8,6 +8,23 @@ import * as utilities from "./utilities"; * Get information of an Object Store Credential for use in other resources. This data source provides all of the Object Store Credential's properties as configured on your Civo account. * * Note: This data source returns a single Object Store Credential. When specifying a name, an error will be raised if more than one Object Store Credentials with the same name found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const backupObjectStoreCredential = civo.getObjectStoreCredential({ + * name: "backup-server", + * }); + * // Use the credential to create a bucket + * const backupObjectStore = new civo.ObjectStore("backupObjectStore", { + * maxSizeGb: 500, + * region: "LON1", + * accessKeyId: backupObjectStoreCredential.then(backupObjectStoreCredential => backupObjectStoreCredential.accessKeyId), + * }); + * ``` */ export function getObjectStoreCredential(args?: GetObjectStoreCredentialArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -71,6 +88,23 @@ export interface GetObjectStoreCredentialResult { * Get information of an Object Store Credential for use in other resources. This data source provides all of the Object Store Credential's properties as configured on your Civo account. * * Note: This data source returns a single Object Store Credential. When specifying a name, an error will be raised if more than one Object Store Credentials with the same name found. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const backupObjectStoreCredential = civo.getObjectStoreCredential({ + * name: "backup-server", + * }); + * // Use the credential to create a bucket + * const backupObjectStore = new civo.ObjectStore("backupObjectStore", { + * maxSizeGb: 500, + * region: "LON1", + * accessKeyId: backupObjectStoreCredential.then(backupObjectStoreCredential => backupObjectStoreCredential.accessKeyId), + * }); + * ``` */ export function getObjectStoreCredentialOutput(args?: GetObjectStoreCredentialOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getObjectStoreCredential(a, opts)) diff --git a/sdk/nodejs/getVolume.ts b/sdk/nodejs/getVolume.ts index a585281f..afae6979 100644 --- a/sdk/nodejs/getVolume.ts +++ b/sdk/nodejs/getVolume.ts @@ -8,6 +8,18 @@ import * as utilities from "./utilities"; * Get information on a volume for use in other resources. This data source provides all of the volumes properties as configured on your Civo account. * * An error will be raised if the provided volume name does not exist in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const myvolume = civo.getVolume({ + * name: "test-volume-name", + * }); + * export const volumeOutput = myvolume; + * ``` */ export function getVolume(args?: GetVolumeArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -71,6 +83,18 @@ export interface GetVolumeResult { * Get information on a volume for use in other resources. This data source provides all of the volumes properties as configured on your Civo account. * * An error will be raised if the provided volume name does not exist in your Civo account. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const myvolume = civo.getVolume({ + * name: "test-volume-name", + * }); + * export const volumeOutput = myvolume; + * ``` */ export function getVolumeOutput(args?: GetVolumeOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getVolume(a, opts)) diff --git a/sdk/nodejs/instanceReservedIpAssignment.ts b/sdk/nodejs/instanceReservedIpAssignment.ts index a3eed9ed..78f13e64 100644 --- a/sdk/nodejs/instanceReservedIpAssignment.ts +++ b/sdk/nodejs/instanceReservedIpAssignment.ts @@ -6,6 +6,21 @@ import * as utilities from "./utilities"; /** * The instance reserved ip assignment resource schema definition + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * // Send to create a reserved IP + * const www = new civo.ReservedIp("www", {}); + * // We assign the reserved IP to the instance + * const webserver_www = new civo.InstanceReservedIpAssignment("webserver-www", { + * instanceId: civo_instance.www.id, + * reservedIpId: civo_reserved_ip["web-server"].id, + * }); + * ``` */ export class InstanceReservedIpAssignment extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/network.ts b/sdk/nodejs/network.ts index 45e7340a..1ec98ee9 100644 --- a/sdk/nodejs/network.ts +++ b/sdk/nodejs/network.ts @@ -7,6 +7,15 @@ import * as utilities from "./utilities"; /** * Provides a Civo network resource. This can be used to create, modify, and delete networks. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const customNet = new civo.Network("customNet", {label: "test_network"}); + * ``` + * * ## Import * * using ID diff --git a/sdk/nodejs/objectStore.ts b/sdk/nodejs/objectStore.ts index bea29879..8a6cdb2b 100644 --- a/sdk/nodejs/objectStore.ts +++ b/sdk/nodejs/objectStore.ts @@ -7,6 +7,21 @@ import * as utilities from "./utilities"; /** * Provides an Object Store resource. This can be used to create, modify, and delete object stores. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const backupObjectStore = new civo.ObjectStore("backupObjectStore", { + * maxSizeGb: 500, + * region: "LON1", + * }); + * const backupObjectStoreCredential = civo.getObjectStoreCredentialOutput({ + * id: backupObjectStore.accessKeyId, + * }); + * ``` + * * ## Import * * using ID diff --git a/sdk/nodejs/objectStoreCredential.ts b/sdk/nodejs/objectStoreCredential.ts index 13fcad99..e99f8179 100644 --- a/sdk/nodejs/objectStoreCredential.ts +++ b/sdk/nodejs/objectStoreCredential.ts @@ -7,6 +7,28 @@ import * as utilities from "./utilities"; /** * Provides an Object Store Credential resource. This can be used to create, modify, and delete object stores credential. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const backupObjectStoreCredential = civo.getObjectStoreCredential({ + * name: "backup-server", + * }); + * // Create a credential for the object store with a specific access key and secret key + * const backupIndex_objectStoreCredentialObjectStoreCredential = new civo.ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", { + * accessKeyId: "my-access-key", + * secretAccessKey: "my-secret-key", + * }); + * // Use the credential to create a bucket + * const backupObjectStore = new civo.ObjectStore("backupObjectStore", { + * maxSizeGb: 500, + * region: "LON1", + * accessKeyId: backupIndex / objectStoreCredentialObjectStoreCredential.accessKeyId, + * }); + * ``` + * * ## Import * * using ID diff --git a/sdk/nodejs/reservedIp.ts b/sdk/nodejs/reservedIp.ts index b16344aa..9d78b939 100644 --- a/sdk/nodejs/reservedIp.ts +++ b/sdk/nodejs/reservedIp.ts @@ -7,6 +7,15 @@ import * as utilities from "./utilities"; /** * Provides a Civo reserved IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Instancesor Load Balancer. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const www = new civo.ReservedIp("www", {}); + * ``` + * * ## Import * * terrafom import civo_reserved_ip.www 9f0e86fc-b2c6-46b4-82ed-2f28419f8ae3 diff --git a/sdk/nodejs/sshKey.ts b/sdk/nodejs/sshKey.ts index 9c4f5f6d..c1776d23 100644 --- a/sdk/nodejs/sshKey.ts +++ b/sdk/nodejs/sshKey.ts @@ -7,6 +7,16 @@ import * as utilities from "./utilities"; /** * Provides a Civo SSH key resource to allow you to manage SSH keys for instance access. Keys created with this resource can be referenced in your instance configuration via their ID. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * import * as fs from "fs"; + * + * const my_user = new civo.SshKey("my-user", {publicKey: fs.readFileSync("~/.ssh/id_rsa.pub")}); + * ``` + * * ## Import * * using ID diff --git a/sdk/nodejs/volume.ts b/sdk/nodejs/volume.ts index a0ac52c9..ad45c472 100644 --- a/sdk/nodejs/volume.ts +++ b/sdk/nodejs/volume.ts @@ -7,6 +7,24 @@ import * as utilities from "./utilities"; /** * Provides a Civo volume which can be attached to an instance in order to provide expanded storage. * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as civo from "@pulumi/civo"; + * + * const defaultNetwork = civo.getNetwork({ + * label: "Default", + * }); + * // Create volume + * const db = new civo.Volume("db", { + * sizeGb: 5, + * networkId: defaultNetwork.then(defaultNetwork => defaultNetwork.id), + * }, { + * dependsOn: [defaultNetwork], + * }); + * ``` + * * ## Import * * using ID diff --git a/sdk/python/pulumi_civo/dns_domain_name.py b/sdk/python/pulumi_civo/dns_domain_name.py index bf2e4f3c..dbfb1dbe 100644 --- a/sdk/python/pulumi_civo/dns_domain_name.py +++ b/sdk/python/pulumi_civo/dns_domain_name.py @@ -111,6 +111,16 @@ def __init__(__self__, """ Provides a Civo DNS domain name resource. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + # Create a new domain name + main = civo.DnsDomainName("main") + ``` + ## Import using domain name @@ -132,6 +142,16 @@ def __init__(__self__, """ Provides a Civo DNS domain name resource. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + # Create a new domain name + main = civo.DnsDomainName("main") + ``` + ## Import using domain name diff --git a/sdk/python/pulumi_civo/firewall.py b/sdk/python/pulumi_civo/firewall.py index 5b05f2e8..d117dc0f 100644 --- a/sdk/python/pulumi_civo/firewall.py +++ b/sdk/python/pulumi_civo/firewall.py @@ -294,6 +294,57 @@ def __init__(__self__, """ Provides a Civo firewall resource. This can be used to create, modify, and delete firewalls. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + # Create a network + custom_net = civo.Network("customNet", label="my-custom-network") + # Create a firewall + www_firewall = civo.Firewall("wwwFirewall", network_id=custom_net.id) + # Create a firewall with the default rules + www_index_firewall_firewall = civo.Firewall("wwwIndex/firewallFirewall", + network_id=custom_net.id, + create_default_rules=True) + # Create a firewall withouth the default rules but with a custom rule + www_civo_index_firewall_firewall = civo.Firewall("wwwCivoIndex/firewallFirewall", + network_id=custom_net.id, + create_default_rules=False, + ingress_rules=[ + civo.FirewallIngressRuleArgs( + label="k8s", + protocol="tcp", + port_range="6443", + cidrs=[ + "192.168.1.1/32", + "192.168.10.4/32", + "192.168.10.10/32", + ], + action="allow", + ), + civo.FirewallIngressRuleArgs( + label="ssh", + protocol="tcp", + port_range="22", + cidrs=[ + "192.168.1.1/32", + "192.168.10.4/32", + "192.168.10.10/32", + ], + action="allow", + ), + ], + egress_rules=[civo.FirewallEgressRuleArgs( + label="all", + protocol="tcp", + port_range="1-65535", + cidrs=["0.0.0.0/0"], + action="allow", + )]) + ``` + ## Import using ID @@ -320,6 +371,57 @@ def __init__(__self__, """ Provides a Civo firewall resource. This can be used to create, modify, and delete firewalls. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + # Create a network + custom_net = civo.Network("customNet", label="my-custom-network") + # Create a firewall + www_firewall = civo.Firewall("wwwFirewall", network_id=custom_net.id) + # Create a firewall with the default rules + www_index_firewall_firewall = civo.Firewall("wwwIndex/firewallFirewall", + network_id=custom_net.id, + create_default_rules=True) + # Create a firewall withouth the default rules but with a custom rule + www_civo_index_firewall_firewall = civo.Firewall("wwwCivoIndex/firewallFirewall", + network_id=custom_net.id, + create_default_rules=False, + ingress_rules=[ + civo.FirewallIngressRuleArgs( + label="k8s", + protocol="tcp", + port_range="6443", + cidrs=[ + "192.168.1.1/32", + "192.168.10.4/32", + "192.168.10.10/32", + ], + action="allow", + ), + civo.FirewallIngressRuleArgs( + label="ssh", + protocol="tcp", + port_range="22", + cidrs=[ + "192.168.1.1/32", + "192.168.10.4/32", + "192.168.10.10/32", + ], + action="allow", + ), + ], + egress_rules=[civo.FirewallEgressRuleArgs( + label="all", + protocol="tcp", + port_range="1-65535", + cidrs=["0.0.0.0/0"], + action="allow", + )]) + ``` + ## Import using ID diff --git a/sdk/python/pulumi_civo/get_database.py b/sdk/python/pulumi_civo/get_database.py index 16d331ed..c849a7cb 100644 --- a/sdk/python/pulumi_civo/get_database.py +++ b/sdk/python/pulumi_civo/get_database.py @@ -221,6 +221,16 @@ def get_database(id: Optional[str] = None, Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + test = civo.get_database(name="test-database", + region="LON1") + ``` + :param str id: The ID of the Database :param str name: The name of the Database @@ -261,6 +271,16 @@ def get_database_output(id: Optional[pulumi.Input[Optional[str]]] = None, Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + test = civo.get_database(name="test-database", + region="LON1") + ``` + :param str id: The ID of the Database :param str name: The name of the Database diff --git a/sdk/python/pulumi_civo/get_dns_domain_name.py b/sdk/python/pulumi_civo/get_dns_domain_name.py index faf942a5..942e48d0 100644 --- a/sdk/python/pulumi_civo/get_dns_domain_name.py +++ b/sdk/python/pulumi_civo/get_dns_domain_name.py @@ -64,6 +64,17 @@ def get_dns_domain_name(id: Optional[str] = None, An error will be raised if the provided domain name is not in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + domain = civo.get_dns_domain_name(name="domain.com") + pulumi.export("domainOutput", domain.name) + pulumi.export("domainIdOutput", domain.id) + ``` + :param str id: The ID of this resource. :param str name: The name of the domain @@ -88,6 +99,17 @@ def get_dns_domain_name_output(id: Optional[pulumi.Input[Optional[str]]] = None, An error will be raised if the provided domain name is not in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + domain = civo.get_dns_domain_name(name="domain.com") + pulumi.export("domainOutput", domain.name) + pulumi.export("domainIdOutput", domain.id) + ``` + :param str id: The ID of this resource. :param str name: The name of the domain diff --git a/sdk/python/pulumi_civo/get_dns_domain_record.py b/sdk/python/pulumi_civo/get_dns_domain_record.py index 499bb663..2c4135a3 100644 --- a/sdk/python/pulumi_civo/get_dns_domain_record.py +++ b/sdk/python/pulumi_civo/get_dns_domain_record.py @@ -160,6 +160,19 @@ def get_dns_domain_record(domain_id: Optional[str] = None, An error will be raised if the provided domain name or record are not in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + domain = civo.get_dns_domain_name(name="domain.com") + www = civo.get_dns_domain_record(domain_id=domain.id, + name="www") + pulumi.export("recordType", www.type) + pulumi.export("recordTtl", www.ttl) + ``` + :param str domain_id: The ID of the domain :param str name: The name of the record @@ -192,6 +205,19 @@ def get_dns_domain_record_output(domain_id: Optional[pulumi.Input[str]] = None, An error will be raised if the provided domain name or record are not in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + domain = civo.get_dns_domain_name(name="domain.com") + www = civo.get_dns_domain_record(domain_id=domain.id, + name="www") + pulumi.export("recordType", www.type) + pulumi.export("recordTtl", www.ttl) + ``` + :param str domain_id: The ID of the domain :param str name: The name of the record diff --git a/sdk/python/pulumi_civo/get_firewall.py b/sdk/python/pulumi_civo/get_firewall.py index 4ff83290..020c0d78 100644 --- a/sdk/python/pulumi_civo/get_firewall.py +++ b/sdk/python/pulumi_civo/get_firewall.py @@ -91,6 +91,16 @@ def get_firewall(id: Optional[str] = None, Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + test = civo.get_firewall(name="test-firewall", + region="LON1") + ``` + :param str id: The ID of this resource. :param str name: The name of the firewall @@ -122,6 +132,16 @@ def get_firewall_output(id: Optional[pulumi.Input[Optional[str]]] = None, Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + test = civo.get_firewall(name="test-firewall", + region="LON1") + ``` + :param str id: The ID of this resource. :param str name: The name of the firewall diff --git a/sdk/python/pulumi_civo/get_instance.py b/sdk/python/pulumi_civo/get_instance.py index 065f87f3..d8108574 100644 --- a/sdk/python/pulumi_civo/get_instance.py +++ b/sdk/python/pulumi_civo/get_instance.py @@ -305,6 +305,16 @@ def get_instance(hostname: Optional[str] = None, Note: This data source returns a single instance. When specifying a hostname, an error will be raised if more than one instances found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + myhostaname = civo.get_instance(hostname="myhostname.com") + pulumi.export("instanceOutput", myhostaname.public_ip) + ``` + :param str hostname: The hostname of the Instance :param str id: The ID of this resource. @@ -352,6 +362,16 @@ def get_instance_output(hostname: Optional[pulumi.Input[Optional[str]]] = None, Note: This data source returns a single instance. When specifying a hostname, an error will be raised if more than one instances found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + myhostaname = civo.get_instance(hostname="myhostname.com") + pulumi.export("instanceOutput", myhostaname.public_ip) + ``` + :param str hostname: The hostname of the Instance :param str id: The ID of this resource. diff --git a/sdk/python/pulumi_civo/get_instances.py b/sdk/python/pulumi_civo/get_instances.py index 258014a2..239f1479 100644 --- a/sdk/python/pulumi_civo/get_instances.py +++ b/sdk/python/pulumi_civo/get_instances.py @@ -100,6 +100,19 @@ def get_instances(filters: Optional[Sequence[pulumi.InputType['GetInstancesFilte Note: You can use the `Instance` data source to obtain metadata about a single instance if you already know the id, unique hostname, or unique tag to retrieve. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + small_size = civo.get_instances(region="LON1", + filters=[civo.GetInstancesFilterArgs( + key="size", + values=[g3["small"]], + )]) + ``` + :param Sequence[pulumi.InputType['GetInstancesFilterArgs']] filters: One or more key/value pairs on which to filter results :param Sequence[pulumi.InputType['GetInstancesSortArgs']] sorts: One or more key/direction pairs on which to sort results @@ -129,6 +142,19 @@ def get_instances_output(filters: Optional[pulumi.Input[Optional[Sequence[pulumi Note: You can use the `Instance` data source to obtain metadata about a single instance if you already know the id, unique hostname, or unique tag to retrieve. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + small_size = civo.get_instances(region="LON1", + filters=[civo.GetInstancesFilterArgs( + key="size", + values=[g3["small"]], + )]) + ``` + :param Sequence[pulumi.InputType['GetInstancesFilterArgs']] filters: One or more key/value pairs on which to filter results :param Sequence[pulumi.InputType['GetInstancesSortArgs']] sorts: One or more key/direction pairs on which to sort results diff --git a/sdk/python/pulumi_civo/get_kubernetes_cluster.py b/sdk/python/pulumi_civo/get_kubernetes_cluster.py index 4b80817c..be260ace 100644 --- a/sdk/python/pulumi_civo/get_kubernetes_cluster.py +++ b/sdk/python/pulumi_civo/get_kubernetes_cluster.py @@ -258,6 +258,16 @@ def get_kubernetes_cluster(id: Optional[str] = None, Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + my_cluster = civo.get_kubernetes_cluster(name="my-super-cluster") + pulumi.export("kubernetesClusterOutput", my_cluster.master_ip) + ``` + :param str id: The ID of this resource. :param str name: The name of the Kubernetes Cluster @@ -301,6 +311,16 @@ def get_kubernetes_cluster_output(id: Optional[pulumi.Input[Optional[str]]] = No Note: This data source returns a single Kubernetes cluster. When specifying a name, an error will be raised if more than one Kubernetes cluster found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + my_cluster = civo.get_kubernetes_cluster(name="my-super-cluster") + pulumi.export("kubernetesClusterOutput", my_cluster.master_ip) + ``` + :param str id: The ID of this resource. :param str name: The name of the Kubernetes Cluster diff --git a/sdk/python/pulumi_civo/get_kubernetes_version.py b/sdk/python/pulumi_civo/get_kubernetes_version.py index 47c8312e..408b5cc0 100644 --- a/sdk/python/pulumi_civo/get_kubernetes_version.py +++ b/sdk/python/pulumi_civo/get_kubernetes_version.py @@ -85,6 +85,22 @@ def get_kubernetes_version(filters: Optional[Sequence[pulumi.InputType['GetKuber """ Provides access to the available Civo Kubernetes versions, with the ability to filter the results. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + talos = civo.get_kubernetes_version(filters=[civo.GetKubernetesVersionFilterArgs( + key="type", + values=["talos"], + )]) + k3s = civo.get_kubernetes_version(filters=[civo.GetKubernetesVersionFilterArgs( + key="type", + values=["k3s"], + )]) + ``` + :param Sequence[pulumi.InputType['GetKubernetesVersionFilterArgs']] filters: One or more key/value pairs on which to filter results :param Sequence[pulumi.InputType['GetKubernetesVersionSortArgs']] sorts: One or more key/direction pairs on which to sort results @@ -109,6 +125,22 @@ def get_kubernetes_version_output(filters: Optional[pulumi.Input[Optional[Sequen """ Provides access to the available Civo Kubernetes versions, with the ability to filter the results. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + talos = civo.get_kubernetes_version(filters=[civo.GetKubernetesVersionFilterArgs( + key="type", + values=["talos"], + )]) + k3s = civo.get_kubernetes_version(filters=[civo.GetKubernetesVersionFilterArgs( + key="type", + values=["k3s"], + )]) + ``` + :param Sequence[pulumi.InputType['GetKubernetesVersionFilterArgs']] filters: One or more key/value pairs on which to filter results :param Sequence[pulumi.InputType['GetKubernetesVersionSortArgs']] sorts: One or more key/direction pairs on which to sort results diff --git a/sdk/python/pulumi_civo/get_load_balancer.py b/sdk/python/pulumi_civo/get_load_balancer.py index 62c113bd..229243d6 100644 --- a/sdk/python/pulumi_civo/get_load_balancer.py +++ b/sdk/python/pulumi_civo/get_load_balancer.py @@ -207,6 +207,17 @@ def get_load_balancer(id: Optional[str] = None, An error will be raised if the provided load balancer name does not exist in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + my_lb = civo.get_load_balancer(name="lb-name", + region="LON1") + pulumi.export("civoLoadbalancerOutput", my_lb.public_ip) + ``` + :param str id: The id of the load balancer to retrieve (You can find this id from service annotations 'kubernetes.civo.com/loadbalancer-id') :param str name: The name of the load balancer (You can find this name from service annotations 'kubernetes.civo.com/loadbalancer-name') @@ -246,6 +257,17 @@ def get_load_balancer_output(id: Optional[pulumi.Input[Optional[str]]] = None, An error will be raised if the provided load balancer name does not exist in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + my_lb = civo.get_load_balancer(name="lb-name", + region="LON1") + pulumi.export("civoLoadbalancerOutput", my_lb.public_ip) + ``` + :param str id: The id of the load balancer to retrieve (You can find this id from service annotations 'kubernetes.civo.com/loadbalancer-id') :param str name: The name of the load balancer (You can find this name from service annotations 'kubernetes.civo.com/loadbalancer-name') diff --git a/sdk/python/pulumi_civo/get_network.py b/sdk/python/pulumi_civo/get_network.py index e380ff5e..791ea205 100644 --- a/sdk/python/pulumi_civo/get_network.py +++ b/sdk/python/pulumi_civo/get_network.py @@ -103,6 +103,16 @@ def get_network(id: Optional[str] = None, Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + test = civo.get_network(label="test-network", + region="LON1") + ``` + :param str id: The ID of this resource. :param str label: The label of an existing network @@ -135,6 +145,16 @@ def get_network_output(id: Optional[pulumi.Input[Optional[str]]] = None, Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + test = civo.get_network(label="test-network", + region="LON1") + ``` + :param str id: The ID of this resource. :param str label: The label of an existing network diff --git a/sdk/python/pulumi_civo/get_object_store.py b/sdk/python/pulumi_civo/get_object_store.py index d8fe75fe..beb04eec 100644 --- a/sdk/python/pulumi_civo/get_object_store.py +++ b/sdk/python/pulumi_civo/get_object_store.py @@ -125,6 +125,15 @@ def get_object_store(id: Optional[str] = None, Note: This data source returns a single Object Store. When specifying a name, an error will be raised if more than one Object Stores with the same name found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup = civo.get_object_store(name="backup-server") + ``` + :param str id: The ID of the Object Store :param str name: The name of the Object Store @@ -157,6 +166,15 @@ def get_object_store_output(id: Optional[pulumi.Input[Optional[str]]] = None, Note: This data source returns a single Object Store. When specifying a name, an error will be raised if more than one Object Stores with the same name found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup = civo.get_object_store(name="backup-server") + ``` + :param str id: The ID of the Object Store :param str name: The name of the Object Store diff --git a/sdk/python/pulumi_civo/get_object_store_credential.py b/sdk/python/pulumi_civo/get_object_store_credential.py index 1a2bf7d0..47513272 100644 --- a/sdk/python/pulumi_civo/get_object_store_credential.py +++ b/sdk/python/pulumi_civo/get_object_store_credential.py @@ -113,6 +113,20 @@ def get_object_store_credential(id: Optional[str] = None, Note: This data source returns a single Object Store Credential. When specifying a name, an error will be raised if more than one Object Store Credentials with the same name found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup_object_store_credential = civo.get_object_store_credential(name="backup-server") + # Use the credential to create a bucket + backup_object_store = civo.ObjectStore("backupObjectStore", + max_size_gb=500, + region="LON1", + access_key_id=backup_object_store_credential.access_key_id) + ``` + :param str id: The ID of the Object Store Credential :param str name: The name of the Object Store Credential @@ -144,6 +158,20 @@ def get_object_store_credential_output(id: Optional[pulumi.Input[Optional[str]]] Note: This data source returns a single Object Store Credential. When specifying a name, an error will be raised if more than one Object Store Credentials with the same name found. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup_object_store_credential = civo.get_object_store_credential(name="backup-server") + # Use the credential to create a bucket + backup_object_store = civo.ObjectStore("backupObjectStore", + max_size_gb=500, + region="LON1", + access_key_id=backup_object_store_credential.access_key_id) + ``` + :param str id: The ID of the Object Store Credential :param str name: The name of the Object Store Credential diff --git a/sdk/python/pulumi_civo/get_volume.py b/sdk/python/pulumi_civo/get_volume.py index 299d8fb8..2491dc74 100644 --- a/sdk/python/pulumi_civo/get_volume.py +++ b/sdk/python/pulumi_civo/get_volume.py @@ -113,6 +113,16 @@ def get_volume(id: Optional[str] = None, An error will be raised if the provided volume name does not exist in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + myvolume = civo.get_volume(name="test-volume-name") + pulumi.export("volumeOutput", myvolume) + ``` + :param str id: The ID of this resource. :param str name: The name of the volume @@ -144,6 +154,16 @@ def get_volume_output(id: Optional[pulumi.Input[Optional[str]]] = None, An error will be raised if the provided volume name does not exist in your Civo account. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + myvolume = civo.get_volume(name="test-volume-name") + pulumi.export("volumeOutput", myvolume) + ``` + :param str id: The ID of this resource. :param str name: The name of the volume diff --git a/sdk/python/pulumi_civo/instance_reserved_ip_assignment.py b/sdk/python/pulumi_civo/instance_reserved_ip_assignment.py index ae5aad1d..992f37d9 100644 --- a/sdk/python/pulumi_civo/instance_reserved_ip_assignment.py +++ b/sdk/python/pulumi_civo/instance_reserved_ip_assignment.py @@ -175,6 +175,20 @@ def __init__(__self__, """ The instance reserved ip assignment resource schema definition + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + # Send to create a reserved IP + www = civo.ReservedIp("www") + # We assign the reserved IP to the instance + webserver_www = civo.InstanceReservedIpAssignment("webserver-www", + instance_id=civo_instance["www"]["id"], + reserved_ip_id=civo_reserved_ip["web-server"]["id"]) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] instance_id: The instance id @@ -190,6 +204,20 @@ def __init__(__self__, """ The instance reserved ip assignment resource schema definition + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + # Send to create a reserved IP + www = civo.ReservedIp("www") + # We assign the reserved IP to the instance + webserver_www = civo.InstanceReservedIpAssignment("webserver-www", + instance_id=civo_instance["www"]["id"], + reserved_ip_id=civo_reserved_ip["web-server"]["id"]) + ``` + :param str resource_name: The name of the resource. :param InstanceReservedIpAssignmentArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_civo/network.py b/sdk/python/pulumi_civo/network.py index 36d5b028..f7e9b6f8 100644 --- a/sdk/python/pulumi_civo/network.py +++ b/sdk/python/pulumi_civo/network.py @@ -165,6 +165,15 @@ def __init__(__self__, """ Provides a Civo network resource. This can be used to create, modify, and delete networks. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + custom_net = civo.Network("customNet", label="test_network") + ``` + ## Import using ID @@ -187,6 +196,15 @@ def __init__(__self__, """ Provides a Civo network resource. This can be used to create, modify, and delete networks. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + custom_net = civo.Network("customNet", label="test_network") + ``` + ## Import using ID diff --git a/sdk/python/pulumi_civo/object_store.py b/sdk/python/pulumi_civo/object_store.py index 46dc2191..9db7bd97 100644 --- a/sdk/python/pulumi_civo/object_store.py +++ b/sdk/python/pulumi_civo/object_store.py @@ -248,6 +248,18 @@ def __init__(__self__, """ Provides an Object Store resource. This can be used to create, modify, and delete object stores. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup_object_store = civo.ObjectStore("backupObjectStore", + max_size_gb=500, + region="LON1") + backup_object_store_credential = civo.get_object_store_credential_output(id=backup_object_store.access_key_id) + ``` + ## Import using ID @@ -272,6 +284,18 @@ def __init__(__self__, """ Provides an Object Store resource. This can be used to create, modify, and delete object stores. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup_object_store = civo.ObjectStore("backupObjectStore", + max_size_gb=500, + region="LON1") + backup_object_store_credential = civo.get_object_store_credential_output(id=backup_object_store.access_key_id) + ``` + ## Import using ID diff --git a/sdk/python/pulumi_civo/object_store_credential.py b/sdk/python/pulumi_civo/object_store_credential.py index 275f9b0f..68ab418a 100644 --- a/sdk/python/pulumi_civo/object_store_credential.py +++ b/sdk/python/pulumi_civo/object_store_credential.py @@ -228,6 +228,24 @@ def __init__(__self__, """ Provides an Object Store Credential resource. This can be used to create, modify, and delete object stores credential. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup_object_store_credential = civo.get_object_store_credential(name="backup-server") + # Create a credential for the object store with a specific access key and secret key + backup_index_object_store_credential_object_store_credential = civo.ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", + access_key_id="my-access-key", + secret_access_key="my-secret-key") + # Use the credential to create a bucket + backup_object_store = civo.ObjectStore("backupObjectStore", + max_size_gb=500, + region="LON1", + access_key_id=backup_index / object_store_credential_object_store_credential["accessKeyId"]) + ``` + ## Import using ID @@ -252,6 +270,24 @@ def __init__(__self__, """ Provides an Object Store Credential resource. This can be used to create, modify, and delete object stores credential. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + backup_object_store_credential = civo.get_object_store_credential(name="backup-server") + # Create a credential for the object store with a specific access key and secret key + backup_index_object_store_credential_object_store_credential = civo.ObjectStoreCredential("backupIndex/objectStoreCredentialObjectStoreCredential", + access_key_id="my-access-key", + secret_access_key="my-secret-key") + # Use the credential to create a bucket + backup_object_store = civo.ObjectStore("backupObjectStore", + max_size_gb=500, + region="LON1", + access_key_id=backup_index / object_store_credential_object_store_credential["accessKeyId"]) + ``` + ## Import using ID diff --git a/sdk/python/pulumi_civo/reserved_ip.py b/sdk/python/pulumi_civo/reserved_ip.py index 34d0696b..d7c17be1 100644 --- a/sdk/python/pulumi_civo/reserved_ip.py +++ b/sdk/python/pulumi_civo/reserved_ip.py @@ -146,6 +146,15 @@ def __init__(__self__, """ Provides a Civo reserved IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Instancesor Load Balancer. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + www = civo.ReservedIp("www") + ``` + ## Import terrafom import civo_reserved_ip.www 9f0e86fc-b2c6-46b4-82ed-2f28419f8ae3 @@ -164,6 +173,15 @@ def __init__(__self__, """ Provides a Civo reserved IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Instancesor Load Balancer. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + www = civo.ReservedIp("www") + ``` + ## Import terrafom import civo_reserved_ip.www 9f0e86fc-b2c6-46b4-82ed-2f28419f8ae3 diff --git a/sdk/python/pulumi_civo/ssh_key.py b/sdk/python/pulumi_civo/ssh_key.py index 8d90f42b..db4e8019 100644 --- a/sdk/python/pulumi_civo/ssh_key.py +++ b/sdk/python/pulumi_civo/ssh_key.py @@ -151,6 +151,15 @@ def __init__(__self__, """ Provides a Civo SSH key resource to allow you to manage SSH keys for instance access. Keys created with this resource can be referenced in your instance configuration via their ID. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + my_user = civo.SshKey("my-user", public_key=(lambda path: open(path).read())("~/.ssh/id_rsa.pub")) + ``` + ## Import using ID @@ -173,6 +182,15 @@ def __init__(__self__, """ Provides a Civo SSH key resource to allow you to manage SSH keys for instance access. Keys created with this resource can be referenced in your instance configuration via their ID. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + my_user = civo.SshKey("my-user", public_key=(lambda path: open(path).read())("~/.ssh/id_rsa.pub")) + ``` + ## Import using ID diff --git a/sdk/python/pulumi_civo/volume.py b/sdk/python/pulumi_civo/volume.py index 5dd5b844..0074874c 100644 --- a/sdk/python/pulumi_civo/volume.py +++ b/sdk/python/pulumi_civo/volume.py @@ -232,6 +232,20 @@ def __init__(__self__, """ Provides a Civo volume which can be attached to an instance in order to provide expanded storage. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + default_network = civo.get_network(label="Default") + # Create volume + db = civo.Volume("db", + size_gb=5, + network_id=default_network.id, + opts=pulumi.ResourceOptions(depends_on=[default_network])) + ``` + ## Import using ID @@ -256,6 +270,20 @@ def __init__(__self__, """ Provides a Civo volume which can be attached to an instance in order to provide expanded storage. + ## Example Usage + + ```python + import pulumi + import pulumi_civo as civo + + default_network = civo.get_network(label="Default") + # Create volume + db = civo.Volume("db", + size_gb=5, + network_id=default_network.id, + opts=pulumi.ResourceOptions(depends_on=[default_network])) + ``` + ## Import using ID