1. Packages
  2. Openstack Provider
  3. API Docs
  4. vpnaas
  5. Service
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.vpnaas.Service

Explore with Pulumi AI

openstack logo
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages a V2 Neutron VPN service resource within OpenStack.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const service1 = new openstack.vpnaas.Service("service_1", {
        name: "my_service",
        routerId: "14a75700-fc03-4602-9294-26ee44f366b3",
        adminStateUp: true,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    service1 = openstack.vpnaas.Service("service_1",
        name="my_service",
        router_id="14a75700-fc03-4602-9294-26ee44f366b3",
        admin_state_up=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/vpnaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpnaas.NewService(ctx, "service_1", &vpnaas.ServiceArgs{
    			Name:         pulumi.String("my_service"),
    			RouterId:     pulumi.String("14a75700-fc03-4602-9294-26ee44f366b3"),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var service1 = new OpenStack.VPNaaS.Service("service_1", new()
        {
            Name = "my_service",
            RouterId = "14a75700-fc03-4602-9294-26ee44f366b3",
            AdminStateUp = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.vpnaas.Service;
    import com.pulumi.openstack.vpnaas.ServiceArgs;
    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 service1 = new Service("service1", ServiceArgs.builder()
                .name("my_service")
                .routerId("14a75700-fc03-4602-9294-26ee44f366b3")
                .adminStateUp("true")
                .build());
    
        }
    }
    
    resources:
      service1:
        type: openstack:vpnaas:Service
        name: service_1
        properties:
          name: my_service
          routerId: 14a75700-fc03-4602-9294-26ee44f366b3
          adminStateUp: 'true'
    

    Create Service Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
    @overload
    def Service(resource_name: str,
                args: ServiceArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Service(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                router_id: Optional[str] = None,
                admin_state_up: Optional[bool] = None,
                description: Optional[str] = None,
                name: Optional[str] = None,
                region: Optional[str] = None,
                subnet_id: Optional[str] = None,
                tenant_id: Optional[str] = None,
                value_specs: Optional[Mapping[str, str]] = None)
    func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
    public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
    public Service(String name, ServiceArgs args)
    public Service(String name, ServiceArgs args, CustomResourceOptions options)
    
    type: openstack:vpnaas:Service
    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 ServiceArgs
    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 ServiceArgs
    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 ServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceArgs
    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 serviceResource = new OpenStack.VPNaaS.Service("serviceResource", new()
    {
        RouterId = "string",
        AdminStateUp = false,
        Description = "string",
        Name = "string",
        Region = "string",
        SubnetId = "string",
        TenantId = "string",
        ValueSpecs = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpnaas.NewService(ctx, "serviceResource", &vpnaas.ServiceArgs{
    	RouterId:     pulumi.String("string"),
    	AdminStateUp: pulumi.Bool(false),
    	Description:  pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	SubnetId:     pulumi.String("string"),
    	TenantId:     pulumi.String("string"),
    	ValueSpecs: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var serviceResource = new Service("serviceResource", ServiceArgs.builder()
        .routerId("string")
        .adminStateUp(false)
        .description("string")
        .name("string")
        .region("string")
        .subnetId("string")
        .tenantId("string")
        .valueSpecs(Map.of("string", "string"))
        .build());
    
    service_resource = openstack.vpnaas.Service("serviceResource",
        router_id="string",
        admin_state_up=False,
        description="string",
        name="string",
        region="string",
        subnet_id="string",
        tenant_id="string",
        value_specs={
            "string": "string",
        })
    
    const serviceResource = new openstack.vpnaas.Service("serviceResource", {
        routerId: "string",
        adminStateUp: false,
        description: "string",
        name: "string",
        region: "string",
        subnetId: "string",
        tenantId: "string",
        valueSpecs: {
            string: "string",
        },
    });
    
    type: openstack:vpnaas:Service
    properties:
        adminStateUp: false
        description: string
        name: string
        region: string
        routerId: string
        subnetId: string
        tenantId: string
        valueSpecs:
            string: string
    

    Service 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 Service resource accepts the following input properties:

    RouterId string
    The ID of the router. Changing this creates a new service.
    AdminStateUp bool
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    Description string
    The human-readable description for the service. Changing this updates the description of the existing service.
    Name string
    The name of the service. Changing this updates the name of the existing service.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    SubnetId string
    SubnetID is the ID of the subnet. Default is null.
    TenantId string
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    ValueSpecs Dictionary<string, string>
    Map of additional options.
    RouterId string
    The ID of the router. Changing this creates a new service.
    AdminStateUp bool
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    Description string
    The human-readable description for the service. Changing this updates the description of the existing service.
    Name string
    The name of the service. Changing this updates the name of the existing service.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    SubnetId string
    SubnetID is the ID of the subnet. Default is null.
    TenantId string
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    ValueSpecs map[string]string
    Map of additional options.
    routerId String
    The ID of the router. Changing this creates a new service.
    adminStateUp Boolean
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description String
    The human-readable description for the service. Changing this updates the description of the existing service.
    name String
    The name of the service. Changing this updates the name of the existing service.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    subnetId String
    SubnetID is the ID of the subnet. Default is null.
    tenantId String
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    valueSpecs Map<String,String>
    Map of additional options.
    routerId string
    The ID of the router. Changing this creates a new service.
    adminStateUp boolean
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description string
    The human-readable description for the service. Changing this updates the description of the existing service.
    name string
    The name of the service. Changing this updates the name of the existing service.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    subnetId string
    SubnetID is the ID of the subnet. Default is null.
    tenantId string
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    valueSpecs {[key: string]: string}
    Map of additional options.
    router_id str
    The ID of the router. Changing this creates a new service.
    admin_state_up bool
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description str
    The human-readable description for the service. Changing this updates the description of the existing service.
    name str
    The name of the service. Changing this updates the name of the existing service.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    subnet_id str
    SubnetID is the ID of the subnet. Default is null.
    tenant_id str
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    value_specs Mapping[str, str]
    Map of additional options.
    routerId String
    The ID of the router. Changing this creates a new service.
    adminStateUp Boolean
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description String
    The human-readable description for the service. Changing this updates the description of the existing service.
    name String
    The name of the service. Changing this updates the name of the existing service.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    subnetId String
    SubnetID is the ID of the subnet. Default is null.
    tenantId String
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    valueSpecs Map<String>
    Map of additional options.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:

    ExternalV4Ip string
    The read-only external (public) IPv4 address that is used for the VPN service.
    ExternalV6Ip string
    The read-only external (public) IPv6 address that is used for the VPN service.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    ExternalV4Ip string
    The read-only external (public) IPv4 address that is used for the VPN service.
    ExternalV6Ip string
    The read-only external (public) IPv6 address that is used for the VPN service.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    externalV4Ip String
    The read-only external (public) IPv4 address that is used for the VPN service.
    externalV6Ip String
    The read-only external (public) IPv6 address that is used for the VPN service.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    externalV4Ip string
    The read-only external (public) IPv4 address that is used for the VPN service.
    externalV6Ip string
    The read-only external (public) IPv6 address that is used for the VPN service.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    external_v4_ip str
    The read-only external (public) IPv4 address that is used for the VPN service.
    external_v6_ip str
    The read-only external (public) IPv6 address that is used for the VPN service.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    externalV4Ip String
    The read-only external (public) IPv4 address that is used for the VPN service.
    externalV6Ip String
    The read-only external (public) IPv6 address that is used for the VPN service.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.

    Look up Existing Service Resource

    Get an existing Service 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?: ServiceState, opts?: CustomResourceOptions): Service
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            admin_state_up: Optional[bool] = None,
            description: Optional[str] = None,
            external_v4_ip: Optional[str] = None,
            external_v6_ip: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            router_id: Optional[str] = None,
            status: Optional[str] = None,
            subnet_id: Optional[str] = None,
            tenant_id: Optional[str] = None,
            value_specs: Optional[Mapping[str, str]] = None) -> Service
    func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
    public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
    public static Service get(String name, Output<String> id, ServiceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AdminStateUp bool
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    Description string
    The human-readable description for the service. Changing this updates the description of the existing service.
    ExternalV4Ip string
    The read-only external (public) IPv4 address that is used for the VPN service.
    ExternalV6Ip string
    The read-only external (public) IPv6 address that is used for the VPN service.
    Name string
    The name of the service. Changing this updates the name of the existing service.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    RouterId string
    The ID of the router. Changing this creates a new service.
    Status string
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    SubnetId string
    SubnetID is the ID of the subnet. Default is null.
    TenantId string
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    ValueSpecs Dictionary<string, string>
    Map of additional options.
    AdminStateUp bool
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    Description string
    The human-readable description for the service. Changing this updates the description of the existing service.
    ExternalV4Ip string
    The read-only external (public) IPv4 address that is used for the VPN service.
    ExternalV6Ip string
    The read-only external (public) IPv6 address that is used for the VPN service.
    Name string
    The name of the service. Changing this updates the name of the existing service.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    RouterId string
    The ID of the router. Changing this creates a new service.
    Status string
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    SubnetId string
    SubnetID is the ID of the subnet. Default is null.
    TenantId string
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    ValueSpecs map[string]string
    Map of additional options.
    adminStateUp Boolean
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description String
    The human-readable description for the service. Changing this updates the description of the existing service.
    externalV4Ip String
    The read-only external (public) IPv4 address that is used for the VPN service.
    externalV6Ip String
    The read-only external (public) IPv6 address that is used for the VPN service.
    name String
    The name of the service. Changing this updates the name of the existing service.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    routerId String
    The ID of the router. Changing this creates a new service.
    status String
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    subnetId String
    SubnetID is the ID of the subnet. Default is null.
    tenantId String
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    valueSpecs Map<String,String>
    Map of additional options.
    adminStateUp boolean
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description string
    The human-readable description for the service. Changing this updates the description of the existing service.
    externalV4Ip string
    The read-only external (public) IPv4 address that is used for the VPN service.
    externalV6Ip string
    The read-only external (public) IPv6 address that is used for the VPN service.
    name string
    The name of the service. Changing this updates the name of the existing service.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    routerId string
    The ID of the router. Changing this creates a new service.
    status string
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    subnetId string
    SubnetID is the ID of the subnet. Default is null.
    tenantId string
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    valueSpecs {[key: string]: string}
    Map of additional options.
    admin_state_up bool
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description str
    The human-readable description for the service. Changing this updates the description of the existing service.
    external_v4_ip str
    The read-only external (public) IPv4 address that is used for the VPN service.
    external_v6_ip str
    The read-only external (public) IPv6 address that is used for the VPN service.
    name str
    The name of the service. Changing this updates the name of the existing service.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    router_id str
    The ID of the router. Changing this creates a new service.
    status str
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    subnet_id str
    SubnetID is the ID of the subnet. Default is null.
    tenant_id str
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    value_specs Mapping[str, str]
    Map of additional options.
    adminStateUp Boolean
    The administrative state of the resource. Can either be up(true) or down(false). Changing this updates the administrative state of the existing service.
    description String
    The human-readable description for the service. Changing this updates the description of the existing service.
    externalV4Ip String
    The read-only external (public) IPv4 address that is used for the VPN service.
    externalV6Ip String
    The read-only external (public) IPv6 address that is used for the VPN service.
    name String
    The name of the service. Changing this updates the name of the existing service.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a VPN service. If omitted, the region argument of the provider is used. Changing this creates a new service.
    routerId String
    The ID of the router. Changing this creates a new service.
    status String
    Indicates whether IPsec VPN service is currently operational. Values are ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
    subnetId String
    SubnetID is the ID of the subnet. Default is null.
    tenantId String
    The owner of the service. Required if admin wants to create a service for another project. Changing this creates a new service.
    valueSpecs Map<String>
    Map of additional options.

    Import

    Services can be imported using the id, e.g.

    $ pulumi import openstack:vpnaas/service:Service service_1 832cb7f3-59fe-40cf-8f64-8350ffc03272
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi