aws.networkmanager.CoreNetwork
Explore with Pulumi AI
Provides a core network resource.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.networkmanager.CoreNetwork("example", {globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id});
import pulumi
import pulumi_aws as aws
example = aws.networkmanager.CoreNetwork("example", global_network_id=example_aws_networkmanager_global_network["id"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkmanager.NewCoreNetwork(ctx, "example", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: pulumi.Any(exampleAwsNetworkmanagerGlobalNetwork.Id),
})
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.NetworkManager.CoreNetwork("example", new()
{
GlobalNetworkId = exampleAwsNetworkmanagerGlobalNetwork.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.CoreNetwork;
import com.pulumi.aws.networkmanager.CoreNetworkArgs;
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 example = new CoreNetwork("example", CoreNetworkArgs.builder()
.globalNetworkId(exampleAwsNetworkmanagerGlobalNetwork.id())
.build());
}
}
resources:
example:
type: aws:networkmanager:CoreNetwork
properties:
globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
With description
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.networkmanager.CoreNetwork("example", {
globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id,
description: "example",
});
import pulumi
import pulumi_aws as aws
example = aws.networkmanager.CoreNetwork("example",
global_network_id=example_aws_networkmanager_global_network["id"],
description="example")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkmanager.NewCoreNetwork(ctx, "example", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: pulumi.Any(exampleAwsNetworkmanagerGlobalNetwork.Id),
Description: pulumi.String("example"),
})
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.NetworkManager.CoreNetwork("example", new()
{
GlobalNetworkId = exampleAwsNetworkmanagerGlobalNetwork.Id,
Description = "example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.CoreNetwork;
import com.pulumi.aws.networkmanager.CoreNetworkArgs;
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 example = new CoreNetwork("example", CoreNetworkArgs.builder()
.globalNetworkId(exampleAwsNetworkmanagerGlobalNetwork.id())
.description("example")
.build());
}
}
resources:
example:
type: aws:networkmanager:CoreNetwork
properties:
globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
description: example
With tags
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.networkmanager.CoreNetwork("example", {
globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id,
tags: {
hello: "world",
},
});
import pulumi
import pulumi_aws as aws
example = aws.networkmanager.CoreNetwork("example",
global_network_id=example_aws_networkmanager_global_network["id"],
tags={
"hello": "world",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkmanager.NewCoreNetwork(ctx, "example", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: pulumi.Any(exampleAwsNetworkmanagerGlobalNetwork.Id),
Tags: pulumi.StringMap{
"hello": pulumi.String("world"),
},
})
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.NetworkManager.CoreNetwork("example", new()
{
GlobalNetworkId = exampleAwsNetworkmanagerGlobalNetwork.Id,
Tags =
{
{ "hello", "world" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.CoreNetwork;
import com.pulumi.aws.networkmanager.CoreNetworkArgs;
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 example = new CoreNetwork("example", CoreNetworkArgs.builder()
.globalNetworkId(exampleAwsNetworkmanagerGlobalNetwork.id())
.tags(Map.of("hello", "world"))
.build());
}
}
resources:
example:
type: aws:networkmanager:CoreNetwork
properties:
globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
tags:
hello: world
With VPC Attachment (Single Region)
The example below illustrates the scenario where your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Set the create_base_policy argument to true if your core network does not currently have any LIVE policies (e.g. this is the first pulumi up with the core network resource), since a LIVE policy is required before VPCs can be attached to the core network. Otherwise, if your core network already has a LIVE policy, you may exclude the create_base_policy argument. There are 2 options to implement this:
- Option 1: Use the
base_policy_documentargument that allows the most customizations to a base policy. Use this to customize theedge_locationsasn. In the example below,us-west-2and ASN65500are used in the base policy. - Option 2: Use the
create_base_policyargument only. This creates a base policy in the region specified in theproviderblock.
Option 1 - using base_policy_document
If you require a custom ASN for the edge location, please use the base_policy_document argument to pass a specific ASN. For example:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleGlobalNetwork = new aws.networkmanager.GlobalNetwork("example", {});
const base = aws.networkmanager.getCoreNetworkPolicyDocument({
coreNetworkConfigurations: [{
asnRanges: ["65022-65534"],
edgeLocations: [{
location: "us-west-2",
asn: "65500",
}],
}],
segments: [{
name: "segment",
}],
});
const exampleCoreNetwork = new aws.networkmanager.CoreNetwork("example", {
globalNetworkId: exampleGlobalNetwork.id,
basePolicyDocument: base.then(base => base.json),
createBasePolicy: true,
});
const exampleVpcAttachment = new aws.networkmanager.VpcAttachment("example", {
coreNetworkId: exampleCoreNetwork.id,
subnetArns: exampleAwsSubnet.map(__item => __item.arn),
vpcArn: exampleAwsVpc.arn,
});
const example = aws.networkmanager.getCoreNetworkPolicyDocumentOutput({
coreNetworkConfigurations: [{
asnRanges: ["65022-65534"],
edgeLocations: [{
location: "us-west-2",
asn: "65500",
}],
}],
segments: [{
name: "segment",
}],
segmentActions: [{
action: "create-route",
segment: "segment",
destinationCidrBlocks: ["0.0.0.0/0"],
destinations: [exampleVpcAttachment.id],
}],
});
const exampleCoreNetworkPolicyAttachment = new aws.networkmanager.CoreNetworkPolicyAttachment("example", {
coreNetworkId: exampleCoreNetwork.id,
policyDocument: example.apply(example => example.json),
});
import pulumi
import pulumi_aws as aws
example_global_network = aws.networkmanager.GlobalNetwork("example")
base = aws.networkmanager.get_core_network_policy_document(core_network_configurations=[{
"asn_ranges": ["65022-65534"],
"edge_locations": [{
"location": "us-west-2",
"asn": "65500",
}],
}],
segments=[{
"name": "segment",
}])
example_core_network = aws.networkmanager.CoreNetwork("example",
global_network_id=example_global_network.id,
base_policy_document=base.json,
create_base_policy=True)
example_vpc_attachment = aws.networkmanager.VpcAttachment("example",
core_network_id=example_core_network.id,
subnet_arns=[__item["arn"] for __item in example_aws_subnet],
vpc_arn=example_aws_vpc["arn"])
example = aws.networkmanager.get_core_network_policy_document_output(core_network_configurations=[{
"asn_ranges": ["65022-65534"],
"edge_locations": [{
"location": "us-west-2",
"asn": "65500",
}],
}],
segments=[{
"name": "segment",
}],
segment_actions=[{
"action": "create-route",
"segment": "segment",
"destination_cidr_blocks": ["0.0.0.0/0"],
"destinations": [example_vpc_attachment.id],
}])
example_core_network_policy_attachment = aws.networkmanager.CoreNetworkPolicyAttachment("example",
core_network_id=example_core_network.id,
policy_document=example.json)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleGlobalNetwork, err := networkmanager.NewGlobalNetwork(ctx, "example", nil)
if err != nil {
return err
}
base, err := networkmanager.GetCoreNetworkPolicyDocument(ctx, &networkmanager.GetCoreNetworkPolicyDocumentArgs{
CoreNetworkConfigurations: []networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfiguration{
{
AsnRanges: []string{
"65022-65534",
},
EdgeLocations: []networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocation{
{
Location: "us-west-2",
Asn: pulumi.StringRef("65500"),
},
},
},
},
Segments: []networkmanager.GetCoreNetworkPolicyDocumentSegment{
{
Name: "segment",
},
},
}, nil);
if err != nil {
return err
}
exampleCoreNetwork, err := networkmanager.NewCoreNetwork(ctx, "example", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: exampleGlobalNetwork.ID(),
BasePolicyDocument: pulumi.String(base.Json),
CreateBasePolicy: pulumi.Bool(true),
})
if err != nil {
return err
}
var splat0 []interface{}
for _, val0 := range exampleAwsSubnet {
splat0 = append(splat0, val0.Arn)
}
exampleVpcAttachment, err := networkmanager.NewVpcAttachment(ctx, "example", &networkmanager.VpcAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
SubnetArns: toPulumiArray(splat0),
VpcArn: pulumi.Any(exampleAwsVpc.Arn),
})
if err != nil {
return err
}
example := networkmanager.GetCoreNetworkPolicyDocumentOutput(ctx, networkmanager.GetCoreNetworkPolicyDocumentOutputArgs{
CoreNetworkConfigurations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs{
AsnRanges: pulumi.StringArray{
pulumi.String("65022-65534"),
},
EdgeLocations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs{
Location: pulumi.String("us-west-2"),
Asn: pulumi.String("65500"),
},
},
},
},
Segments: networkmanager.GetCoreNetworkPolicyDocumentSegmentArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentArgs{
Name: pulumi.String("segment"),
},
},
SegmentActions: networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArgs{
Action: pulumi.String("create-route"),
Segment: pulumi.String("segment"),
DestinationCidrBlocks: pulumi.StringArray{
pulumi.String("0.0.0.0/0"),
},
Destinations: pulumi.StringArray{
exampleVpcAttachment.ID(),
},
},
},
}, nil);
_, err = networkmanager.NewCoreNetworkPolicyAttachment(ctx, "example", &networkmanager.CoreNetworkPolicyAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
PolicyDocument: pulumi.String(example.ApplyT(func(example networkmanager.GetCoreNetworkPolicyDocumentResult) (*string, error) {
return &example.Json, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
return nil
})
}
func toPulumiArray(arr []) pulumi.Array {
var pulumiArr pulumi.Array
for _, v := range arr {
pulumiArr = append(pulumiArr, pulumi.(v))
}
return pulumiArr
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleGlobalNetwork = new Aws.NetworkManager.GlobalNetwork("example");
var @base = Aws.NetworkManager.GetCoreNetworkPolicyDocument.Invoke(new()
{
CoreNetworkConfigurations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationInputArgs
{
AsnRanges = new[]
{
"65022-65534",
},
EdgeLocations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-west-2",
Asn = "65500",
},
},
},
},
Segments = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment",
},
},
});
var exampleCoreNetwork = new Aws.NetworkManager.CoreNetwork("example", new()
{
GlobalNetworkId = exampleGlobalNetwork.Id,
BasePolicyDocument = @base.Apply(@base => @base.Apply(getCoreNetworkPolicyDocumentResult => getCoreNetworkPolicyDocumentResult.Json)),
CreateBasePolicy = true,
});
var exampleVpcAttachment = new Aws.NetworkManager.VpcAttachment("example", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
SubnetArns = exampleAwsSubnet.Select(__item => __item.Arn).ToList(),
VpcArn = exampleAwsVpc.Arn,
});
var example = Aws.NetworkManager.GetCoreNetworkPolicyDocument.Invoke(new()
{
CoreNetworkConfigurations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationInputArgs
{
AsnRanges = new[]
{
"65022-65534",
},
EdgeLocations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-west-2",
Asn = "65500",
},
},
},
},
Segments = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment",
},
},
SegmentActions = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentActionInputArgs
{
Action = "create-route",
Segment = "segment",
DestinationCidrBlocks = new[]
{
"0.0.0.0/0",
},
Destinations = new[]
{
exampleVpcAttachment.Id,
},
},
},
});
var exampleCoreNetworkPolicyAttachment = new Aws.NetworkManager.CoreNetworkPolicyAttachment("example", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
PolicyDocument = example.Apply(getCoreNetworkPolicyDocumentResult => getCoreNetworkPolicyDocumentResult.Json),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.GlobalNetwork;
import com.pulumi.aws.networkmanager.NetworkmanagerFunctions;
import com.pulumi.aws.networkmanager.inputs.GetCoreNetworkPolicyDocumentArgs;
import com.pulumi.aws.networkmanager.CoreNetwork;
import com.pulumi.aws.networkmanager.CoreNetworkArgs;
import com.pulumi.aws.networkmanager.VpcAttachment;
import com.pulumi.aws.networkmanager.VpcAttachmentArgs;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachment;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachmentArgs;
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 exampleGlobalNetwork = new GlobalNetwork("exampleGlobalNetwork");
final var base = NetworkmanagerFunctions.getCoreNetworkPolicyDocument(GetCoreNetworkPolicyDocumentArgs.builder()
.coreNetworkConfigurations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs.builder()
.asnRanges("65022-65534")
.edgeLocations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-west-2")
.asn("65500")
.build())
.build())
.segments(GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment")
.build())
.build());
var exampleCoreNetwork = new CoreNetwork("exampleCoreNetwork", CoreNetworkArgs.builder()
.globalNetworkId(exampleGlobalNetwork.id())
.basePolicyDocument(base.json())
.createBasePolicy(true)
.build());
var exampleVpcAttachment = new VpcAttachment("exampleVpcAttachment", VpcAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.subnetArns(exampleAwsSubnet.stream().map(element -> element.arn()).collect(toList()))
.vpcArn(exampleAwsVpc.arn())
.build());
final var example = NetworkmanagerFunctions.getCoreNetworkPolicyDocument(GetCoreNetworkPolicyDocumentArgs.builder()
.coreNetworkConfigurations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs.builder()
.asnRanges("65022-65534")
.edgeLocations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-west-2")
.asn("65500")
.build())
.build())
.segments(GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment")
.build())
.segmentActions(GetCoreNetworkPolicyDocumentSegmentActionArgs.builder()
.action("create-route")
.segment("segment")
.destinationCidrBlocks("0.0.0.0/0")
.destinations(exampleVpcAttachment.id())
.build())
.build());
var exampleCoreNetworkPolicyAttachment = new CoreNetworkPolicyAttachment("exampleCoreNetworkPolicyAttachment", CoreNetworkPolicyAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.policyDocument(example.applyValue(_example -> _example.json()))
.build());
}
}
Coming soon!
Option 2 - create_base_policy only
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleGlobalNetwork = new aws.networkmanager.GlobalNetwork("example", {});
const exampleCoreNetwork = new aws.networkmanager.CoreNetwork("example", {
globalNetworkId: exampleGlobalNetwork.id,
createBasePolicy: true,
});
const exampleVpcAttachment = new aws.networkmanager.VpcAttachment("example", {
coreNetworkId: exampleCoreNetwork.id,
subnetArns: exampleAwsSubnet.map(__item => __item.arn),
vpcArn: exampleAwsVpc.arn,
});
const example = aws.networkmanager.getCoreNetworkPolicyDocumentOutput({
coreNetworkConfigurations: [{
asnRanges: ["65022-65534"],
edgeLocations: [{
location: "us-west-2",
}],
}],
segments: [{
name: "segment",
}],
segmentActions: [{
action: "create-route",
segment: "segment",
destinationCidrBlocks: ["0.0.0.0/0"],
destinations: [exampleVpcAttachment.id],
}],
});
const exampleCoreNetworkPolicyAttachment = new aws.networkmanager.CoreNetworkPolicyAttachment("example", {
coreNetworkId: exampleCoreNetwork.id,
policyDocument: example.apply(example => example.json),
});
import pulumi
import pulumi_aws as aws
example_global_network = aws.networkmanager.GlobalNetwork("example")
example_core_network = aws.networkmanager.CoreNetwork("example",
global_network_id=example_global_network.id,
create_base_policy=True)
example_vpc_attachment = aws.networkmanager.VpcAttachment("example",
core_network_id=example_core_network.id,
subnet_arns=[__item["arn"] for __item in example_aws_subnet],
vpc_arn=example_aws_vpc["arn"])
example = aws.networkmanager.get_core_network_policy_document_output(core_network_configurations=[{
"asn_ranges": ["65022-65534"],
"edge_locations": [{
"location": "us-west-2",
}],
}],
segments=[{
"name": "segment",
}],
segment_actions=[{
"action": "create-route",
"segment": "segment",
"destination_cidr_blocks": ["0.0.0.0/0"],
"destinations": [example_vpc_attachment.id],
}])
example_core_network_policy_attachment = aws.networkmanager.CoreNetworkPolicyAttachment("example",
core_network_id=example_core_network.id,
policy_document=example.json)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleGlobalNetwork, err := networkmanager.NewGlobalNetwork(ctx, "example", nil)
if err != nil {
return err
}
exampleCoreNetwork, err := networkmanager.NewCoreNetwork(ctx, "example", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: exampleGlobalNetwork.ID(),
CreateBasePolicy: pulumi.Bool(true),
})
if err != nil {
return err
}
var splat0 []interface{}
for _, val0 := range exampleAwsSubnet {
splat0 = append(splat0, val0.Arn)
}
exampleVpcAttachment, err := networkmanager.NewVpcAttachment(ctx, "example", &networkmanager.VpcAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
SubnetArns: toPulumiArray(splat0),
VpcArn: pulumi.Any(exampleAwsVpc.Arn),
})
if err != nil {
return err
}
example := networkmanager.GetCoreNetworkPolicyDocumentOutput(ctx, networkmanager.GetCoreNetworkPolicyDocumentOutputArgs{
CoreNetworkConfigurations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs{
AsnRanges: pulumi.StringArray{
pulumi.String("65022-65534"),
},
EdgeLocations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs{
Location: pulumi.String("us-west-2"),
},
},
},
},
Segments: networkmanager.GetCoreNetworkPolicyDocumentSegmentArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentArgs{
Name: pulumi.String("segment"),
},
},
SegmentActions: networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArgs{
Action: pulumi.String("create-route"),
Segment: pulumi.String("segment"),
DestinationCidrBlocks: pulumi.StringArray{
pulumi.String("0.0.0.0/0"),
},
Destinations: pulumi.StringArray{
exampleVpcAttachment.ID(),
},
},
},
}, nil);
_, err = networkmanager.NewCoreNetworkPolicyAttachment(ctx, "example", &networkmanager.CoreNetworkPolicyAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
PolicyDocument: pulumi.String(example.ApplyT(func(example networkmanager.GetCoreNetworkPolicyDocumentResult) (*string, error) {
return &example.Json, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
return nil
})
}
func toPulumiArray(arr []) pulumi.Array {
var pulumiArr pulumi.Array
for _, v := range arr {
pulumiArr = append(pulumiArr, pulumi.(v))
}
return pulumiArr
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleGlobalNetwork = new Aws.NetworkManager.GlobalNetwork("example");
var exampleCoreNetwork = new Aws.NetworkManager.CoreNetwork("example", new()
{
GlobalNetworkId = exampleGlobalNetwork.Id,
CreateBasePolicy = true,
});
var exampleVpcAttachment = new Aws.NetworkManager.VpcAttachment("example", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
SubnetArns = exampleAwsSubnet.Select(__item => __item.Arn).ToList(),
VpcArn = exampleAwsVpc.Arn,
});
var example = Aws.NetworkManager.GetCoreNetworkPolicyDocument.Invoke(new()
{
CoreNetworkConfigurations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationInputArgs
{
AsnRanges = new[]
{
"65022-65534",
},
EdgeLocations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-west-2",
},
},
},
},
Segments = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment",
},
},
SegmentActions = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentActionInputArgs
{
Action = "create-route",
Segment = "segment",
DestinationCidrBlocks = new[]
{
"0.0.0.0/0",
},
Destinations = new[]
{
exampleVpcAttachment.Id,
},
},
},
});
var exampleCoreNetworkPolicyAttachment = new Aws.NetworkManager.CoreNetworkPolicyAttachment("example", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
PolicyDocument = example.Apply(getCoreNetworkPolicyDocumentResult => getCoreNetworkPolicyDocumentResult.Json),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.GlobalNetwork;
import com.pulumi.aws.networkmanager.CoreNetwork;
import com.pulumi.aws.networkmanager.CoreNetworkArgs;
import com.pulumi.aws.networkmanager.VpcAttachment;
import com.pulumi.aws.networkmanager.VpcAttachmentArgs;
import com.pulumi.aws.networkmanager.NetworkmanagerFunctions;
import com.pulumi.aws.networkmanager.inputs.GetCoreNetworkPolicyDocumentArgs;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachment;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachmentArgs;
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 exampleGlobalNetwork = new GlobalNetwork("exampleGlobalNetwork");
var exampleCoreNetwork = new CoreNetwork("exampleCoreNetwork", CoreNetworkArgs.builder()
.globalNetworkId(exampleGlobalNetwork.id())
.createBasePolicy(true)
.build());
var exampleVpcAttachment = new VpcAttachment("exampleVpcAttachment", VpcAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.subnetArns(exampleAwsSubnet.stream().map(element -> element.arn()).collect(toList()))
.vpcArn(exampleAwsVpc.arn())
.build());
final var example = NetworkmanagerFunctions.getCoreNetworkPolicyDocument(GetCoreNetworkPolicyDocumentArgs.builder()
.coreNetworkConfigurations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs.builder()
.asnRanges("65022-65534")
.edgeLocations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-west-2")
.build())
.build())
.segments(GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment")
.build())
.segmentActions(GetCoreNetworkPolicyDocumentSegmentActionArgs.builder()
.action("create-route")
.segment("segment")
.destinationCidrBlocks("0.0.0.0/0")
.destinations(exampleVpcAttachment.id())
.build())
.build());
var exampleCoreNetworkPolicyAttachment = new CoreNetworkPolicyAttachment("exampleCoreNetworkPolicyAttachment", CoreNetworkPolicyAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.policyDocument(example.applyValue(_example -> _example.json()))
.build());
}
}
Coming soon!
With VPC Attachment (Multi-Region)
The example below illustrates the scenario where your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Set the create_base_policy argument of the aws.networkmanager.CoreNetwork resource to true if your core network does not currently have any LIVE policies (e.g. this is the first pulumi up with the core network resource), since a LIVE policy is required before VPCs can be attached to the core network. Otherwise, if your core network already has a LIVE policy, you may exclude the create_base_policy argument. For multi-region in a core network that does not yet have a LIVE policy, there are 2 options:
- Option 1: Use the
base_policy_documentargument that allows the most customizations to a base policy. Use this to customize theedge_locationsasn. In the example below,us-west-2,us-east-1and specific ASNs are used in the base policy. - Option 2: Pass a list of regions to the
aws.networkmanager.CoreNetworkbase_policy_regionsargument. In the example below,us-west-2andus-east-1are specified in the base policy.
Option 1 - using base_policy_document
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleGlobalNetwork = new aws.networkmanager.GlobalNetwork("example", {});
const base = aws.networkmanager.getCoreNetworkPolicyDocument({
coreNetworkConfigurations: [{
asnRanges: ["65022-65534"],
edgeLocations: [
{
location: "us-west-2",
asn: "65500",
},
{
location: "us-east-1",
asn: "65501",
},
],
}],
segments: [{
name: "segment",
}],
});
const exampleCoreNetwork = new aws.networkmanager.CoreNetwork("example", {
globalNetworkId: exampleGlobalNetwork.id,
basePolicyDocument: base.then(base => base.json),
createBasePolicy: true,
});
const exampleUsWest2 = new aws.networkmanager.VpcAttachment("example_us_west_2", {
coreNetworkId: exampleCoreNetwork.id,
subnetArns: exampleUsWest2AwsSubnet.map(__item => __item.arn),
vpcArn: exampleUsWest2AwsVpc.arn,
});
const exampleUsEast1 = new aws.networkmanager.VpcAttachment("example_us_east_1", {
coreNetworkId: exampleCoreNetwork.id,
subnetArns: exampleUsEast1AwsSubnet.map(__item => __item.arn),
vpcArn: exampleUsEast1AwsVpc.arn,
});
const example = aws.networkmanager.getCoreNetworkPolicyDocumentOutput({
coreNetworkConfigurations: [{
asnRanges: ["65022-65534"],
edgeLocations: [
{
location: "us-west-2",
asn: "65500",
},
{
location: "us-east-1",
asn: "65501",
},
],
}],
segments: [
{
name: "segment",
},
{
name: "segment2",
},
],
segmentActions: [
{
action: "create-route",
segment: "segment",
destinationCidrBlocks: ["10.0.0.0/16"],
destinations: [exampleUsWest2.id],
},
{
action: "create-route",
segment: "segment",
destinationCidrBlocks: ["10.1.0.0/16"],
destinations: [exampleUsEast1.id],
},
],
});
const exampleCoreNetworkPolicyAttachment = new aws.networkmanager.CoreNetworkPolicyAttachment("example", {
coreNetworkId: exampleCoreNetwork.id,
policyDocument: example.apply(example => example.json),
});
import pulumi
import pulumi_aws as aws
example_global_network = aws.networkmanager.GlobalNetwork("example")
base = aws.networkmanager.get_core_network_policy_document(core_network_configurations=[{
"asn_ranges": ["65022-65534"],
"edge_locations": [
{
"location": "us-west-2",
"asn": "65500",
},
{
"location": "us-east-1",
"asn": "65501",
},
],
}],
segments=[{
"name": "segment",
}])
example_core_network = aws.networkmanager.CoreNetwork("example",
global_network_id=example_global_network.id,
base_policy_document=base.json,
create_base_policy=True)
example_us_west2 = aws.networkmanager.VpcAttachment("example_us_west_2",
core_network_id=example_core_network.id,
subnet_arns=[__item["arn"] for __item in example_us_west2_aws_subnet],
vpc_arn=example_us_west2_aws_vpc["arn"])
example_us_east1 = aws.networkmanager.VpcAttachment("example_us_east_1",
core_network_id=example_core_network.id,
subnet_arns=[__item["arn"] for __item in example_us_east1_aws_subnet],
vpc_arn=example_us_east1_aws_vpc["arn"])
example = aws.networkmanager.get_core_network_policy_document_output(core_network_configurations=[{
"asn_ranges": ["65022-65534"],
"edge_locations": [
{
"location": "us-west-2",
"asn": "65500",
},
{
"location": "us-east-1",
"asn": "65501",
},
],
}],
segments=[
{
"name": "segment",
},
{
"name": "segment2",
},
],
segment_actions=[
{
"action": "create-route",
"segment": "segment",
"destination_cidr_blocks": ["10.0.0.0/16"],
"destinations": [example_us_west2.id],
},
{
"action": "create-route",
"segment": "segment",
"destination_cidr_blocks": ["10.1.0.0/16"],
"destinations": [example_us_east1.id],
},
])
example_core_network_policy_attachment = aws.networkmanager.CoreNetworkPolicyAttachment("example",
core_network_id=example_core_network.id,
policy_document=example.json)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleGlobalNetwork, err := networkmanager.NewGlobalNetwork(ctx, "example", nil)
if err != nil {
return err
}
base, err := networkmanager.GetCoreNetworkPolicyDocument(ctx, &networkmanager.GetCoreNetworkPolicyDocumentArgs{
CoreNetworkConfigurations: []networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfiguration{
{
AsnRanges: []string{
"65022-65534",
},
EdgeLocations: []networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocation{
{
Location: "us-west-2",
Asn: pulumi.StringRef("65500"),
},
{
Location: "us-east-1",
Asn: pulumi.StringRef("65501"),
},
},
},
},
Segments: []networkmanager.GetCoreNetworkPolicyDocumentSegment{
{
Name: "segment",
},
},
}, nil);
if err != nil {
return err
}
exampleCoreNetwork, err := networkmanager.NewCoreNetwork(ctx, "example", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: exampleGlobalNetwork.ID(),
BasePolicyDocument: pulumi.String(base.Json),
CreateBasePolicy: pulumi.Bool(true),
})
if err != nil {
return err
}
var splat0 []interface{}
for _, val0 := range exampleUsWest2AwsSubnet {
splat0 = append(splat0, val0.Arn)
}
exampleUsWest2, err := networkmanager.NewVpcAttachment(ctx, "example_us_west_2", &networkmanager.VpcAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
SubnetArns: toPulumiArray(splat0),
VpcArn: pulumi.Any(exampleUsWest2AwsVpc.Arn),
})
if err != nil {
return err
}
var splat1 []interface{}
for _, val0 := range exampleUsEast1AwsSubnet {
splat1 = append(splat1, val0.Arn)
}
exampleUsEast1, err := networkmanager.NewVpcAttachment(ctx, "example_us_east_1", &networkmanager.VpcAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
SubnetArns: toPulumiArray(splat1),
VpcArn: pulumi.Any(exampleUsEast1AwsVpc.Arn),
})
if err != nil {
return err
}
example := networkmanager.GetCoreNetworkPolicyDocumentOutput(ctx, networkmanager.GetCoreNetworkPolicyDocumentOutputArgs{
CoreNetworkConfigurations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs{
AsnRanges: pulumi.StringArray{
pulumi.String("65022-65534"),
},
EdgeLocations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs{
Location: pulumi.String("us-west-2"),
Asn: pulumi.String("65500"),
},
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs{
Location: pulumi.String("us-east-1"),
Asn: pulumi.String("65501"),
},
},
},
},
Segments: networkmanager.GetCoreNetworkPolicyDocumentSegmentArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentArgs{
Name: pulumi.String("segment"),
},
&networkmanager.GetCoreNetworkPolicyDocumentSegmentArgs{
Name: pulumi.String("segment2"),
},
},
SegmentActions: networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArgs{
Action: pulumi.String("create-route"),
Segment: pulumi.String("segment"),
DestinationCidrBlocks: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Destinations: pulumi.StringArray{
exampleUsWest2.ID(),
},
},
&networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArgs{
Action: pulumi.String("create-route"),
Segment: pulumi.String("segment"),
DestinationCidrBlocks: pulumi.StringArray{
pulumi.String("10.1.0.0/16"),
},
Destinations: pulumi.StringArray{
exampleUsEast1.ID(),
},
},
},
}, nil);
_, err = networkmanager.NewCoreNetworkPolicyAttachment(ctx, "example", &networkmanager.CoreNetworkPolicyAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
PolicyDocument: pulumi.String(example.ApplyT(func(example networkmanager.GetCoreNetworkPolicyDocumentResult) (*string, error) {
return &example.Json, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
return nil
})
}
func toPulumiArray(arr []) pulumi.Array {
var pulumiArr pulumi.Array
for _, v := range arr {
pulumiArr = append(pulumiArr, pulumi.(v))
}
return pulumiArr
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleGlobalNetwork = new Aws.NetworkManager.GlobalNetwork("example");
var @base = Aws.NetworkManager.GetCoreNetworkPolicyDocument.Invoke(new()
{
CoreNetworkConfigurations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationInputArgs
{
AsnRanges = new[]
{
"65022-65534",
},
EdgeLocations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-west-2",
Asn = "65500",
},
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-east-1",
Asn = "65501",
},
},
},
},
Segments = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment",
},
},
});
var exampleCoreNetwork = new Aws.NetworkManager.CoreNetwork("example", new()
{
GlobalNetworkId = exampleGlobalNetwork.Id,
BasePolicyDocument = @base.Apply(@base => @base.Apply(getCoreNetworkPolicyDocumentResult => getCoreNetworkPolicyDocumentResult.Json)),
CreateBasePolicy = true,
});
var exampleUsWest2 = new Aws.NetworkManager.VpcAttachment("example_us_west_2", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
SubnetArns = exampleUsWest2AwsSubnet.Select(__item => __item.Arn).ToList(),
VpcArn = exampleUsWest2AwsVpc.Arn,
});
var exampleUsEast1 = new Aws.NetworkManager.VpcAttachment("example_us_east_1", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
SubnetArns = exampleUsEast1AwsSubnet.Select(__item => __item.Arn).ToList(),
VpcArn = exampleUsEast1AwsVpc.Arn,
});
var example = Aws.NetworkManager.GetCoreNetworkPolicyDocument.Invoke(new()
{
CoreNetworkConfigurations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationInputArgs
{
AsnRanges = new[]
{
"65022-65534",
},
EdgeLocations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-west-2",
Asn = "65500",
},
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-east-1",
Asn = "65501",
},
},
},
},
Segments = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment",
},
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment2",
},
},
SegmentActions = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentActionInputArgs
{
Action = "create-route",
Segment = "segment",
DestinationCidrBlocks = new[]
{
"10.0.0.0/16",
},
Destinations = new[]
{
exampleUsWest2.Id,
},
},
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentActionInputArgs
{
Action = "create-route",
Segment = "segment",
DestinationCidrBlocks = new[]
{
"10.1.0.0/16",
},
Destinations = new[]
{
exampleUsEast1.Id,
},
},
},
});
var exampleCoreNetworkPolicyAttachment = new Aws.NetworkManager.CoreNetworkPolicyAttachment("example", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
PolicyDocument = example.Apply(getCoreNetworkPolicyDocumentResult => getCoreNetworkPolicyDocumentResult.Json),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.GlobalNetwork;
import com.pulumi.aws.networkmanager.NetworkmanagerFunctions;
import com.pulumi.aws.networkmanager.inputs.GetCoreNetworkPolicyDocumentArgs;
import com.pulumi.aws.networkmanager.CoreNetwork;
import com.pulumi.aws.networkmanager.CoreNetworkArgs;
import com.pulumi.aws.networkmanager.VpcAttachment;
import com.pulumi.aws.networkmanager.VpcAttachmentArgs;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachment;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachmentArgs;
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 exampleGlobalNetwork = new GlobalNetwork("exampleGlobalNetwork");
final var base = NetworkmanagerFunctions.getCoreNetworkPolicyDocument(GetCoreNetworkPolicyDocumentArgs.builder()
.coreNetworkConfigurations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs.builder()
.asnRanges("65022-65534")
.edgeLocations(
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-west-2")
.asn("65500")
.build(),
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-east-1")
.asn("65501")
.build())
.build())
.segments(GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment")
.build())
.build());
var exampleCoreNetwork = new CoreNetwork("exampleCoreNetwork", CoreNetworkArgs.builder()
.globalNetworkId(exampleGlobalNetwork.id())
.basePolicyDocument(base.json())
.createBasePolicy(true)
.build());
var exampleUsWest2 = new VpcAttachment("exampleUsWest2", VpcAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.subnetArns(exampleUsWest2AwsSubnet.stream().map(element -> element.arn()).collect(toList()))
.vpcArn(exampleUsWest2AwsVpc.arn())
.build());
var exampleUsEast1 = new VpcAttachment("exampleUsEast1", VpcAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.subnetArns(exampleUsEast1AwsSubnet.stream().map(element -> element.arn()).collect(toList()))
.vpcArn(exampleUsEast1AwsVpc.arn())
.build());
final var example = NetworkmanagerFunctions.getCoreNetworkPolicyDocument(GetCoreNetworkPolicyDocumentArgs.builder()
.coreNetworkConfigurations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs.builder()
.asnRanges("65022-65534")
.edgeLocations(
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-west-2")
.asn("65500")
.build(),
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-east-1")
.asn("65501")
.build())
.build())
.segments(
GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment")
.build(),
GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment2")
.build())
.segmentActions(
GetCoreNetworkPolicyDocumentSegmentActionArgs.builder()
.action("create-route")
.segment("segment")
.destinationCidrBlocks("10.0.0.0/16")
.destinations(exampleUsWest2.id())
.build(),
GetCoreNetworkPolicyDocumentSegmentActionArgs.builder()
.action("create-route")
.segment("segment")
.destinationCidrBlocks("10.1.0.0/16")
.destinations(exampleUsEast1.id())
.build())
.build());
var exampleCoreNetworkPolicyAttachment = new CoreNetworkPolicyAttachment("exampleCoreNetworkPolicyAttachment", CoreNetworkPolicyAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.policyDocument(example.applyValue(_example -> _example.json()))
.build());
}
}
Coming soon!
Option 2 - using base_policy_regions
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleGlobalNetwork = new aws.networkmanager.GlobalNetwork("example", {});
const exampleCoreNetwork = new aws.networkmanager.CoreNetwork("example", {
globalNetworkId: exampleGlobalNetwork.id,
basePolicyRegions: [
"us-west-2",
"us-east-1",
],
createBasePolicy: true,
});
const exampleUsWest2 = new aws.networkmanager.VpcAttachment("example_us_west_2", {
coreNetworkId: exampleCoreNetwork.id,
subnetArns: exampleUsWest2AwsSubnet.map(__item => __item.arn),
vpcArn: exampleUsWest2AwsVpc.arn,
});
const exampleUsEast1 = new aws.networkmanager.VpcAttachment("example_us_east_1", {
coreNetworkId: exampleCoreNetwork.id,
subnetArns: exampleUsEast1AwsSubnet.map(__item => __item.arn),
vpcArn: exampleUsEast1AwsVpc.arn,
});
const example = aws.networkmanager.getCoreNetworkPolicyDocumentOutput({
coreNetworkConfigurations: [{
asnRanges: ["65022-65534"],
edgeLocations: [
{
location: "us-west-2",
},
{
location: "us-east-1",
},
],
}],
segments: [
{
name: "segment",
},
{
name: "segment2",
},
],
segmentActions: [
{
action: "create-route",
segment: "segment",
destinationCidrBlocks: ["10.0.0.0/16"],
destinations: [exampleUsWest2.id],
},
{
action: "create-route",
segment: "segment",
destinationCidrBlocks: ["10.1.0.0/16"],
destinations: [exampleUsEast1.id],
},
],
});
const exampleCoreNetworkPolicyAttachment = new aws.networkmanager.CoreNetworkPolicyAttachment("example", {
coreNetworkId: exampleCoreNetwork.id,
policyDocument: example.apply(example => example.json),
});
import pulumi
import pulumi_aws as aws
example_global_network = aws.networkmanager.GlobalNetwork("example")
example_core_network = aws.networkmanager.CoreNetwork("example",
global_network_id=example_global_network.id,
base_policy_regions=[
"us-west-2",
"us-east-1",
],
create_base_policy=True)
example_us_west2 = aws.networkmanager.VpcAttachment("example_us_west_2",
core_network_id=example_core_network.id,
subnet_arns=[__item["arn"] for __item in example_us_west2_aws_subnet],
vpc_arn=example_us_west2_aws_vpc["arn"])
example_us_east1 = aws.networkmanager.VpcAttachment("example_us_east_1",
core_network_id=example_core_network.id,
subnet_arns=[__item["arn"] for __item in example_us_east1_aws_subnet],
vpc_arn=example_us_east1_aws_vpc["arn"])
example = aws.networkmanager.get_core_network_policy_document_output(core_network_configurations=[{
"asn_ranges": ["65022-65534"],
"edge_locations": [
{
"location": "us-west-2",
},
{
"location": "us-east-1",
},
],
}],
segments=[
{
"name": "segment",
},
{
"name": "segment2",
},
],
segment_actions=[
{
"action": "create-route",
"segment": "segment",
"destination_cidr_blocks": ["10.0.0.0/16"],
"destinations": [example_us_west2.id],
},
{
"action": "create-route",
"segment": "segment",
"destination_cidr_blocks": ["10.1.0.0/16"],
"destinations": [example_us_east1.id],
},
])
example_core_network_policy_attachment = aws.networkmanager.CoreNetworkPolicyAttachment("example",
core_network_id=example_core_network.id,
policy_document=example.json)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleGlobalNetwork, err := networkmanager.NewGlobalNetwork(ctx, "example", nil)
if err != nil {
return err
}
exampleCoreNetwork, err := networkmanager.NewCoreNetwork(ctx, "example", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: exampleGlobalNetwork.ID(),
BasePolicyRegions: pulumi.StringArray{
pulumi.String("us-west-2"),
pulumi.String("us-east-1"),
},
CreateBasePolicy: pulumi.Bool(true),
})
if err != nil {
return err
}
var splat0 []interface{}
for _, val0 := range exampleUsWest2AwsSubnet {
splat0 = append(splat0, val0.Arn)
}
exampleUsWest2, err := networkmanager.NewVpcAttachment(ctx, "example_us_west_2", &networkmanager.VpcAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
SubnetArns: toPulumiArray(splat0),
VpcArn: pulumi.Any(exampleUsWest2AwsVpc.Arn),
})
if err != nil {
return err
}
var splat1 []interface{}
for _, val0 := range exampleUsEast1AwsSubnet {
splat1 = append(splat1, val0.Arn)
}
exampleUsEast1, err := networkmanager.NewVpcAttachment(ctx, "example_us_east_1", &networkmanager.VpcAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
SubnetArns: toPulumiArray(splat1),
VpcArn: pulumi.Any(exampleUsEast1AwsVpc.Arn),
})
if err != nil {
return err
}
example := networkmanager.GetCoreNetworkPolicyDocumentOutput(ctx, networkmanager.GetCoreNetworkPolicyDocumentOutputArgs{
CoreNetworkConfigurations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs{
AsnRanges: pulumi.StringArray{
pulumi.String("65022-65534"),
},
EdgeLocations: networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArray{
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs{
Location: pulumi.String("us-west-2"),
},
&networkmanager.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs{
Location: pulumi.String("us-east-1"),
},
},
},
},
Segments: networkmanager.GetCoreNetworkPolicyDocumentSegmentArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentArgs{
Name: pulumi.String("segment"),
},
&networkmanager.GetCoreNetworkPolicyDocumentSegmentArgs{
Name: pulumi.String("segment2"),
},
},
SegmentActions: networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArray{
&networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArgs{
Action: pulumi.String("create-route"),
Segment: pulumi.String("segment"),
DestinationCidrBlocks: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Destinations: pulumi.StringArray{
exampleUsWest2.ID(),
},
},
&networkmanager.GetCoreNetworkPolicyDocumentSegmentActionArgs{
Action: pulumi.String("create-route"),
Segment: pulumi.String("segment"),
DestinationCidrBlocks: pulumi.StringArray{
pulumi.String("10.1.0.0/16"),
},
Destinations: pulumi.StringArray{
exampleUsEast1.ID(),
},
},
},
}, nil);
_, err = networkmanager.NewCoreNetworkPolicyAttachment(ctx, "example", &networkmanager.CoreNetworkPolicyAttachmentArgs{
CoreNetworkId: exampleCoreNetwork.ID(),
PolicyDocument: pulumi.String(example.ApplyT(func(example networkmanager.GetCoreNetworkPolicyDocumentResult) (*string, error) {
return &example.Json, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
return nil
})
}
func toPulumiArray(arr []) pulumi.Array {
var pulumiArr pulumi.Array
for _, v := range arr {
pulumiArr = append(pulumiArr, pulumi.(v))
}
return pulumiArr
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleGlobalNetwork = new Aws.NetworkManager.GlobalNetwork("example");
var exampleCoreNetwork = new Aws.NetworkManager.CoreNetwork("example", new()
{
GlobalNetworkId = exampleGlobalNetwork.Id,
BasePolicyRegions = new[]
{
"us-west-2",
"us-east-1",
},
CreateBasePolicy = true,
});
var exampleUsWest2 = new Aws.NetworkManager.VpcAttachment("example_us_west_2", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
SubnetArns = exampleUsWest2AwsSubnet.Select(__item => __item.Arn).ToList(),
VpcArn = exampleUsWest2AwsVpc.Arn,
});
var exampleUsEast1 = new Aws.NetworkManager.VpcAttachment("example_us_east_1", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
SubnetArns = exampleUsEast1AwsSubnet.Select(__item => __item.Arn).ToList(),
VpcArn = exampleUsEast1AwsVpc.Arn,
});
var example = Aws.NetworkManager.GetCoreNetworkPolicyDocument.Invoke(new()
{
CoreNetworkConfigurations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationInputArgs
{
AsnRanges = new[]
{
"65022-65534",
},
EdgeLocations = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-west-2",
},
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationInputArgs
{
Location = "us-east-1",
},
},
},
},
Segments = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment",
},
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentInputArgs
{
Name = "segment2",
},
},
SegmentActions = new[]
{
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentActionInputArgs
{
Action = "create-route",
Segment = "segment",
DestinationCidrBlocks = new[]
{
"10.0.0.0/16",
},
Destinations = new[]
{
exampleUsWest2.Id,
},
},
new Aws.NetworkManager.Inputs.GetCoreNetworkPolicyDocumentSegmentActionInputArgs
{
Action = "create-route",
Segment = "segment",
DestinationCidrBlocks = new[]
{
"10.1.0.0/16",
},
Destinations = new[]
{
exampleUsEast1.Id,
},
},
},
});
var exampleCoreNetworkPolicyAttachment = new Aws.NetworkManager.CoreNetworkPolicyAttachment("example", new()
{
CoreNetworkId = exampleCoreNetwork.Id,
PolicyDocument = example.Apply(getCoreNetworkPolicyDocumentResult => getCoreNetworkPolicyDocumentResult.Json),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.GlobalNetwork;
import com.pulumi.aws.networkmanager.CoreNetwork;
import com.pulumi.aws.networkmanager.CoreNetworkArgs;
import com.pulumi.aws.networkmanager.VpcAttachment;
import com.pulumi.aws.networkmanager.VpcAttachmentArgs;
import com.pulumi.aws.networkmanager.NetworkmanagerFunctions;
import com.pulumi.aws.networkmanager.inputs.GetCoreNetworkPolicyDocumentArgs;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachment;
import com.pulumi.aws.networkmanager.CoreNetworkPolicyAttachmentArgs;
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 exampleGlobalNetwork = new GlobalNetwork("exampleGlobalNetwork");
var exampleCoreNetwork = new CoreNetwork("exampleCoreNetwork", CoreNetworkArgs.builder()
.globalNetworkId(exampleGlobalNetwork.id())
.basePolicyRegions(
"us-west-2",
"us-east-1")
.createBasePolicy(true)
.build());
var exampleUsWest2 = new VpcAttachment("exampleUsWest2", VpcAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.subnetArns(exampleUsWest2AwsSubnet.stream().map(element -> element.arn()).collect(toList()))
.vpcArn(exampleUsWest2AwsVpc.arn())
.build());
var exampleUsEast1 = new VpcAttachment("exampleUsEast1", VpcAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.subnetArns(exampleUsEast1AwsSubnet.stream().map(element -> element.arn()).collect(toList()))
.vpcArn(exampleUsEast1AwsVpc.arn())
.build());
final var example = NetworkmanagerFunctions.getCoreNetworkPolicyDocument(GetCoreNetworkPolicyDocumentArgs.builder()
.coreNetworkConfigurations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs.builder()
.asnRanges("65022-65534")
.edgeLocations(
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-west-2")
.build(),
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.location("us-east-1")
.build())
.build())
.segments(
GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment")
.build(),
GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.name("segment2")
.build())
.segmentActions(
GetCoreNetworkPolicyDocumentSegmentActionArgs.builder()
.action("create-route")
.segment("segment")
.destinationCidrBlocks("10.0.0.0/16")
.destinations(exampleUsWest2.id())
.build(),
GetCoreNetworkPolicyDocumentSegmentActionArgs.builder()
.action("create-route")
.segment("segment")
.destinationCidrBlocks("10.1.0.0/16")
.destinations(exampleUsEast1.id())
.build())
.build());
var exampleCoreNetworkPolicyAttachment = new CoreNetworkPolicyAttachment("exampleCoreNetworkPolicyAttachment", CoreNetworkPolicyAttachmentArgs.builder()
.coreNetworkId(exampleCoreNetwork.id())
.policyDocument(example.applyValue(_example -> _example.json()))
.build());
}
}
Coming soon!
Create CoreNetwork Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CoreNetwork(name: string, args: CoreNetworkArgs, opts?: CustomResourceOptions);@overload
def CoreNetwork(resource_name: str,
args: CoreNetworkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CoreNetwork(resource_name: str,
opts: Optional[ResourceOptions] = None,
global_network_id: Optional[str] = None,
base_policy_document: Optional[str] = None,
base_policy_region: Optional[str] = None,
base_policy_regions: Optional[Sequence[str]] = None,
create_base_policy: Optional[bool] = None,
description: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewCoreNetwork(ctx *Context, name string, args CoreNetworkArgs, opts ...ResourceOption) (*CoreNetwork, error)public CoreNetwork(string name, CoreNetworkArgs args, CustomResourceOptions? opts = null)
public CoreNetwork(String name, CoreNetworkArgs args)
public CoreNetwork(String name, CoreNetworkArgs args, CustomResourceOptions options)
type: aws:networkmanager:CoreNetwork
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 CoreNetworkArgs
- 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 CoreNetworkArgs
- 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 CoreNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CoreNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CoreNetworkArgs
- 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 coreNetworkResource = new Aws.NetworkManager.CoreNetwork("coreNetworkResource", new()
{
GlobalNetworkId = "string",
BasePolicyDocument = "string",
BasePolicyRegions = new[]
{
"string",
},
CreateBasePolicy = false,
Description = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := networkmanager.NewCoreNetwork(ctx, "coreNetworkResource", &networkmanager.CoreNetworkArgs{
GlobalNetworkId: pulumi.String("string"),
BasePolicyDocument: pulumi.String("string"),
BasePolicyRegions: pulumi.StringArray{
pulumi.String("string"),
},
CreateBasePolicy: pulumi.Bool(false),
Description: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var coreNetworkResource = new CoreNetwork("coreNetworkResource", CoreNetworkArgs.builder()
.globalNetworkId("string")
.basePolicyDocument("string")
.basePolicyRegions("string")
.createBasePolicy(false)
.description("string")
.tags(Map.of("string", "string"))
.build());
core_network_resource = aws.networkmanager.CoreNetwork("coreNetworkResource",
global_network_id="string",
base_policy_document="string",
base_policy_regions=["string"],
create_base_policy=False,
description="string",
tags={
"string": "string",
})
const coreNetworkResource = new aws.networkmanager.CoreNetwork("coreNetworkResource", {
globalNetworkId: "string",
basePolicyDocument: "string",
basePolicyRegions: ["string"],
createBasePolicy: false,
description: "string",
tags: {
string: "string",
},
});
type: aws:networkmanager:CoreNetwork
properties:
basePolicyDocument: string
basePolicyRegions:
- string
createBasePolicy: false
description: string
globalNetworkId: string
tags:
string: string
CoreNetwork 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 CoreNetwork resource accepts the following input properties:
- Global
Network stringId - The ID of the global network that a core network will be a part of.
- Base
Policy stringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- Base
Policy stringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Base
Policy List<string>Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Create
Base boolPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - Description string
- Description of the Core Network.
- Dictionary<string, string>
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Global
Network stringId - The ID of the global network that a core network will be a part of.
- Base
Policy stringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- Base
Policy stringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Base
Policy []stringRegions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Create
Base boolPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - Description string
- Description of the Core Network.
- map[string]string
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- global
Network StringId - The ID of the global network that a core network will be a part of.
- base
Policy StringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base
Policy StringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base
Policy List<String>Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create
Base BooleanPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - description String
- Description of the Core Network.
- Map<String,String>
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- global
Network stringId - The ID of the global network that a core network will be a part of.
- base
Policy stringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base
Policy stringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base
Policy string[]Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create
Base booleanPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - description string
- Description of the Core Network.
- {[key: string]: string}
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- global_
network_ strid - The ID of the global network that a core network will be a part of.
- base_
policy_ strdocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base_
policy_ strregion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base_
policy_ Sequence[str]regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create_
base_ boolpolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - description str
- Description of the Core Network.
- Mapping[str, str]
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- global
Network StringId - The ID of the global network that a core network will be a part of.
- base
Policy StringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base
Policy StringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base
Policy List<String>Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create
Base BooleanPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - description String
- Description of the Core Network.
- Map<String>
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the CoreNetwork resource produces the following output properties:
- Arn string
- Core Network Amazon Resource Name (ARN).
- Created
At string - Timestamp when a core network was created.
- Edges
List<Core
Network Edge> - One or more blocks detailing the edges within a core network. Detailed below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Segments
List<Core
Network Segment> - One or more blocks detailing the segments within a core network. Detailed below.
- State string
- Current state of a core network.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- Arn string
- Core Network Amazon Resource Name (ARN).
- Created
At string - Timestamp when a core network was created.
- Edges
[]Core
Network Edge - One or more blocks detailing the edges within a core network. Detailed below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Segments
[]Core
Network Segment - One or more blocks detailing the segments within a core network. Detailed below.
- State string
- Current state of a core network.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- Core Network Amazon Resource Name (ARN).
- created
At String - Timestamp when a core network was created.
- edges
List<Core
Network Edge> - One or more blocks detailing the edges within a core network. Detailed below.
- id String
- The provider-assigned unique ID for this managed resource.
- segments
List<Core
Network Segment> - One or more blocks detailing the segments within a core network. Detailed below.
- state String
- Current state of a core network.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn string
- Core Network Amazon Resource Name (ARN).
- created
At string - Timestamp when a core network was created.
- edges
Core
Network Edge[] - One or more blocks detailing the edges within a core network. Detailed below.
- id string
- The provider-assigned unique ID for this managed resource.
- segments
Core
Network Segment[] - One or more blocks detailing the segments within a core network. Detailed below.
- state string
- Current state of a core network.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn str
- Core Network Amazon Resource Name (ARN).
- created_
at str - Timestamp when a core network was created.
- edges
Sequence[Core
Network Edge] - One or more blocks detailing the edges within a core network. Detailed below.
- id str
- The provider-assigned unique ID for this managed resource.
- segments
Sequence[Core
Network Segment] - One or more blocks detailing the segments within a core network. Detailed below.
- state str
- Current state of a core network.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- Core Network Amazon Resource Name (ARN).
- created
At String - Timestamp when a core network was created.
- edges List<Property Map>
- One or more blocks detailing the edges within a core network. Detailed below.
- id String
- The provider-assigned unique ID for this managed resource.
- segments List<Property Map>
- One or more blocks detailing the segments within a core network. Detailed below.
- state String
- Current state of a core network.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
Look up Existing CoreNetwork Resource
Get an existing CoreNetwork 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?: CoreNetworkState, opts?: CustomResourceOptions): CoreNetwork@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
base_policy_document: Optional[str] = None,
base_policy_region: Optional[str] = None,
base_policy_regions: Optional[Sequence[str]] = None,
create_base_policy: Optional[bool] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
edges: Optional[Sequence[CoreNetworkEdgeArgs]] = None,
global_network_id: Optional[str] = None,
segments: Optional[Sequence[CoreNetworkSegmentArgs]] = None,
state: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> CoreNetworkfunc GetCoreNetwork(ctx *Context, name string, id IDInput, state *CoreNetworkState, opts ...ResourceOption) (*CoreNetwork, error)public static CoreNetwork Get(string name, Input<string> id, CoreNetworkState? state, CustomResourceOptions? opts = null)public static CoreNetwork get(String name, Output<String> id, CoreNetworkState state, CustomResourceOptions options)resources: _: type: aws:networkmanager:CoreNetwork get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- Core Network Amazon Resource Name (ARN).
- Base
Policy stringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- Base
Policy stringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Base
Policy List<string>Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Create
Base boolPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - Created
At string - Timestamp when a core network was created.
- Description string
- Description of the Core Network.
- Edges
List<Core
Network Edge> - One or more blocks detailing the edges within a core network. Detailed below.
- Global
Network stringId - The ID of the global network that a core network will be a part of.
- Segments
List<Core
Network Segment> - One or more blocks detailing the segments within a core network. Detailed below.
- State string
- Current state of a core network.
- Dictionary<string, string>
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- Arn string
- Core Network Amazon Resource Name (ARN).
- Base
Policy stringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- Base
Policy stringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Base
Policy []stringRegions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - Create
Base boolPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - Created
At string - Timestamp when a core network was created.
- Description string
- Description of the Core Network.
- Edges
[]Core
Network Edge Args - One or more blocks detailing the edges within a core network. Detailed below.
- Global
Network stringId - The ID of the global network that a core network will be a part of.
- Segments
[]Core
Network Segment Args - One or more blocks detailing the segments within a core network. Detailed below.
- State string
- Current state of a core network.
- map[string]string
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- Core Network Amazon Resource Name (ARN).
- base
Policy StringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base
Policy StringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base
Policy List<String>Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create
Base BooleanPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - created
At String - Timestamp when a core network was created.
- description String
- Description of the Core Network.
- edges
List<Core
Network Edge> - One or more blocks detailing the edges within a core network. Detailed below.
- global
Network StringId - The ID of the global network that a core network will be a part of.
- segments
List<Core
Network Segment> - One or more blocks detailing the segments within a core network. Detailed below.
- state String
- Current state of a core network.
- Map<String,String>
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn string
- Core Network Amazon Resource Name (ARN).
- base
Policy stringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base
Policy stringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base
Policy string[]Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create
Base booleanPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - created
At string - Timestamp when a core network was created.
- description string
- Description of the Core Network.
- edges
Core
Network Edge[] - One or more blocks detailing the edges within a core network. Detailed below.
- global
Network stringId - The ID of the global network that a core network will be a part of.
- segments
Core
Network Segment[] - One or more blocks detailing the segments within a core network. Detailed below.
- state string
- Current state of a core network.
- {[key: string]: string}
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn str
- Core Network Amazon Resource Name (ARN).
- base_
policy_ strdocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base_
policy_ strregion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base_
policy_ Sequence[str]regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create_
base_ boolpolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - created_
at str - Timestamp when a core network was created.
- description str
- Description of the Core Network.
- edges
Sequence[Core
Network Edge Args] - One or more blocks detailing the edges within a core network. Detailed below.
- global_
network_ strid - The ID of the global network that a core network will be a part of.
- segments
Sequence[Core
Network Segment Args] - One or more blocks detailing the segments within a core network. Detailed below.
- state str
- Current state of a core network.
- Mapping[str, str]
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- Core Network Amazon Resource Name (ARN).
- base
Policy StringDocument - Sets the base policy document for the core network. Refer to the Core network policies documentation for more information.
- base
Policy StringRegion - The base policy created by setting the
create_base_policyargument totruerequires a region to be set in theedge-locations,locationkey. Ifbase_policy_regionis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - base
Policy List<String>Regions - A list of regions to add to the base policy. The base policy created by setting the
create_base_policyargument totruerequires one or more regions to be set in theedge-locations,locationkey. Ifbase_policy_regionsis not specified, the region used in the base policy defaults to the region specified in theproviderblock. - create
Base BooleanPolicy - Specifies whether to create a base policy when a core network is created or updated. A base policy is created and set to
LIVEto allow attachments to the core network (e.g. VPC Attachments) before applying a policy document provided using theaws.networkmanager.CoreNetworkPolicyAttachmentresource. This base policy is needed if your core network does not have anyLIVEpolicies and your policy document has static routes pointing to VPC attachments and you want to attach your VPCs to the core network before applying the desired policy document. Valid values aretrueorfalse. An example of this Pulumi snippet can be found above for VPC Attachment in a single region and for VPC Attachment multi-region. An example base policy is shown below. This base policy is overridden with the policy that you specify in theaws.networkmanager.CoreNetworkPolicyAttachmentresource.{ "version": "2021.12", "core-network-configuration": { "asn-ranges": [ "64512-65534" ], "vpn-ecmp-support": false, "edge-locations": [ { "location": "us-east-1" } ] }, "segments": [ { "name": "segment", "description": "base-policy", "isolate-attachments": false, "require-attachment-acceptance": false } ] } - created
At String - Timestamp when a core network was created.
- description String
- Description of the Core Network.
- edges List<Property Map>
- One or more blocks detailing the edges within a core network. Detailed below.
- global
Network StringId - The ID of the global network that a core network will be a part of.
- segments List<Property Map>
- One or more blocks detailing the segments within a core network. Detailed below.
- state String
- Current state of a core network.
- Map<String>
- Key-value tags for the Core Network. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
Supporting Types
CoreNetworkEdge, CoreNetworkEdgeArgs
- Asn int
- ASN of a core network edge.
- Edge
Location string - Region where a core network edge is located.
- Inside
Cidr List<string>Blocks - Inside IP addresses used for core network edges.
- Asn int
- ASN of a core network edge.
- Edge
Location string - Region where a core network edge is located.
- Inside
Cidr []stringBlocks - Inside IP addresses used for core network edges.
- asn Integer
- ASN of a core network edge.
- edge
Location String - Region where a core network edge is located.
- inside
Cidr List<String>Blocks - Inside IP addresses used for core network edges.
- asn number
- ASN of a core network edge.
- edge
Location string - Region where a core network edge is located.
- inside
Cidr string[]Blocks - Inside IP addresses used for core network edges.
- asn int
- ASN of a core network edge.
- edge_
location str - Region where a core network edge is located.
- inside_
cidr_ Sequence[str]blocks - Inside IP addresses used for core network edges.
- asn Number
- ASN of a core network edge.
- edge
Location String - Region where a core network edge is located.
- inside
Cidr List<String>Blocks - Inside IP addresses used for core network edges.
CoreNetworkSegment, CoreNetworkSegmentArgs
- Edge
Locations List<string> - Regions where the edges are located.
- Name string
- Name of a core network segment.
- List<string>
- Shared segments of a core network.
- Edge
Locations []string - Regions where the edges are located.
- Name string
- Name of a core network segment.
- []string
- Shared segments of a core network.
- edge
Locations List<String> - Regions where the edges are located.
- name String
- Name of a core network segment.
- List<String>
- Shared segments of a core network.
- edge
Locations string[] - Regions where the edges are located.
- name string
- Name of a core network segment.
- string[]
- Shared segments of a core network.
- edge_
locations Sequence[str] - Regions where the edges are located.
- name str
- Name of a core network segment.
- Sequence[str]
- Shared segments of a core network.
- edge
Locations List<String> - Regions where the edges are located.
- name String
- Name of a core network segment.
- List<String>
- Shared segments of a core network.
Import
Using pulumi import, import aws_networkmanager_core_network using the core network ID. For example:
$ pulumi import aws:networkmanager/coreNetwork:CoreNetwork example core-network-0d47f6t230mz46dy4
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
awsTerraform Provider.