volcengine.vpc.NetworkAclAssociate
Explore with Pulumi AI
Provides a resource to manage network acl associate
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Vpc.NetworkAcl("foo", new()
{
VpcId = "vpc-ru0wv9alfoxsu3nuld85rpp",
NetworkAclName = "tf-test-acl",
});
var foo1 = new Volcengine.Vpc.NetworkAclAssociate("foo1", new()
{
NetworkAclId = foo.Id,
ResourceId = "subnet-637jxq81u5mon3gd6ivc7rj",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := vpc.NewNetworkAcl(ctx, "foo", &vpc.NetworkAclArgs{
VpcId: pulumi.String("vpc-ru0wv9alfoxsu3nuld85rpp"),
NetworkAclName: pulumi.String("tf-test-acl"),
})
if err != nil {
return err
}
_, err = vpc.NewNetworkAclAssociate(ctx, "foo1", &vpc.NetworkAclAssociateArgs{
NetworkAclId: foo.ID(),
ResourceId: pulumi.String("subnet-637jxq81u5mon3gd6ivc7rj"),
})
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.volcengine.vpc.NetworkAcl;
import com.pulumi.volcengine.vpc.NetworkAclArgs;
import com.pulumi.volcengine.vpc.NetworkAclAssociate;
import com.pulumi.volcengine.vpc.NetworkAclAssociateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new NetworkAcl("foo", NetworkAclArgs.builder()
.vpcId("vpc-ru0wv9alfoxsu3nuld85rpp")
.networkAclName("tf-test-acl")
.build());
var foo1 = new NetworkAclAssociate("foo1", NetworkAclAssociateArgs.builder()
.networkAclId(foo.id())
.resourceId("subnet-637jxq81u5mon3gd6ivc7rj")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.vpc.NetworkAcl("foo",
vpc_id="vpc-ru0wv9alfoxsu3nuld85rpp",
network_acl_name="tf-test-acl")
foo1 = volcengine.vpc.NetworkAclAssociate("foo1",
network_acl_id=foo.id,
resource_id="subnet-637jxq81u5mon3gd6ivc7rj")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.vpc.NetworkAcl("foo", {
vpcId: "vpc-ru0wv9alfoxsu3nuld85rpp",
networkAclName: "tf-test-acl",
});
const foo1 = new volcengine.vpc.NetworkAclAssociate("foo1", {
networkAclId: foo.id,
resourceId: "subnet-637jxq81u5mon3gd6ivc7rj",
});
resources:
foo:
type: volcengine:vpc:NetworkAcl
properties:
vpcId: vpc-ru0wv9alfoxsu3nuld85rpp
networkAclName: tf-test-acl
foo1:
type: volcengine:vpc:NetworkAclAssociate
properties:
networkAclId: ${foo.id}
resourceId: subnet-637jxq81u5mon3gd6ivc7rj
Create NetworkAclAssociate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkAclAssociate(name: string, args: NetworkAclAssociateArgs, opts?: CustomResourceOptions);
@overload
def NetworkAclAssociate(resource_name: str,
args: NetworkAclAssociateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkAclAssociate(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_acl_id: Optional[str] = None,
resource_id: Optional[str] = None)
func NewNetworkAclAssociate(ctx *Context, name string, args NetworkAclAssociateArgs, opts ...ResourceOption) (*NetworkAclAssociate, error)
public NetworkAclAssociate(string name, NetworkAclAssociateArgs args, CustomResourceOptions? opts = null)
public NetworkAclAssociate(String name, NetworkAclAssociateArgs args)
public NetworkAclAssociate(String name, NetworkAclAssociateArgs args, CustomResourceOptions options)
type: volcengine:vpc:NetworkAclAssociate
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 NetworkAclAssociateArgs
- 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 NetworkAclAssociateArgs
- 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 NetworkAclAssociateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkAclAssociateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkAclAssociateArgs
- 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 networkAclAssociateResource = new Volcengine.Vpc.NetworkAclAssociate("networkAclAssociateResource", new()
{
NetworkAclId = "string",
ResourceId = "string",
});
example, err := vpc.NewNetworkAclAssociate(ctx, "networkAclAssociateResource", &vpc.NetworkAclAssociateArgs{
NetworkAclId: pulumi.String("string"),
ResourceId: pulumi.String("string"),
})
var networkAclAssociateResource = new NetworkAclAssociate("networkAclAssociateResource", NetworkAclAssociateArgs.builder()
.networkAclId("string")
.resourceId("string")
.build());
network_acl_associate_resource = volcengine.vpc.NetworkAclAssociate("networkAclAssociateResource",
network_acl_id="string",
resource_id="string")
const networkAclAssociateResource = new volcengine.vpc.NetworkAclAssociate("networkAclAssociateResource", {
networkAclId: "string",
resourceId: "string",
});
type: volcengine:vpc:NetworkAclAssociate
properties:
networkAclId: string
resourceId: string
NetworkAclAssociate 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 NetworkAclAssociate resource accepts the following input properties:
- Network
Acl stringId - The id of Network Acl.
- Resource
Id string - The resource id of Network Acl.
- Network
Acl stringId - The id of Network Acl.
- Resource
Id string - The resource id of Network Acl.
- network
Acl StringId - The id of Network Acl.
- resource
Id String - The resource id of Network Acl.
- network
Acl stringId - The id of Network Acl.
- resource
Id string - The resource id of Network Acl.
- network_
acl_ strid - The id of Network Acl.
- resource_
id str - The resource id of Network Acl.
- network
Acl StringId - The id of Network Acl.
- resource
Id String - The resource id of Network Acl.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkAclAssociate 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 NetworkAclAssociate Resource
Get an existing NetworkAclAssociate 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?: NetworkAclAssociateState, opts?: CustomResourceOptions): NetworkAclAssociate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
network_acl_id: Optional[str] = None,
resource_id: Optional[str] = None) -> NetworkAclAssociate
func GetNetworkAclAssociate(ctx *Context, name string, id IDInput, state *NetworkAclAssociateState, opts ...ResourceOption) (*NetworkAclAssociate, error)
public static NetworkAclAssociate Get(string name, Input<string> id, NetworkAclAssociateState? state, CustomResourceOptions? opts = null)
public static NetworkAclAssociate get(String name, Output<String> id, NetworkAclAssociateState 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.
- Network
Acl stringId - The id of Network Acl.
- Resource
Id string - The resource id of Network Acl.
- Network
Acl stringId - The id of Network Acl.
- Resource
Id string - The resource id of Network Acl.
- network
Acl StringId - The id of Network Acl.
- resource
Id String - The resource id of Network Acl.
- network
Acl stringId - The id of Network Acl.
- resource
Id string - The resource id of Network Acl.
- network_
acl_ strid - The id of Network Acl.
- resource_
id str - The resource id of Network Acl.
- network
Acl StringId - The id of Network Acl.
- resource
Id String - The resource id of Network Acl.
Import
NetworkAcl associate can be imported using the network_acl_id:resource_id, e.g.
$ pulumi import volcengine:vpc/networkAclAssociate:NetworkAclAssociate default nacl-172leak37mi9s4d1w33pswqkh:subnet-637jxq81u5mon3gd6ivc7rj
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.