1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. networkfirewall
  6. ContainerAssociation
Viewing docs for AWS v7.45.0
published on Tuesday, Sep 8, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.45.0
published on Tuesday, Sep 8, 2026 by Pulumi

    Manages an AWS Network Firewall Container Association. A container association links Amazon ECS or Amazon EKS clusters to Network Firewall, resolving container IP addresses into a dynamic IP set you can reference from stateful rule groups.

    Example Usage

    EKS Cluster

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.networkfirewall.ContainerAssociation("example", {
        containerMonitoringConfigurations: [{
            attributeFilters: [{
                key: "app",
                value: "backend",
            }],
            clusterArn: exampleAwsEksCluster.arn,
        }],
        containerAssociationName: "example-eks-association",
        type: "EKS",
        description: "Association for production EKS cluster",
        tags: {
            Name: "example",
            Environment: "production",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkfirewall.ContainerAssociation("example",
        container_monitoring_configurations=[{
            "attribute_filters": [{
                "key": "app",
                "value": "backend",
            }],
            "cluster_arn": example_aws_eks_cluster["arn"],
        }],
        container_association_name="example-eks-association",
        type="EKS",
        description="Association for production EKS cluster",
        tags={
            "Name": "example",
            "Environment": "production",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkfirewall"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkfirewall.NewContainerAssociation(ctx, "example", &networkfirewall.ContainerAssociationArgs{
    			ContainerMonitoringConfigurations: networkfirewall.ContainerAssociationContainerMonitoringConfigurationArray{
    				&networkfirewall.ContainerAssociationContainerMonitoringConfigurationArgs{
    					AttributeFilters: networkfirewall.ContainerAssociationContainerMonitoringConfigurationAttributeFilterArray{
    						&networkfirewall.ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs{
    							Key:   pulumi.String("app"),
    							Value: pulumi.String("backend"),
    						},
    					},
    					ClusterArn: pulumi.Any(exampleAwsEksCluster.Arn),
    				},
    			},
    			ContainerAssociationName: pulumi.String("example-eks-association"),
    			Type:                     pulumi.String("EKS"),
    			Description:              pulumi.String("Association for production EKS cluster"),
    			Tags: pulumi.StringMap{
    				"Name":        pulumi.String("example"),
    				"Environment": pulumi.String("production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.NetworkFirewall.ContainerAssociation("example", new()
        {
            ContainerMonitoringConfigurations = new[]
            {
                new Aws.NetworkFirewall.Inputs.ContainerAssociationContainerMonitoringConfigurationArgs
                {
                    AttributeFilters = new[]
                    {
                        new Aws.NetworkFirewall.Inputs.ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs
                        {
                            Key = "app",
                            Value = "backend",
                        },
                    },
                    ClusterArn = exampleAwsEksCluster.Arn,
                },
            },
            ContainerAssociationName = "example-eks-association",
            Type = "EKS",
            Description = "Association for production EKS cluster",
            Tags = 
            {
                { "Name", "example" },
                { "Environment", "production" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkfirewall.ContainerAssociation;
    import com.pulumi.aws.networkfirewall.ContainerAssociationArgs;
    import com.pulumi.aws.networkfirewall.inputs.ContainerAssociationContainerMonitoringConfigurationArgs;
    import com.pulumi.aws.networkfirewall.inputs.ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new ContainerAssociation("example", ContainerAssociationArgs.builder()
                .containerMonitoringConfigurations(ContainerAssociationContainerMonitoringConfigurationArgs.builder()
                    .attributeFilters(ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs.builder()
                        .key("app")
                        .value("backend")
                        .build())
                    .clusterArn(exampleAwsEksCluster.arn())
                    .build())
                .containerAssociationName("example-eks-association")
                .type("EKS")
                .description("Association for production EKS cluster")
                .tags(Map.ofEntries(
                    Map.entry("Name", "example"),
                    Map.entry("Environment", "production")
                ))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:networkfirewall:ContainerAssociation
        properties:
          containerMonitoringConfigurations:
            - attributeFilters:
                - key: app
                  value: backend
              clusterArn: ${exampleAwsEksCluster.arn}
          containerAssociationName: example-eks-association
          type: EKS
          description: Association for production EKS cluster
          tags:
            Name: example
            Environment: production
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_networkfirewall_containerassociation" "example" {
      container_monitoring_configurations {
        attribute_filters {
          key   = "app"
          value = "backend"
        }
        cluster_arn = exampleAwsEksCluster.arn
      }
      container_association_name = "example-eks-association"
      type                       = "EKS"
      description                = "Association for production EKS cluster"
      tags = {
        "Name"        = "example"
        "Environment" = "production"
      }
    }
    

    ECS Cluster

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.networkfirewall.ContainerAssociation("example", {
        containerMonitoringConfigurations: [{
            clusterArn: exampleAwsEcsCluster.arn,
        }],
        containerAssociationName: "example-ecs-association",
        type: "ECS",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkfirewall.ContainerAssociation("example",
        container_monitoring_configurations=[{
            "cluster_arn": example_aws_ecs_cluster["arn"],
        }],
        container_association_name="example-ecs-association",
        type="ECS")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkfirewall"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkfirewall.NewContainerAssociation(ctx, "example", &networkfirewall.ContainerAssociationArgs{
    			ContainerMonitoringConfigurations: networkfirewall.ContainerAssociationContainerMonitoringConfigurationArray{
    				&networkfirewall.ContainerAssociationContainerMonitoringConfigurationArgs{
    					ClusterArn: pulumi.Any(exampleAwsEcsCluster.Arn),
    				},
    			},
    			ContainerAssociationName: pulumi.String("example-ecs-association"),
    			Type:                     pulumi.String("ECS"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.NetworkFirewall.ContainerAssociation("example", new()
        {
            ContainerMonitoringConfigurations = new[]
            {
                new Aws.NetworkFirewall.Inputs.ContainerAssociationContainerMonitoringConfigurationArgs
                {
                    ClusterArn = exampleAwsEcsCluster.Arn,
                },
            },
            ContainerAssociationName = "example-ecs-association",
            Type = "ECS",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkfirewall.ContainerAssociation;
    import com.pulumi.aws.networkfirewall.ContainerAssociationArgs;
    import com.pulumi.aws.networkfirewall.inputs.ContainerAssociationContainerMonitoringConfigurationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new ContainerAssociation("example", ContainerAssociationArgs.builder()
                .containerMonitoringConfigurations(ContainerAssociationContainerMonitoringConfigurationArgs.builder()
                    .clusterArn(exampleAwsEcsCluster.arn())
                    .build())
                .containerAssociationName("example-ecs-association")
                .type("ECS")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:networkfirewall:ContainerAssociation
        properties:
          containerMonitoringConfigurations:
            - clusterArn: ${exampleAwsEcsCluster.arn}
          containerAssociationName: example-ecs-association
          type: ECS
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_networkfirewall_containerassociation" "example" {
      container_monitoring_configurations {
        cluster_arn = exampleAwsEcsCluster.arn
      }
      container_association_name = "example-ecs-association"
      type                       = "ECS"
    }
    

    Create ContainerAssociation Resource

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

    Constructor syntax

    new ContainerAssociation(name: string, args: ContainerAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def ContainerAssociation(resource_name: str,
                             args: ContainerAssociationArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContainerAssociation(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             container_association_name: Optional[str] = None,
                             container_monitoring_configurations: Optional[Sequence[ContainerAssociationContainerMonitoringConfigurationArgs]] = None,
                             type: Optional[str] = None,
                             description: Optional[str] = None,
                             region: Optional[str] = None,
                             tags: Optional[Mapping[str, str]] = None,
                             timeouts: Optional[ContainerAssociationTimeoutsArgs] = None)
    func NewContainerAssociation(ctx *Context, name string, args ContainerAssociationArgs, opts ...ResourceOption) (*ContainerAssociation, error)
    public ContainerAssociation(string name, ContainerAssociationArgs args, CustomResourceOptions? opts = null)
    public ContainerAssociation(String name, ContainerAssociationArgs args)
    public ContainerAssociation(String name, ContainerAssociationArgs args, CustomResourceOptions options)
    
    type: aws:networkfirewall:ContainerAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_networkfirewall_container_association" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ContainerAssociationArgs
    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 ContainerAssociationArgs
    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 ContainerAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContainerAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContainerAssociationArgs
    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 containerAssociationResource = new Aws.NetworkFirewall.ContainerAssociation("containerAssociationResource", new()
    {
        ContainerAssociationName = "string",
        ContainerMonitoringConfigurations = new[]
        {
            new Aws.NetworkFirewall.Inputs.ContainerAssociationContainerMonitoringConfigurationArgs
            {
                ClusterArn = "string",
                AttributeFilters = new[]
                {
                    new Aws.NetworkFirewall.Inputs.ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs
                    {
                        Key = "string",
                        Value = "string",
                    },
                },
            },
        },
        Type = "string",
        Description = "string",
        Region = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.NetworkFirewall.Inputs.ContainerAssociationTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := networkfirewall.NewContainerAssociation(ctx, "containerAssociationResource", &networkfirewall.ContainerAssociationArgs{
    	ContainerAssociationName: pulumi.String("string"),
    	ContainerMonitoringConfigurations: networkfirewall.ContainerAssociationContainerMonitoringConfigurationArray{
    		&networkfirewall.ContainerAssociationContainerMonitoringConfigurationArgs{
    			ClusterArn: pulumi.String("string"),
    			AttributeFilters: networkfirewall.ContainerAssociationContainerMonitoringConfigurationAttributeFilterArray{
    				&networkfirewall.ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs{
    					Key:   pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Type:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Region:      pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &networkfirewall.ContainerAssociationTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "aws_networkfirewall_container_association" "containerAssociationResource" {
      lifecycle {
        create_before_destroy = true
      }
      container_association_name = "string"
      container_monitoring_configurations {
        cluster_arn = "string"
        attribute_filters {
          key   = "string"
          value = "string"
        }
      }
      type        = "string"
      description = "string"
      region      = "string"
      tags = {
        "string" = "string"
      }
      timeouts = {
        create = "string"
        delete = "string"
        update = "string"
      }
    }
    
    var containerAssociationResource = new ContainerAssociation("containerAssociationResource", ContainerAssociationArgs.builder()
        .containerAssociationName("string")
        .containerMonitoringConfigurations(ContainerAssociationContainerMonitoringConfigurationArgs.builder()
            .clusterArn("string")
            .attributeFilters(ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs.builder()
                .key("string")
                .value("string")
                .build())
            .build())
        .type("string")
        .description("string")
        .region("string")
        .tags(Map.of("string", "string"))
        .timeouts(ContainerAssociationTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    container_association_resource = aws.networkfirewall.ContainerAssociation("containerAssociationResource",
        container_association_name="string",
        container_monitoring_configurations=[{
            "cluster_arn": "string",
            "attribute_filters": [{
                "key": "string",
                "value": "string",
            }],
        }],
        type="string",
        description="string",
        region="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const containerAssociationResource = new aws.networkfirewall.ContainerAssociation("containerAssociationResource", {
        containerAssociationName: "string",
        containerMonitoringConfigurations: [{
            clusterArn: "string",
            attributeFilters: [{
                key: "string",
                value: "string",
            }],
        }],
        type: "string",
        description: "string",
        region: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: aws:networkfirewall:ContainerAssociation
    properties:
        containerAssociationName: string
        containerMonitoringConfigurations:
            - attributeFilters:
                - key: string
                  value: string
              clusterArn: string
        description: string
        region: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            update: string
        type: string
    

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

    ContainerAssociationName string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    ContainerMonitoringConfigurations List<ContainerAssociationContainerMonitoringConfiguration>
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    Type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    Description string
    Description of the container association.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ContainerAssociationTimeouts
    ContainerAssociationName string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    ContainerMonitoringConfigurations []ContainerAssociationContainerMonitoringConfigurationArgs
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    Type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    Description string
    Description of the container association.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ContainerAssociationTimeoutsArgs
    container_association_name string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    container_monitoring_configurations list(object)
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    description string
    Description of the container association.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags map(string)
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts object
    containerAssociationName String
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    containerMonitoringConfigurations List<ContainerAssociationContainerMonitoringConfiguration>
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    type String
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    description String
    Description of the container association.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ContainerAssociationTimeouts
    containerAssociationName string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    containerMonitoringConfigurations ContainerAssociationContainerMonitoringConfiguration[]
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    description string
    Description of the container association.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ContainerAssociationTimeouts
    container_association_name str
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    container_monitoring_configurations Sequence[ContainerAssociationContainerMonitoringConfigurationArgs]
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    type str
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    description str
    Description of the container association.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ContainerAssociationTimeoutsArgs
    containerAssociationName String
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    containerMonitoringConfigurations List<Property Map>
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    type String
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    description String
    Description of the container association.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map

    Outputs

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

    ContainerAssociationArn string
    ARN of the container association.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResolvedCidrCount int
    Number of CIDR blocks resolved from the monitored containers for this container association.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    UpdateToken string
    Token used for optimistic locking.
    ContainerAssociationArn string
    ARN of the container association.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResolvedCidrCount int
    Number of CIDR blocks resolved from the monitored containers for this container association.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    UpdateToken string
    Token used for optimistic locking.
    container_association_arn string
    ARN of the container association.
    id string
    The provider-assigned unique ID for this managed resource.
    resolved_cidr_count number
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tags_all map(string)
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    update_token string
    Token used for optimistic locking.
    containerAssociationArn String
    ARN of the container association.
    id String
    The provider-assigned unique ID for this managed resource.
    resolvedCidrCount Integer
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    updateToken String
    Token used for optimistic locking.
    containerAssociationArn string
    ARN of the container association.
    id string
    The provider-assigned unique ID for this managed resource.
    resolvedCidrCount number
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    updateToken string
    Token used for optimistic locking.
    container_association_arn str
    ARN of the container association.
    id str
    The provider-assigned unique ID for this managed resource.
    resolved_cidr_count int
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    update_token str
    Token used for optimistic locking.
    containerAssociationArn String
    ARN of the container association.
    id String
    The provider-assigned unique ID for this managed resource.
    resolvedCidrCount Number
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    updateToken String
    Token used for optimistic locking.

    Look up Existing ContainerAssociation Resource

    Get an existing ContainerAssociation 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?: ContainerAssociationState, opts?: CustomResourceOptions): ContainerAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            container_association_arn: Optional[str] = None,
            container_association_name: Optional[str] = None,
            container_monitoring_configurations: Optional[Sequence[ContainerAssociationContainerMonitoringConfigurationArgs]] = None,
            description: Optional[str] = None,
            region: Optional[str] = None,
            resolved_cidr_count: Optional[int] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[ContainerAssociationTimeoutsArgs] = None,
            type: Optional[str] = None,
            update_token: Optional[str] = None) -> ContainerAssociation
    func GetContainerAssociation(ctx *Context, name string, id IDInput, state *ContainerAssociationState, opts ...ResourceOption) (*ContainerAssociation, error)
    public static ContainerAssociation Get(string name, Input<string> id, ContainerAssociationState? state, CustomResourceOptions? opts = null)
    public static ContainerAssociation get(String name, Output<String> id, ContainerAssociationState state, CustomResourceOptions options)
    resources:  _:    type: aws:networkfirewall:ContainerAssociation    get:      id: ${id}
    import {
      to = aws_networkfirewall_container_association.example
      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.
    The following state arguments are supported:
    ContainerAssociationArn string
    ARN of the container association.
    ContainerAssociationName string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    ContainerMonitoringConfigurations List<ContainerAssociationContainerMonitoringConfiguration>
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    Description string
    Description of the container association.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ResolvedCidrCount int
    Number of CIDR blocks resolved from the monitored containers for this container association.
    Tags Dictionary<string, string>
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts ContainerAssociationTimeouts
    Type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    UpdateToken string
    Token used for optimistic locking.
    ContainerAssociationArn string
    ARN of the container association.
    ContainerAssociationName string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    ContainerMonitoringConfigurations []ContainerAssociationContainerMonitoringConfigurationArgs
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    Description string
    Description of the container association.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ResolvedCidrCount int
    Number of CIDR blocks resolved from the monitored containers for this container association.
    Tags map[string]string
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts ContainerAssociationTimeoutsArgs
    Type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    UpdateToken string
    Token used for optimistic locking.
    container_association_arn string
    ARN of the container association.
    container_association_name string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    container_monitoring_configurations list(object)
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    description string
    Description of the container association.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resolved_cidr_count number
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tags map(string)
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all map(string)
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts object
    type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    update_token string
    Token used for optimistic locking.
    containerAssociationArn String
    ARN of the container association.
    containerAssociationName String
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    containerMonitoringConfigurations List<ContainerAssociationContainerMonitoringConfiguration>
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    description String
    Description of the container association.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resolvedCidrCount Integer
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tags Map<String,String>
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ContainerAssociationTimeouts
    type String
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    updateToken String
    Token used for optimistic locking.
    containerAssociationArn string
    ARN of the container association.
    containerAssociationName string
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    containerMonitoringConfigurations ContainerAssociationContainerMonitoringConfiguration[]
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    description string
    Description of the container association.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resolvedCidrCount number
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tags {[key: string]: string}
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ContainerAssociationTimeouts
    type string
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    updateToken string
    Token used for optimistic locking.
    container_association_arn str
    ARN of the container association.
    container_association_name str
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    container_monitoring_configurations Sequence[ContainerAssociationContainerMonitoringConfigurationArgs]
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    description str
    Description of the container association.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resolved_cidr_count int
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tags Mapping[str, str]
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ContainerAssociationTimeoutsArgs
    type str
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    update_token str
    Token used for optimistic locking.
    containerAssociationArn String
    ARN of the container association.
    containerAssociationName String
    Name of the container association. You can't change the name after creation. Must be between 1 and 128 characters and contain only alphanumeric characters and hyphens.
    containerMonitoringConfigurations List<Property Map>
    One or more monitoring configurations, up to 5. See containerMonitoringConfiguration Block below.
    description String
    Description of the container association.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    resolvedCidrCount Number
    Number of CIDR blocks resolved from the monitored containers for this container association.
    tags Map<String>
    Map of resource tags to associate with the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts Property Map
    type String
    Container orchestration platform for the clusters in this association. Valid values: ECS, EKS. You can't change the type after creation.
    updateToken String
    Token used for optimistic locking.

    Supporting Types

    ContainerAssociationContainerMonitoringConfiguration, ContainerAssociationContainerMonitoringConfigurationArgs

    ClusterArn string
    ARN of the Amazon ECS or Amazon EKS cluster to monitor. The cluster must be in the same Region and account as the container association.
    AttributeFilters List<ContainerAssociationContainerMonitoringConfigurationAttributeFilter>
    Key-value pairs that filter which containers within the cluster are monitored. For Amazon EKS, filter by namespace and Kubernetes labels. For Amazon ECS, filter by container instance attributes; attribute filters only match containers on the EC2 launch type, not Fargate. See attributeFilter Block below.
    ClusterArn string
    ARN of the Amazon ECS or Amazon EKS cluster to monitor. The cluster must be in the same Region and account as the container association.
    AttributeFilters []ContainerAssociationContainerMonitoringConfigurationAttributeFilter
    Key-value pairs that filter which containers within the cluster are monitored. For Amazon EKS, filter by namespace and Kubernetes labels. For Amazon ECS, filter by container instance attributes; attribute filters only match containers on the EC2 launch type, not Fargate. See attributeFilter Block below.
    cluster_arn string
    ARN of the Amazon ECS or Amazon EKS cluster to monitor. The cluster must be in the same Region and account as the container association.
    attribute_filters list(object)
    Key-value pairs that filter which containers within the cluster are monitored. For Amazon EKS, filter by namespace and Kubernetes labels. For Amazon ECS, filter by container instance attributes; attribute filters only match containers on the EC2 launch type, not Fargate. See attributeFilter Block below.
    clusterArn String
    ARN of the Amazon ECS or Amazon EKS cluster to monitor. The cluster must be in the same Region and account as the container association.
    attributeFilters List<ContainerAssociationContainerMonitoringConfigurationAttributeFilter>
    Key-value pairs that filter which containers within the cluster are monitored. For Amazon EKS, filter by namespace and Kubernetes labels. For Amazon ECS, filter by container instance attributes; attribute filters only match containers on the EC2 launch type, not Fargate. See attributeFilter Block below.
    clusterArn string
    ARN of the Amazon ECS or Amazon EKS cluster to monitor. The cluster must be in the same Region and account as the container association.
    attributeFilters ContainerAssociationContainerMonitoringConfigurationAttributeFilter[]
    Key-value pairs that filter which containers within the cluster are monitored. For Amazon EKS, filter by namespace and Kubernetes labels. For Amazon ECS, filter by container instance attributes; attribute filters only match containers on the EC2 launch type, not Fargate. See attributeFilter Block below.
    cluster_arn str
    ARN of the Amazon ECS or Amazon EKS cluster to monitor. The cluster must be in the same Region and account as the container association.
    attribute_filters Sequence[ContainerAssociationContainerMonitoringConfigurationAttributeFilter]
    Key-value pairs that filter which containers within the cluster are monitored. For Amazon EKS, filter by namespace and Kubernetes labels. For Amazon ECS, filter by container instance attributes; attribute filters only match containers on the EC2 launch type, not Fargate. See attributeFilter Block below.
    clusterArn String
    ARN of the Amazon ECS or Amazon EKS cluster to monitor. The cluster must be in the same Region and account as the container association.
    attributeFilters List<Property Map>
    Key-value pairs that filter which containers within the cluster are monitored. For Amazon EKS, filter by namespace and Kubernetes labels. For Amazon ECS, filter by container instance attributes; attribute filters only match containers on the EC2 launch type, not Fargate. See attributeFilter Block below.

    ContainerAssociationContainerMonitoringConfigurationAttributeFilter, ContainerAssociationContainerMonitoringConfigurationAttributeFilterArgs

    Key string
    Key of the container attribute to filter on.
    Value string
    Value of the container attribute to filter on.
    Key string
    Key of the container attribute to filter on.
    Value string
    Value of the container attribute to filter on.
    key string
    Key of the container attribute to filter on.
    value string
    Value of the container attribute to filter on.
    key String
    Key of the container attribute to filter on.
    value String
    Value of the container attribute to filter on.
    key string
    Key of the container attribute to filter on.
    value string
    Value of the container attribute to filter on.
    key str
    Key of the container attribute to filter on.
    value str
    Value of the container attribute to filter on.
    key String
    Key of the container attribute to filter on.
    value String
    Value of the container attribute to filter on.

    ContainerAssociationTimeouts, ContainerAssociationTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Identity Schema

    Required

    • containerAssociationArn (String) ARN of the container association.

    Using pulumi import, import Network Firewall Container Association using the containerAssociationArn. For example:

    $ pulumi import aws:networkfirewall/containerAssociation:ContainerAssociation example arn:aws:network-firewall:us-west-2:123456789012:container-association/example
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo aws logo
    Viewing docs for AWS v7.45.0
    published on Tuesday, Sep 8, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial