ec logo
ElasticCloud (EC) v0.5.1, Feb 17 23

ec.DeploymentTrafficFilterAssociation

Import

Import is not supported on this resource.

Example Usage

using System.Collections.Generic;
using Pulumi;
using ElasticCloud = Pulumi.ElasticCloud;

return await Deployment.RunAsync(() => 
{
    var exampleDeployment = ElasticCloud.GetDeployment.Invoke(new()
    {
        Id = "320b7b540dfc967a7a649c18e2fce4ed",
    });

    var exampleDeploymentTrafficFilter = new ElasticCloud.DeploymentTrafficFilter("exampleDeploymentTrafficFilter", new()
    {
        Region = "us-east-1",
        Type = "ip",
        Rules = new[]
        {
            new ElasticCloud.Inputs.DeploymentTrafficFilterRuleArgs
            {
                Source = "0.0.0.0/0",
            },
        },
    });

    var exampleDeploymentTrafficFilterAssociation = new ElasticCloud.DeploymentTrafficFilterAssociation("exampleDeploymentTrafficFilterAssociation", new()
    {
        TrafficFilterId = exampleDeploymentTrafficFilter.Id,
        DeploymentId = ec_deployment.Example.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-ec/sdk/go/ec"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec.LookupDeployment(ctx, &ec.LookupDeploymentArgs{
			Id: "320b7b540dfc967a7a649c18e2fce4ed",
		}, nil)
		if err != nil {
			return err
		}
		exampleDeploymentTrafficFilter, err := ec.NewDeploymentTrafficFilter(ctx, "exampleDeploymentTrafficFilter", &ec.DeploymentTrafficFilterArgs{
			Region: pulumi.String("us-east-1"),
			Type:   pulumi.String("ip"),
			Rules: ec.DeploymentTrafficFilterRuleArray{
				&ec.DeploymentTrafficFilterRuleArgs{
					Source: pulumi.String("0.0.0.0/0"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = ec.NewDeploymentTrafficFilterAssociation(ctx, "exampleDeploymentTrafficFilterAssociation", &ec.DeploymentTrafficFilterAssociationArgs{
			TrafficFilterId: exampleDeploymentTrafficFilter.ID(),
			DeploymentId:    pulumi.Any(ec_deployment.Example.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ec.EcFunctions;
import com.pulumi.ec.inputs.GetDeploymentArgs;
import com.pulumi.ec.DeploymentTrafficFilter;
import com.pulumi.ec.DeploymentTrafficFilterArgs;
import com.pulumi.ec.inputs.DeploymentTrafficFilterRuleArgs;
import com.pulumi.ec.DeploymentTrafficFilterAssociation;
import com.pulumi.ec.DeploymentTrafficFilterAssociationArgs;
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 exampleDeployment = EcFunctions.getDeployment(GetDeploymentArgs.builder()
            .id("320b7b540dfc967a7a649c18e2fce4ed")
            .build());

        var exampleDeploymentTrafficFilter = new DeploymentTrafficFilter("exampleDeploymentTrafficFilter", DeploymentTrafficFilterArgs.builder()        
            .region("us-east-1")
            .type("ip")
            .rules(DeploymentTrafficFilterRuleArgs.builder()
                .source("0.0.0.0/0")
                .build())
            .build());

        var exampleDeploymentTrafficFilterAssociation = new DeploymentTrafficFilterAssociation("exampleDeploymentTrafficFilterAssociation", DeploymentTrafficFilterAssociationArgs.builder()        
            .trafficFilterId(exampleDeploymentTrafficFilter.id())
            .deploymentId(ec_deployment.example().id())
            .build());

    }
}
import pulumi
import pulumi_ec as ec

example_deployment = ec.get_deployment(id="320b7b540dfc967a7a649c18e2fce4ed")
example_deployment_traffic_filter = ec.DeploymentTrafficFilter("exampleDeploymentTrafficFilter",
    region="us-east-1",
    type="ip",
    rules=[ec.DeploymentTrafficFilterRuleArgs(
        source="0.0.0.0/0",
    )])
example_deployment_traffic_filter_association = ec.DeploymentTrafficFilterAssociation("exampleDeploymentTrafficFilterAssociation",
    traffic_filter_id=example_deployment_traffic_filter.id,
    deployment_id=ec_deployment["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as ec from "@pulumi/ec";

const exampleDeployment = ec.getDeployment({
    id: "320b7b540dfc967a7a649c18e2fce4ed",
});
const exampleDeploymentTrafficFilter = new ec.DeploymentTrafficFilter("exampleDeploymentTrafficFilter", {
    region: "us-east-1",
    type: "ip",
    rules: [{
        source: "0.0.0.0/0",
    }],
});
const exampleDeploymentTrafficFilterAssociation = new ec.DeploymentTrafficFilterAssociation("exampleDeploymentTrafficFilterAssociation", {
    trafficFilterId: exampleDeploymentTrafficFilter.id,
    deploymentId: ec_deployment.example.id,
});
resources:
  exampleDeploymentTrafficFilter:
    type: ec:DeploymentTrafficFilter
    properties:
      region: us-east-1
      type: ip
      rules:
        - source: 0.0.0.0/0
  exampleDeploymentTrafficFilterAssociation:
    type: ec:DeploymentTrafficFilterAssociation
    properties:
      trafficFilterId: ${exampleDeploymentTrafficFilter.id}
      deploymentId: ${ec_deployment.example.id}
variables:
  exampleDeployment:
    fn::invoke:
      Function: ec:getDeployment
      Arguments:
        id: 320b7b540dfc967a7a649c18e2fce4ed

Create DeploymentTrafficFilterAssociation Resource

new DeploymentTrafficFilterAssociation(name: string, args: DeploymentTrafficFilterAssociationArgs, opts?: CustomResourceOptions);
@overload
def DeploymentTrafficFilterAssociation(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       deployment_id: Optional[str] = None,
                                       traffic_filter_id: Optional[str] = None)
@overload
def DeploymentTrafficFilterAssociation(resource_name: str,
                                       args: DeploymentTrafficFilterAssociationArgs,
                                       opts: Optional[ResourceOptions] = None)
func NewDeploymentTrafficFilterAssociation(ctx *Context, name string, args DeploymentTrafficFilterAssociationArgs, opts ...ResourceOption) (*DeploymentTrafficFilterAssociation, error)
public DeploymentTrafficFilterAssociation(string name, DeploymentTrafficFilterAssociationArgs args, CustomResourceOptions? opts = null)
public DeploymentTrafficFilterAssociation(String name, DeploymentTrafficFilterAssociationArgs args)
public DeploymentTrafficFilterAssociation(String name, DeploymentTrafficFilterAssociationArgs args, CustomResourceOptions options)
type: ec:DeploymentTrafficFilterAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DeploymentTrafficFilterAssociationArgs
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 DeploymentTrafficFilterAssociationArgs
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 DeploymentTrafficFilterAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DeploymentTrafficFilterAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DeploymentTrafficFilterAssociationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

DeploymentId string

Deployment ID of the deployment to which the traffic filter rule is attached.

TrafficFilterId string

Traffic filter ID of the rule to use for the attachment.

DeploymentId string

Deployment ID of the deployment to which the traffic filter rule is attached.

TrafficFilterId string

Traffic filter ID of the rule to use for the attachment.

deploymentId String

Deployment ID of the deployment to which the traffic filter rule is attached.

trafficFilterId String

Traffic filter ID of the rule to use for the attachment.

deploymentId string

Deployment ID of the deployment to which the traffic filter rule is attached.

trafficFilterId string

Traffic filter ID of the rule to use for the attachment.

deployment_id str

Deployment ID of the deployment to which the traffic filter rule is attached.

traffic_filter_id str

Traffic filter ID of the rule to use for the attachment.

deploymentId String

Deployment ID of the deployment to which the traffic filter rule is attached.

trafficFilterId String

Traffic filter ID of the rule to use for the attachment.

Outputs

All input properties are implicitly available as output properties. Additionally, the DeploymentTrafficFilterAssociation 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 DeploymentTrafficFilterAssociation Resource

Get an existing DeploymentTrafficFilterAssociation 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?: DeploymentTrafficFilterAssociationState, opts?: CustomResourceOptions): DeploymentTrafficFilterAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        deployment_id: Optional[str] = None,
        traffic_filter_id: Optional[str] = None) -> DeploymentTrafficFilterAssociation
func GetDeploymentTrafficFilterAssociation(ctx *Context, name string, id IDInput, state *DeploymentTrafficFilterAssociationState, opts ...ResourceOption) (*DeploymentTrafficFilterAssociation, error)
public static DeploymentTrafficFilterAssociation Get(string name, Input<string> id, DeploymentTrafficFilterAssociationState? state, CustomResourceOptions? opts = null)
public static DeploymentTrafficFilterAssociation get(String name, Output<String> id, DeploymentTrafficFilterAssociationState 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:
DeploymentId string

Deployment ID of the deployment to which the traffic filter rule is attached.

TrafficFilterId string

Traffic filter ID of the rule to use for the attachment.

DeploymentId string

Deployment ID of the deployment to which the traffic filter rule is attached.

TrafficFilterId string

Traffic filter ID of the rule to use for the attachment.

deploymentId String

Deployment ID of the deployment to which the traffic filter rule is attached.

trafficFilterId String

Traffic filter ID of the rule to use for the attachment.

deploymentId string

Deployment ID of the deployment to which the traffic filter rule is attached.

trafficFilterId string

Traffic filter ID of the rule to use for the attachment.

deployment_id str

Deployment ID of the deployment to which the traffic filter rule is attached.

traffic_filter_id str

Traffic filter ID of the rule to use for the attachment.

deploymentId String

Deployment ID of the deployment to which the traffic filter rule is attached.

trafficFilterId String

Traffic filter ID of the rule to use for the attachment.

Package Details

Repository
ec pulumi/pulumi-ec
License
Apache-2.0
Notes

This Pulumi package is based on the ec Terraform Provider.