selectel.VpcLicenseV2
Explore with Pulumi AI
Manages a license for cloud servers using public API v2.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";
const licenseWindows2016Standard = new selectel.VpcLicenseV2("licenseWindows2016Standard", {
projectId: selectel_vpc_project_v2.project_1.id,
region: "ru-2",
type: "license_windows_2012_standard",
});
import pulumi
import pulumi_selectel as selectel
license_windows2016_standard = selectel.VpcLicenseV2("licenseWindows2016Standard",
project_id=selectel_vpc_project_v2["project_1"]["id"],
region="ru-2",
type="license_windows_2012_standard")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := selectel.NewVpcLicenseV2(ctx, "licenseWindows2016Standard", &selectel.VpcLicenseV2Args{
ProjectId: pulumi.Any(selectel_vpc_project_v2.Project_1.Id),
Region: pulumi.String("ru-2"),
Type: pulumi.String("license_windows_2012_standard"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Selectel = Pulumi.Selectel;
return await Deployment.RunAsync(() =>
{
var licenseWindows2016Standard = new Selectel.VpcLicenseV2("licenseWindows2016Standard", new()
{
ProjectId = selectel_vpc_project_v2.Project_1.Id,
Region = "ru-2",
Type = "license_windows_2012_standard",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.VpcLicenseV2;
import com.pulumi.selectel.VpcLicenseV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var licenseWindows2016Standard = new VpcLicenseV2("licenseWindows2016Standard", VpcLicenseV2Args.builder()
.projectId(selectel_vpc_project_v2.project_1().id())
.region("ru-2")
.type("license_windows_2012_standard")
.build());
}
}
resources:
licenseWindows2016Standard:
type: selectel:VpcLicenseV2
properties:
projectId: ${selectel_vpc_project_v2.project_1.id}
region: ru-2
type: license_windows_2012_standard
Create VpcLicenseV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcLicenseV2(name: string, args: VpcLicenseV2Args, opts?: CustomResourceOptions);
@overload
def VpcLicenseV2(resource_name: str,
args: VpcLicenseV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def VpcLicenseV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
type: Optional[str] = None,
vpc_license_v2_id: Optional[str] = None)
func NewVpcLicenseV2(ctx *Context, name string, args VpcLicenseV2Args, opts ...ResourceOption) (*VpcLicenseV2, error)
public VpcLicenseV2(string name, VpcLicenseV2Args args, CustomResourceOptions? opts = null)
public VpcLicenseV2(String name, VpcLicenseV2Args args)
public VpcLicenseV2(String name, VpcLicenseV2Args args, CustomResourceOptions options)
type: selectel:VpcLicenseV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpcLicenseV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpcLicenseV2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpcLicenseV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcLicenseV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcLicenseV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpcLicenseV2Resource = new Selectel.VpcLicenseV2("vpcLicenseV2Resource", new()
{
ProjectId = "string",
Region = "string",
Type = "string",
VpcLicenseV2Id = "string",
});
example, err := selectel.NewVpcLicenseV2(ctx, "vpcLicenseV2Resource", &selectel.VpcLicenseV2Args{
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
Type: pulumi.String("string"),
VpcLicenseV2Id: pulumi.String("string"),
})
var vpcLicenseV2Resource = new VpcLicenseV2("vpcLicenseV2Resource", VpcLicenseV2Args.builder()
.projectId("string")
.region("string")
.type("string")
.vpcLicenseV2Id("string")
.build());
vpc_license_v2_resource = selectel.VpcLicenseV2("vpcLicenseV2Resource",
project_id="string",
region="string",
type="string",
vpc_license_v2_id="string")
const vpcLicenseV2Resource = new selectel.VpcLicenseV2("vpcLicenseV2Resource", {
projectId: "string",
region: "string",
type: "string",
vpcLicenseV2Id: "string",
});
type: selectel:VpcLicenseV2
properties:
projectId: string
region: string
type: string
vpcLicenseV2Id: string
VpcLicenseV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpcLicenseV2 resource accepts the following input properties:
- Project
Id string - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - Type string
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - Vpc
License stringV2Id - Unique identifier of the cloud server.
- Project
Id string - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - Type string
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - Vpc
License stringV2Id - Unique identifier of the cloud server.
- project
Id String - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - type String
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc
License StringV2Id - Unique identifier of the cloud server.
- project
Id string - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region string
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - type string
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc
License stringV2Id - Unique identifier of the cloud server.
- project_
id str - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region str
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - type str
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc_
license_ strv2_ id - Unique identifier of the cloud server.
- project
Id String - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - type String
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc
License StringV2Id - Unique identifier of the cloud server.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcLicenseV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Id string - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Servers
List<Vpc
License V2Server> - Cloud servers that use the license.
- Status string
- Status of the cloud server.
- Subnet
Id string - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Id string - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Servers
[]Vpc
License V2Server - Cloud servers that use the license.
- Status string
- Status of the cloud server.
- Subnet
Id string - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Id String - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port
Id String - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- servers
List<Vpc
License V2Server> - Cloud servers that use the license.
- status String
- Status of the cloud server.
- subnet
Id String - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- id string
- The provider-assigned unique ID for this managed resource.
- network
Id string - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- servers
Vpc
License V2Server[] - Cloud servers that use the license.
- status string
- Status of the cloud server.
- subnet
Id string - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- id str
- The provider-assigned unique ID for this managed resource.
- network_
id str - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port_
id str - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- servers
Sequence[Vpc
License V2Server] - Cloud servers that use the license.
- status str
- Status of the cloud server.
- subnet_
id str - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Id String - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port
Id String - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- servers List<Property Map>
- Cloud servers that use the license.
- status String
- Status of the cloud server.
- subnet
Id String - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
Look up Existing VpcLicenseV2 Resource
Get an existing VpcLicenseV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VpcLicenseV2State, opts?: CustomResourceOptions): VpcLicenseV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
port_id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
servers: Optional[Sequence[VpcLicenseV2ServerArgs]] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
type: Optional[str] = None,
vpc_license_v2_id: Optional[str] = None) -> VpcLicenseV2
func GetVpcLicenseV2(ctx *Context, name string, id IDInput, state *VpcLicenseV2State, opts ...ResourceOption) (*VpcLicenseV2, error)
public static VpcLicenseV2 Get(string name, Input<string> id, VpcLicenseV2State? state, CustomResourceOptions? opts = null)
public static VpcLicenseV2 get(String name, Output<String> id, VpcLicenseV2State state, CustomResourceOptions options)
resources: _: type: selectel:VpcLicenseV2 get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Network
Id string - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Project
Id string - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - Servers
List<Vpc
License V2Server> - Cloud servers that use the license.
- Status string
- Status of the cloud server.
- Subnet
Id string - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- Type string
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - Vpc
License stringV2Id - Unique identifier of the cloud server.
- Network
Id string - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Project
Id string - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Region string
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - Servers
[]Vpc
License V2Server Args - Cloud servers that use the license.
- Status string
- Status of the cloud server.
- Subnet
Id string - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- Type string
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - Vpc
License stringV2Id - Unique identifier of the cloud server.
- network
Id String - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port
Id String - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- project
Id String - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - servers
List<Vpc
License V2Server> - Cloud servers that use the license.
- status String
- Status of the cloud server.
- subnet
Id String - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- type String
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc
License StringV2Id - Unique identifier of the cloud server.
- network
Id string - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- project
Id string - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region string
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - servers
Vpc
License V2Server[] - Cloud servers that use the license.
- status string
- Status of the cloud server.
- subnet
Id string - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- type string
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc
License stringV2Id - Unique identifier of the cloud server.
- network_
id str - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port_
id str - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- project_
id str - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region str
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - servers
Sequence[Vpc
License V2Server Args] - Cloud servers that use the license.
- status str
- Status of the cloud server.
- subnet_
id str - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- type str
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc_
license_ strv2_ id - Unique identifier of the cloud server.
- network
Id String - Unique identifier of the associated OpenStack network. Learn more about the openstack_networking_network_v2 resource in the official OpenStack documentation.
- port
Id String - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- project
Id String - Unique identifier of the associated project. Changing this creates a new license. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- region String
- Pool where you can use the license, for example,
ru-3
. The cloud server must be located in the pool. Changing this creates a new license. Learn more about available pools in the Availability matrix. - servers List<Property Map>
- Cloud servers that use the license.
- status String
- Status of the cloud server.
- subnet
Id String - Unique identifier of the associated OpenStack subnet. Learn more about the openstack_networking_subnet_v2 resource in the official OpenStack documentation.
- type String
- Type of the license. Changing this creates a new license. Available values are
license_windows_2012_standard
,license_windows_2016_standard
,license_windows_2019_standard
. - vpc
License StringV2Id - Unique identifier of the cloud server.
Supporting Types
VpcLicenseV2Server, VpcLicenseV2ServerArgs
Import
You can import a license:
export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=
export OS_PASSWORD=
$ pulumi import selectel:index/vpcLicenseV2:VpcLicenseV2 license_1 <license_id>
where:
<account_id>
— Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.<username>
— Name of the service user. To get the name, in the Control panel, go to Identity & Access Management ⟶ User management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service users.<password>
— Password of the service user.<license_id>
— Unique identifier of the license, for example,4123
. To get the license ID, use Selectel Cloud Management API.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- selectel selectel/terraform-provider-selectel
- License
- Notes
- This Pulumi package is based on the
selectel
Terraform Provider.