opentelekomcloud.VpcepApprovalV1
Explore with Pulumi AI
Provides a resource to manage the VPC endpoint connections.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const serviceVpcId = config.requireObject("serviceVpcId");
const vmPort = config.requireObject("vmPort");
const vpcId = config.requireObject("vpcId");
const subnetId = config.requireObject("subnetId");
const srv = new opentelekomcloud.VpcepServiceV1("srv", {
serverType: "VM",
vpcId: serviceVpcId,
portId: vmPort,
approvalEnabled: true,
ports: [{
serverPort: 8080,
clientPort: 80,
}],
});
const ep = new opentelekomcloud.VpcepEndpointV1("ep", {
serviceId: srv.vpcepServiceV1Id,
vpcId: vpcId,
subnetId: subnetId,
enableDns: true,
});
const approval = new opentelekomcloud.VpcepApprovalV1("approval", {
serviceId: srv.vpcepServiceV1Id,
endpoints: [ep.vpcepEndpointV1Id],
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
service_vpc_id = config.require_object("serviceVpcId")
vm_port = config.require_object("vmPort")
vpc_id = config.require_object("vpcId")
subnet_id = config.require_object("subnetId")
srv = opentelekomcloud.VpcepServiceV1("srv",
server_type="VM",
vpc_id=service_vpc_id,
port_id=vm_port,
approval_enabled=True,
ports=[{
"server_port": 8080,
"client_port": 80,
}])
ep = opentelekomcloud.VpcepEndpointV1("ep",
service_id=srv.vpcep_service_v1_id,
vpc_id=vpc_id,
subnet_id=subnet_id,
enable_dns=True)
approval = opentelekomcloud.VpcepApprovalV1("approval",
service_id=srv.vpcep_service_v1_id,
endpoints=[ep.vpcep_endpoint_v1_id])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
serviceVpcId := cfg.RequireObject("serviceVpcId")
vmPort := cfg.RequireObject("vmPort")
vpcId := cfg.RequireObject("vpcId")
subnetId := cfg.RequireObject("subnetId")
srv, err := opentelekomcloud.NewVpcepServiceV1(ctx, "srv", &opentelekomcloud.VpcepServiceV1Args{
ServerType: pulumi.String("VM"),
VpcId: pulumi.Any(serviceVpcId),
PortId: pulumi.Any(vmPort),
ApprovalEnabled: pulumi.Bool(true),
Ports: opentelekomcloud.VpcepServiceV1PortArray{
&opentelekomcloud.VpcepServiceV1PortArgs{
ServerPort: pulumi.Float64(8080),
ClientPort: pulumi.Float64(80),
},
},
})
if err != nil {
return err
}
ep, err := opentelekomcloud.NewVpcepEndpointV1(ctx, "ep", &opentelekomcloud.VpcepEndpointV1Args{
ServiceId: srv.VpcepServiceV1Id,
VpcId: pulumi.Any(vpcId),
SubnetId: pulumi.Any(subnetId),
EnableDns: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewVpcepApprovalV1(ctx, "approval", &opentelekomcloud.VpcepApprovalV1Args{
ServiceId: srv.VpcepServiceV1Id,
Endpoints: pulumi.StringArray{
ep.VpcepEndpointV1Id,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var serviceVpcId = config.RequireObject<dynamic>("serviceVpcId");
var vmPort = config.RequireObject<dynamic>("vmPort");
var vpcId = config.RequireObject<dynamic>("vpcId");
var subnetId = config.RequireObject<dynamic>("subnetId");
var srv = new Opentelekomcloud.VpcepServiceV1("srv", new()
{
ServerType = "VM",
VpcId = serviceVpcId,
PortId = vmPort,
ApprovalEnabled = true,
Ports = new[]
{
new Opentelekomcloud.Inputs.VpcepServiceV1PortArgs
{
ServerPort = 8080,
ClientPort = 80,
},
},
});
var ep = new Opentelekomcloud.VpcepEndpointV1("ep", new()
{
ServiceId = srv.VpcepServiceV1Id,
VpcId = vpcId,
SubnetId = subnetId,
EnableDns = true,
});
var approval = new Opentelekomcloud.VpcepApprovalV1("approval", new()
{
ServiceId = srv.VpcepServiceV1Id,
Endpoints = new[]
{
ep.VpcepEndpointV1Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.VpcepServiceV1;
import com.pulumi.opentelekomcloud.VpcepServiceV1Args;
import com.pulumi.opentelekomcloud.inputs.VpcepServiceV1PortArgs;
import com.pulumi.opentelekomcloud.VpcepEndpointV1;
import com.pulumi.opentelekomcloud.VpcepEndpointV1Args;
import com.pulumi.opentelekomcloud.VpcepApprovalV1;
import com.pulumi.opentelekomcloud.VpcepApprovalV1Args;
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) {
final var config = ctx.config();
final var serviceVpcId = config.get("serviceVpcId");
final var vmPort = config.get("vmPort");
final var vpcId = config.get("vpcId");
final var subnetId = config.get("subnetId");
var srv = new VpcepServiceV1("srv", VpcepServiceV1Args.builder()
.serverType("VM")
.vpcId(serviceVpcId)
.portId(vmPort)
.approvalEnabled(true)
.ports(VpcepServiceV1PortArgs.builder()
.serverPort(8080)
.clientPort(80)
.build())
.build());
var ep = new VpcepEndpointV1("ep", VpcepEndpointV1Args.builder()
.serviceId(srv.vpcepServiceV1Id())
.vpcId(vpcId)
.subnetId(subnetId)
.enableDns(true)
.build());
var approval = new VpcepApprovalV1("approval", VpcepApprovalV1Args.builder()
.serviceId(srv.vpcepServiceV1Id())
.endpoints(ep.vpcepEndpointV1Id())
.build());
}
}
configuration:
serviceVpcId:
type: dynamic
vmPort:
type: dynamic
vpcId:
type: dynamic
subnetId:
type: dynamic
resources:
srv:
type: opentelekomcloud:VpcepServiceV1
properties:
serverType: VM
vpcId: ${serviceVpcId}
portId: ${vmPort}
approvalEnabled: true
ports:
- serverPort: 8080
clientPort: 80
ep:
type: opentelekomcloud:VpcepEndpointV1
properties:
serviceId: ${srv.vpcepServiceV1Id}
vpcId: ${vpcId}
subnetId: ${subnetId}
enableDns: true
approval:
type: opentelekomcloud:VpcepApprovalV1
properties:
serviceId: ${srv.vpcepServiceV1Id}
endpoints:
- ${ep.vpcepEndpointV1Id}
Create VpcepApprovalV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcepApprovalV1(name: string, args: VpcepApprovalV1Args, opts?: CustomResourceOptions);
@overload
def VpcepApprovalV1(resource_name: str,
args: VpcepApprovalV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def VpcepApprovalV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoints: Optional[Sequence[str]] = None,
service_id: Optional[str] = None,
timeouts: Optional[VpcepApprovalV1TimeoutsArgs] = None,
vpcep_approval_v1_id: Optional[str] = None)
func NewVpcepApprovalV1(ctx *Context, name string, args VpcepApprovalV1Args, opts ...ResourceOption) (*VpcepApprovalV1, error)
public VpcepApprovalV1(string name, VpcepApprovalV1Args args, CustomResourceOptions? opts = null)
public VpcepApprovalV1(String name, VpcepApprovalV1Args args)
public VpcepApprovalV1(String name, VpcepApprovalV1Args args, CustomResourceOptions options)
type: opentelekomcloud:VpcepApprovalV1
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 VpcepApprovalV1Args
- 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 VpcepApprovalV1Args
- 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 VpcepApprovalV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcepApprovalV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcepApprovalV1Args
- 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 vpcepApprovalV1Resource = new Opentelekomcloud.VpcepApprovalV1("vpcepApprovalV1Resource", new()
{
Endpoints = new[]
{
"string",
},
ServiceId = "string",
Timeouts = new Opentelekomcloud.Inputs.VpcepApprovalV1TimeoutsArgs
{
Create = "string",
Delete = "string",
},
VpcepApprovalV1Id = "string",
});
example, err := opentelekomcloud.NewVpcepApprovalV1(ctx, "vpcepApprovalV1Resource", &opentelekomcloud.VpcepApprovalV1Args{
Endpoints: pulumi.StringArray{
pulumi.String("string"),
},
ServiceId: pulumi.String("string"),
Timeouts: &opentelekomcloud.VpcepApprovalV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VpcepApprovalV1Id: pulumi.String("string"),
})
var vpcepApprovalV1Resource = new VpcepApprovalV1("vpcepApprovalV1Resource", VpcepApprovalV1Args.builder()
.endpoints("string")
.serviceId("string")
.timeouts(VpcepApprovalV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.vpcepApprovalV1Id("string")
.build());
vpcep_approval_v1_resource = opentelekomcloud.VpcepApprovalV1("vpcepApprovalV1Resource",
endpoints=["string"],
service_id="string",
timeouts={
"create": "string",
"delete": "string",
},
vpcep_approval_v1_id="string")
const vpcepApprovalV1Resource = new opentelekomcloud.VpcepApprovalV1("vpcepApprovalV1Resource", {
endpoints: ["string"],
serviceId: "string",
timeouts: {
create: "string",
"delete": "string",
},
vpcepApprovalV1Id: "string",
});
type: opentelekomcloud:VpcepApprovalV1
properties:
endpoints:
- string
serviceId: string
timeouts:
create: string
delete: string
vpcepApprovalV1Id: string
VpcepApprovalV1 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 VpcepApprovalV1 resource accepts the following input properties:
- Endpoints List<string>
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- Service
Id string - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- Timeouts
Vpcep
Approval V1Timeouts - Vpcep
Approval stringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- Endpoints []string
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- Service
Id string - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- Timeouts
Vpcep
Approval V1Timeouts Args - Vpcep
Approval stringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- endpoints List<String>
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- service
Id String - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts
Vpcep
Approval V1Timeouts - vpcep
Approval StringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- endpoints string[]
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- service
Id string - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts
Vpcep
Approval V1Timeouts - vpcep
Approval stringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- endpoints Sequence[str]
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- service_
id str - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts
Vpcep
Approval V1Timeouts Args - vpcep_
approval_ strv1_ id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- endpoints List<String>
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- service
Id String - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts Property Map
- vpcep
Approval StringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcepApprovalV1 resource produces the following output properties:
- Connections
List<Vpcep
Approval V1Connection> - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- The VPC endpoint service region.
- Connections
[]Vpcep
Approval V1Connection - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- The VPC endpoint service region.
- connections
List<Vpcep
Approval V1Connection> - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- The VPC endpoint service region.
- connections
Vpcep
Approval V1Connection[] - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- region string
- The VPC endpoint service region.
- connections
Sequence[Vpcep
Approval V1Connection] - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- region str
- The VPC endpoint service region.
- connections List<Property Map>
- An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- The VPC endpoint service region.
Look up Existing VpcepApprovalV1 Resource
Get an existing VpcepApprovalV1 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?: VpcepApprovalV1State, opts?: CustomResourceOptions): VpcepApprovalV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
connections: Optional[Sequence[VpcepApprovalV1ConnectionArgs]] = None,
endpoints: Optional[Sequence[str]] = None,
region: Optional[str] = None,
service_id: Optional[str] = None,
timeouts: Optional[VpcepApprovalV1TimeoutsArgs] = None,
vpcep_approval_v1_id: Optional[str] = None) -> VpcepApprovalV1
func GetVpcepApprovalV1(ctx *Context, name string, id IDInput, state *VpcepApprovalV1State, opts ...ResourceOption) (*VpcepApprovalV1, error)
public static VpcepApprovalV1 Get(string name, Input<string> id, VpcepApprovalV1State? state, CustomResourceOptions? opts = null)
public static VpcepApprovalV1 get(String name, Output<String> id, VpcepApprovalV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:VpcepApprovalV1 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.
- Connections
List<Vpcep
Approval V1Connection> - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- Endpoints List<string>
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- Region string
- The VPC endpoint service region.
- Service
Id string - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- Timeouts
Vpcep
Approval V1Timeouts - Vpcep
Approval stringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- Connections
[]Vpcep
Approval V1Connection Args - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- Endpoints []string
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- Region string
- The VPC endpoint service region.
- Service
Id string - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- Timeouts
Vpcep
Approval V1Timeouts Args - Vpcep
Approval stringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- connections
List<Vpcep
Approval V1Connection> - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- endpoints List<String>
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- region String
- The VPC endpoint service region.
- service
Id String - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts
Vpcep
Approval V1Timeouts - vpcep
Approval StringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- connections
Vpcep
Approval V1Connection[] - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- endpoints string[]
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- region string
- The VPC endpoint service region.
- service
Id string - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts
Vpcep
Approval V1Timeouts - vpcep
Approval stringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- connections
Sequence[Vpcep
Approval V1Connection Args] - An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- endpoints Sequence[str]
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- region str
- The VPC endpoint service region.
- service_
id str - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts
Vpcep
Approval V1Timeouts Args - vpcep_
approval_ strv1_ id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
- connections List<Property Map>
- An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below.
- endpoints List<String>
- Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint service. The VPC endpoints will be rejected when the resource was destroyed.
- region String
- The VPC endpoint service region.
- service
Id String - Specifies the ID of the VPC endpoint service. Changing this creates a new resource.
- timeouts Property Map
- vpcep
Approval StringV1Id - The unique ID in UUID format which equals to the ID of the VPC endpoint service.
Supporting Types
VpcepApprovalV1Connection, VpcepApprovalV1ConnectionArgs
- Created
At string - Description string
- The description of the VPC endpoint service connection.
- Domain
Id string - The user's domain ID.
- Endpoint
Id string - The unique ID of the VPC endpoint.
- Packet
Id double - The packet ID of the VPC endpoint.
- Status string
- The connection status of the VPC endpoint.
- Updated
At string
- Created
At string - Description string
- The description of the VPC endpoint service connection.
- Domain
Id string - The user's domain ID.
- Endpoint
Id string - The unique ID of the VPC endpoint.
- Packet
Id float64 - The packet ID of the VPC endpoint.
- Status string
- The connection status of the VPC endpoint.
- Updated
At string
- created
At String - description String
- The description of the VPC endpoint service connection.
- domain
Id String - The user's domain ID.
- endpoint
Id String - The unique ID of the VPC endpoint.
- packet
Id Double - The packet ID of the VPC endpoint.
- status String
- The connection status of the VPC endpoint.
- updated
At String
- created
At string - description string
- The description of the VPC endpoint service connection.
- domain
Id string - The user's domain ID.
- endpoint
Id string - The unique ID of the VPC endpoint.
- packet
Id number - The packet ID of the VPC endpoint.
- status string
- The connection status of the VPC endpoint.
- updated
At string
- created_
at str - description str
- The description of the VPC endpoint service connection.
- domain_
id str - The user's domain ID.
- endpoint_
id str - The unique ID of the VPC endpoint.
- packet_
id float - The packet ID of the VPC endpoint.
- status str
- The connection status of the VPC endpoint.
- updated_
at str
- created
At String - description String
- The description of the VPC endpoint service connection.
- domain
Id String - The user's domain ID.
- endpoint
Id String - The unique ID of the VPC endpoint.
- packet
Id Number - The packet ID of the VPC endpoint.
- status String
- The connection status of the VPC endpoint.
- updated
At String
VpcepApprovalV1Timeouts, VpcepApprovalV1TimeoutsArgs
Import
VPC endpoint approval can be imported using the id
, e.g.
bash
$ pulumi import opentelekomcloud:index/vpcepApprovalV1:VpcepApprovalV1 apr <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.