get Core Network Policy Document
Generates a Core Network policy document in JSON format for use with resources that expect core network policy documents such as awscc_networkmanager_core_network
. It follows the API definition from the core-network-policy documentation. Using this data source to generate policy documents is optional. It is also valid to use literal JSON strings in your configuration or to use the file
interpolation function to read a raw JSON policy document from a file.
Example Usage
Basic Example
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.NetworkmanagerFunctions;
import com.pulumi.aws.networkmanager.inputs.GetCoreNetworkPolicyDocumentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = NetworkmanagerFunctions.getCoreNetworkPolicyDocument(GetCoreNetworkPolicyDocumentArgs.builder()
.attachmentPolicies(
GetCoreNetworkPolicyDocumentAttachmentPolicyArgs.builder()
.action(GetCoreNetworkPolicyDocumentAttachmentPolicyActionArgs.builder()
.associationMethod("constant")
.segment("shared")
.build())
.conditionLogic("or")
.conditions(GetCoreNetworkPolicyDocumentAttachmentPolicyConditionArgs.builder()
.key("segment")
.operator("equals")
.type("tag-value")
.value("shared")
.build())
.ruleNumber(100)
.build(),
GetCoreNetworkPolicyDocumentAttachmentPolicyArgs.builder()
.action(GetCoreNetworkPolicyDocumentAttachmentPolicyActionArgs.builder()
.associationMethod("constant")
.segment("prod")
.build())
.conditionLogic("or")
.conditions(GetCoreNetworkPolicyDocumentAttachmentPolicyConditionArgs.builder()
.key("segment")
.operator("equals")
.type("tag-value")
.value("prod")
.build())
.ruleNumber(200)
.build())
.coreNetworkConfigurations(GetCoreNetworkPolicyDocumentCoreNetworkConfigurationArgs.builder()
.asnRanges("64512-64555")
.edgeLocations(
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.asn(64512)
.location("us-east-1")
.build(),
GetCoreNetworkPolicyDocumentCoreNetworkConfigurationEdgeLocationArgs.builder()
.asn(64513)
.location("eu-central-1")
.build())
.vpnEcmpSupport(false)
.build())
.segmentActions(GetCoreNetworkPolicyDocumentSegmentActionArgs.builder()
.action("share")
.mode("attachment-route")
.segment("shared")
.shareWiths("*")
.build())
.segments(
GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.description("Segment for shared services")
.name("shared")
.requireAttachmentAcceptance(true)
.build(),
GetCoreNetworkPolicyDocumentSegmentArgs.builder()
.description("Segment for prod services")
.name("prod")
.requireAttachmentAcceptance(true)
.build())
.build());
}
}
Return
A collection of values returned by getCoreNetworkPolicyDocument.
Parameters
A collection of arguments for invoking getCoreNetworkPolicyDocument.
Return
A collection of values returned by getCoreNetworkPolicyDocument.
Parameters
In a core network, all attachments use the block argument attachment_policies
section to map an attachment to a segment. Instead of manually associating a segment to each attachment, attachments use tags, and then the tags are used to associate the attachment to the specified segment. Detailed below.
The core network configuration section defines the Regions where a core network should operate. For AWS Regions that are defined in the policy, the core network creates a Core Network Edge where you can connect attachments. After it's created, each Core Network Edge is peered with every other defined Region and is configured with consistent segment and routing across all Regions. Regions cannot be removed until the associated attachments are deleted. Detailed below.
A block argument, segment_actions
define how routing works between segments. By default, attachments can only communicate with other attachments in the same segment. Detailed below.
Block argument that defines the different segments in the network. Here you can provide descriptions, change defaults, and provide explicit Regional operational and route filters. The names defined for each segment are used in the segment_actions
and attachment_policies
section. Each segment is created, and operates, as a completely separated routing domain. By default, attachments can only communicate with other attachments in the same segment. Detailed below.
See also
Return
A collection of values returned by getCoreNetworkPolicyDocument.
Parameters
Builder for com.pulumi.aws.networkmanager.kotlin.inputs.GetCoreNetworkPolicyDocumentPlainArgs.