alicloud.edas.K8sSlbAttachment
Explore with Pulumi AI
Binds SLBs to an EDAS k8s application.
For information about EDAS k8s slb attachment and how to use it, see What is k8s slb attachment.
NOTE: Available since v1.194.0.
Create K8sSlbAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new K8sSlbAttachment(name: string, args: K8sSlbAttachmentArgs, opts?: CustomResourceOptions);
@overload
def K8sSlbAttachment(resource_name: str,
args: K8sSlbAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def K8sSlbAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
slb_configs: Optional[Sequence[K8sSlbAttachmentSlbConfigArgs]] = None)
func NewK8sSlbAttachment(ctx *Context, name string, args K8sSlbAttachmentArgs, opts ...ResourceOption) (*K8sSlbAttachment, error)
public K8sSlbAttachment(string name, K8sSlbAttachmentArgs args, CustomResourceOptions? opts = null)
public K8sSlbAttachment(String name, K8sSlbAttachmentArgs args)
public K8sSlbAttachment(String name, K8sSlbAttachmentArgs args, CustomResourceOptions options)
type: alicloud:edas:K8sSlbAttachment
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 K8sSlbAttachmentArgs
- 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 K8sSlbAttachmentArgs
- 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 K8sSlbAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args K8sSlbAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args K8sSlbAttachmentArgs
- 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 k8sSlbAttachmentResource = new AliCloud.Edas.K8sSlbAttachment("k8sSlbAttachmentResource", new()
{
AppId = "string",
SlbConfigs = new[]
{
new AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfigArgs
{
PortMappings = new[]
{
new AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfigPortMappingArgs
{
LoadbalancerProtocol = "string",
ServicePort = new AliCloud.Edas.Inputs.K8sSlbAttachmentSlbConfigPortMappingServicePortArgs
{
Port = 0,
Protocol = "string",
TargetPort = 0,
},
CertId = "string",
},
},
Scheduler = "string",
Type = "string",
Name = "string",
SlbId = "string",
Specification = "string",
},
},
});
example, err := edas.NewK8sSlbAttachment(ctx, "k8sSlbAttachmentResource", &edas.K8sSlbAttachmentArgs{
AppId: pulumi.String("string"),
SlbConfigs: edas.K8sSlbAttachmentSlbConfigArray{
&edas.K8sSlbAttachmentSlbConfigArgs{
PortMappings: edas.K8sSlbAttachmentSlbConfigPortMappingArray{
&edas.K8sSlbAttachmentSlbConfigPortMappingArgs{
LoadbalancerProtocol: pulumi.String("string"),
ServicePort: &edas.K8sSlbAttachmentSlbConfigPortMappingServicePortArgs{
Port: pulumi.Int(0),
Protocol: pulumi.String("string"),
TargetPort: pulumi.Int(0),
},
CertId: pulumi.String("string"),
},
},
Scheduler: pulumi.String("string"),
Type: pulumi.String("string"),
Name: pulumi.String("string"),
SlbId: pulumi.String("string"),
Specification: pulumi.String("string"),
},
},
})
var k8sSlbAttachmentResource = new K8sSlbAttachment("k8sSlbAttachmentResource", K8sSlbAttachmentArgs.builder()
.appId("string")
.slbConfigs(K8sSlbAttachmentSlbConfigArgs.builder()
.portMappings(K8sSlbAttachmentSlbConfigPortMappingArgs.builder()
.loadbalancerProtocol("string")
.servicePort(K8sSlbAttachmentSlbConfigPortMappingServicePortArgs.builder()
.port(0)
.protocol("string")
.targetPort(0)
.build())
.certId("string")
.build())
.scheduler("string")
.type("string")
.name("string")
.slbId("string")
.specification("string")
.build())
.build());
k8s_slb_attachment_resource = alicloud.edas.K8sSlbAttachment("k8sSlbAttachmentResource",
app_id="string",
slb_configs=[alicloud.edas.K8sSlbAttachmentSlbConfigArgs(
port_mappings=[alicloud.edas.K8sSlbAttachmentSlbConfigPortMappingArgs(
loadbalancer_protocol="string",
service_port=alicloud.edas.K8sSlbAttachmentSlbConfigPortMappingServicePortArgs(
port=0,
protocol="string",
target_port=0,
),
cert_id="string",
)],
scheduler="string",
type="string",
name="string",
slb_id="string",
specification="string",
)])
const k8sSlbAttachmentResource = new alicloud.edas.K8sSlbAttachment("k8sSlbAttachmentResource", {
appId: "string",
slbConfigs: [{
portMappings: [{
loadbalancerProtocol: "string",
servicePort: {
port: 0,
protocol: "string",
targetPort: 0,
},
certId: "string",
}],
scheduler: "string",
type: "string",
name: "string",
slbId: "string",
specification: "string",
}],
});
type: alicloud:edas:K8sSlbAttachment
properties:
appId: string
slbConfigs:
- name: string
portMappings:
- certId: string
loadbalancerProtocol: string
servicePort:
port: 0
protocol: string
targetPort: 0
scheduler: string
slbId: string
specification: string
type: string
K8sSlbAttachment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The K8sSlbAttachment resource accepts the following input properties:
- App
Id string - The ID of the EDAS k8s application to which you want to bind SLB instances.
- Slb
Configs List<Pulumi.Ali Cloud. Edas. Inputs. K8s Slb Attachment Slb Config> - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- App
Id string - The ID of the EDAS k8s application to which you want to bind SLB instances.
- Slb
Configs []K8sSlb Attachment Slb Config Args - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app
Id String - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb
Configs List<K8sSlb Attachment Slb Config> - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app
Id string - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb
Configs K8sSlb Attachment Slb Config[] - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app_
id str - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb_
configs Sequence[K8sSlb Attachment Slb Config Args] - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app
Id String - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb
Configs List<Property Map> - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the K8sSlbAttachment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing K8sSlbAttachment Resource
Get an existing K8sSlbAttachment 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?: K8sSlbAttachmentState, opts?: CustomResourceOptions): K8sSlbAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
slb_configs: Optional[Sequence[K8sSlbAttachmentSlbConfigArgs]] = None) -> K8sSlbAttachment
func GetK8sSlbAttachment(ctx *Context, name string, id IDInput, state *K8sSlbAttachmentState, opts ...ResourceOption) (*K8sSlbAttachment, error)
public static K8sSlbAttachment Get(string name, Input<string> id, K8sSlbAttachmentState? state, CustomResourceOptions? opts = null)
public static K8sSlbAttachment get(String name, Output<String> id, K8sSlbAttachmentState 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.
- App
Id string - The ID of the EDAS k8s application to which you want to bind SLB instances.
- Slb
Configs List<Pulumi.Ali Cloud. Edas. Inputs. K8s Slb Attachment Slb Config> - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- App
Id string - The ID of the EDAS k8s application to which you want to bind SLB instances.
- Slb
Configs []K8sSlb Attachment Slb Config Args - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app
Id String - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb
Configs List<K8sSlb Attachment Slb Config> - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app
Id string - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb
Configs K8sSlb Attachment Slb Config[] - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app_
id str - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb_
configs Sequence[K8sSlb Attachment Slb Config Args] - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
- app
Id String - The ID of the EDAS k8s application to which you want to bind SLB instances.
- slb
Configs List<Property Map> - The configurations of SLB attachment, which is supported for multiple configurations. See
slb_configs
below.
Supporting Types
K8sSlbAttachmentSlbConfig, K8sSlbAttachmentSlbConfigArgs
- Port
Mappings List<Pulumi.Ali Cloud. Edas. Inputs. K8s Slb Attachment Slb Config Port Mapping> - The port configuration for SLB instance, which is supported for multiple configurations. See
port_mappings
below. - Scheduler string
- The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
- Type string
- The type of SLB instance, values can be 'internet' or 'intranet'.
- Name string
- The name of this SLB configuration, empty for auto-generated by EDAS server.
- Slb
Id string - The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
- Specification string
- The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
- Port
Mappings []K8sSlb Attachment Slb Config Port Mapping - The port configuration for SLB instance, which is supported for multiple configurations. See
port_mappings
below. - Scheduler string
- The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
- Type string
- The type of SLB instance, values can be 'internet' or 'intranet'.
- Name string
- The name of this SLB configuration, empty for auto-generated by EDAS server.
- Slb
Id string - The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
- Specification string
- The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
- port
Mappings List<K8sSlb Attachment Slb Config Port Mapping> - The port configuration for SLB instance, which is supported for multiple configurations. See
port_mappings
below. - scheduler String
- The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
- type String
- The type of SLB instance, values can be 'internet' or 'intranet'.
- name String
- The name of this SLB configuration, empty for auto-generated by EDAS server.
- slb
Id String - The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
- specification String
- The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
- port
Mappings K8sSlb Attachment Slb Config Port Mapping[] - The port configuration for SLB instance, which is supported for multiple configurations. See
port_mappings
below. - scheduler string
- The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
- type string
- The type of SLB instance, values can be 'internet' or 'intranet'.
- name string
- The name of this SLB configuration, empty for auto-generated by EDAS server.
- slb
Id string - The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
- specification string
- The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
- port_
mappings Sequence[K8sSlb Attachment Slb Config Port Mapping] - The port configuration for SLB instance, which is supported for multiple configurations. See
port_mappings
below. - scheduler str
- The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
- type str
- The type of SLB instance, values can be 'internet' or 'intranet'.
- name str
- The name of this SLB configuration, empty for auto-generated by EDAS server.
- slb_
id str - The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
- specification str
- The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
- port
Mappings List<Property Map> - The port configuration for SLB instance, which is supported for multiple configurations. See
port_mappings
below. - scheduler String
- The scheduler policy of SLB configuration, values can be 'rr'(round-robin) or 'wrr'(weighted round-robin).
- type String
- The type of SLB instance, values can be 'internet' or 'intranet'.
- name String
- The name of this SLB configuration, empty for auto-generated by EDAS server.
- slb
Id String - The ID of your SLB instance, if value is empty which means EDAS will purchase an SLB instance with 'specification' field.
- specification String
- The instance specification of SLB, values can be found here, empty for 'slb.s1.small'.
K8sSlbAttachmentSlbConfigPortMapping, K8sSlbAttachmentSlbConfigPortMappingArgs
- Loadbalancer
Protocol string - The protocol of SLB instance configuration, values can be 'TCP', 'HTTP' or 'HTTPS'.
- Service
Port Pulumi.Ali Cloud. Edas. Inputs. K8s Slb Attachment Slb Config Port Mapping Service Port - The backend k8s service configuration for SLB instance, which is supported for multiple configurations. See
service_port
below. - Cert
Id string - The ID of your tls certification, this is used for 'HTTPS' protocol only.
- Loadbalancer
Protocol string - The protocol of SLB instance configuration, values can be 'TCP', 'HTTP' or 'HTTPS'.
- Service
Port K8sSlb Attachment Slb Config Port Mapping Service Port - The backend k8s service configuration for SLB instance, which is supported for multiple configurations. See
service_port
below. - Cert
Id string - The ID of your tls certification, this is used for 'HTTPS' protocol only.
- loadbalancer
Protocol String - The protocol of SLB instance configuration, values can be 'TCP', 'HTTP' or 'HTTPS'.
- service
Port K8sSlb Attachment Slb Config Port Mapping Service Port - The backend k8s service configuration for SLB instance, which is supported for multiple configurations. See
service_port
below. - cert
Id String - The ID of your tls certification, this is used for 'HTTPS' protocol only.
- loadbalancer
Protocol string - The protocol of SLB instance configuration, values can be 'TCP', 'HTTP' or 'HTTPS'.
- service
Port K8sSlb Attachment Slb Config Port Mapping Service Port - The backend k8s service configuration for SLB instance, which is supported for multiple configurations. See
service_port
below. - cert
Id string - The ID of your tls certification, this is used for 'HTTPS' protocol only.
- loadbalancer_
protocol str - The protocol of SLB instance configuration, values can be 'TCP', 'HTTP' or 'HTTPS'.
- service_
port K8sSlb Attachment Slb Config Port Mapping Service Port - The backend k8s service configuration for SLB instance, which is supported for multiple configurations. See
service_port
below. - cert_
id str - The ID of your tls certification, this is used for 'HTTPS' protocol only.
- loadbalancer
Protocol String - The protocol of SLB instance configuration, values can be 'TCP', 'HTTP' or 'HTTPS'.
- service
Port Property Map - The backend k8s service configuration for SLB instance, which is supported for multiple configurations. See
service_port
below. - cert
Id String - The ID of your tls certification, this is used for 'HTTPS' protocol only.
K8sSlbAttachmentSlbConfigPortMappingServicePort, K8sSlbAttachmentSlbConfigPortMappingServicePortArgs
- Port int
- The port of k8s service, values should be within range [1, 65535].
- Protocol string
- The protocol of k8s service, values can be 'TCP' or 'UDP'.
- Target
Port int - The port of k8s pod, values should be within range [1, 65535].
- Port int
- The port of k8s service, values should be within range [1, 65535].
- Protocol string
- The protocol of k8s service, values can be 'TCP' or 'UDP'.
- Target
Port int - The port of k8s pod, values should be within range [1, 65535].
- port Integer
- The port of k8s service, values should be within range [1, 65535].
- protocol String
- The protocol of k8s service, values can be 'TCP' or 'UDP'.
- target
Port Integer - The port of k8s pod, values should be within range [1, 65535].
- port number
- The port of k8s service, values should be within range [1, 65535].
- protocol string
- The protocol of k8s service, values can be 'TCP' or 'UDP'.
- target
Port number - The port of k8s pod, values should be within range [1, 65535].
- port int
- The port of k8s service, values should be within range [1, 65535].
- protocol str
- The protocol of k8s service, values can be 'TCP' or 'UDP'.
- target_
port int - The port of k8s pod, values should be within range [1, 65535].
- port Number
- The port of k8s service, values should be within range [1, 65535].
- protocol String
- The protocol of k8s service, values can be 'TCP' or 'UDP'.
- target
Port Number - The port of k8s pod, values should be within range [1, 65535].
Import
Slb information of EDAS k8s application can be imported using the ID of an EDAS k8s application. e.g.
$ pulumi import alicloud:edas/k8sSlbAttachment:K8sSlbAttachment example <EDAS k8s app id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.