import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Create and manage an Entity Group for microsegmentation. * * ## Example Usage * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * // Simple entity group with name and description * const simple = new nutanix.EntityGroupV2("simple", { * name: "my-entity-group", * description: "Entity group for microsegmentation", * }); * // Entity group with allowed_config (VM by category + address group by IP) * const withAllowed = new nutanix.EntityGroupV2("with_allowed", { * name: "entity_group_with_allowed", * description: "Entity group with allowed entities", * allowedConfig: { * entities: [ * { * type: "VM", * selectedBy: "CATEGORY_EXT_ID", * referenceExtIds: [ * "category-uuid-1", * "category-uuid-2", * ], * }, * { * type: "ADDRESS_GROUP", * selectedBy: "IP_VALUES", * addresses: { * ipv4Addresses: [{ * value: "10.0.0.0", * prefixLength: 24, * }], * }, * ipRanges: { * ipv4Ranges: [{ * startIp: "192.168.1.1", * endIp: "192.168.1.10", * }], * }, * }, * ], * }, * }); * ``` * * * ## Validation Requirements * * The following validation rules apply to `allowedConfig` entities: * * ### Required Fields * * * `type` - (Required) Must be specified for all entities in `allowedConfig`. * * ### Conditional Requirements * * * `kubeEntities` - Required when `type` is one of: `KUBE_NAMESPACE`, `KUBE_SERVICE`, `KUBE_CLUSTER`, or `KUBE_PODS`. Must not be empty. * * `referenceExtIds` - Required when `selectedBy` is `EXT_ID`. Must not be empty. * * ### Valid Combinations * * The combination of `selectedBy` and `type` must be one of the following valid pairs: * * * `(CATEGORY_EXT_ID, VM)` * * `(CATEGORY_EXT_ID, SUBNET)` * * `(CATEGORY_EXT_ID, VPC)` * * `(EXT_ID, KUBE_CLUSTER)` * * `(EXT_ID, ADDRESS_GROUP)` * * `(LABELS, KUBE_PODS)` * * `(NAME, KUBE_NAMESPACE)` * * `(NAME, KUBE_SERVICE)` * * `(IP_VALUES, ADDRESS_GROUP)` * * Any other combination will result in a validation error. * * ### Duplicate (selected_by, type) Not Allowed * * Within one entity group, you cannot have two entities with the same `(selected_by, type)` pair. For example, two entities both using `IP_VALUES` and `ADDRESS_GROUP` are invalid. Combine all addresses and ipRanges into a single entity block when using `(IP_VALUES, ADDRESS_GROUP)`. * * ## Import * * Entity Group can be imported using the entity group uuid `entityGroupUUID` (ext_id in v4 terms). eg, * * // create its configuration in the root module. For example: * resource "nutanix.EntityGroupV2" "importEntityGroup"{} * * // execute the below command. * * ```sh * $ pulumi import nutanix:index/entityGroupV2:EntityGroupV2 import_entity_group * ``` * * See detailed information in [Nutanix Entity Groups V4](https://developers.nutanix.com/api-reference?namespace=microseg&version=v4.2#tag/EntityGroups/operation/createEntityGroup). */ export declare class EntityGroupV2 extends pulumi.CustomResource { /** * Get an existing EntityGroupV2 resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: EntityGroupV2State, opts?: pulumi.CustomResourceOptions): EntityGroupV2; /** * Returns true if the given object is an instance of EntityGroupV2. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is EntityGroupV2; /** * Configuration of the allowed entities in the Entity Group. */ readonly allowedConfig: pulumi.Output; /** * The timestamp when the Entity Group was created. */ readonly creationTime: pulumi.Output; /** * A user defined annotation for an Entity Group. */ readonly description: pulumi.Output; /** * Configuration of except entities in the Entity Group. */ readonly exceptConfig: pulumi.Output; /** * Entity group UUID. */ readonly extId: pulumi.Output; /** * The timestamp when the Entity Group was last updated. */ readonly lastUpdateTime: pulumi.Output; /** * A HATEOAS style link for the response. */ readonly links: pulumi.Output; /** * A short identifier of an Entity Group. */ readonly name: pulumi.Output; /** * The external identifier of the user who created the Entity Group. */ readonly ownerExtId: pulumi.Output; /** * List of policy external identifiers. */ readonly policyExtIds: pulumi.Output; /** * A globally unique identifier that represents the tenant that owns this entity. */ readonly tenantId: pulumi.Output; /** * Create a EntityGroupV2 resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: EntityGroupV2Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EntityGroupV2 resources. */ export interface EntityGroupV2State { /** * Configuration of the allowed entities in the Entity Group. */ allowedConfig?: pulumi.Input; /** * The timestamp when the Entity Group was created. */ creationTime?: pulumi.Input; /** * A user defined annotation for an Entity Group. */ description?: pulumi.Input; /** * Configuration of except entities in the Entity Group. */ exceptConfig?: pulumi.Input; /** * Entity group UUID. */ extId?: pulumi.Input; /** * The timestamp when the Entity Group was last updated. */ lastUpdateTime?: pulumi.Input; /** * A HATEOAS style link for the response. */ links?: pulumi.Input[] | undefined>; /** * A short identifier of an Entity Group. */ name?: pulumi.Input; /** * The external identifier of the user who created the Entity Group. */ ownerExtId?: pulumi.Input; /** * List of policy external identifiers. */ policyExtIds?: pulumi.Input[] | undefined>; /** * A globally unique identifier that represents the tenant that owns this entity. */ tenantId?: pulumi.Input; } /** * The set of arguments for constructing a EntityGroupV2 resource. */ export interface EntityGroupV2Args { /** * Configuration of the allowed entities in the Entity Group. */ allowedConfig?: pulumi.Input; /** * A user defined annotation for an Entity Group. */ description?: pulumi.Input; /** * Configuration of except entities in the Entity Group. */ exceptConfig?: pulumi.Input; /** * A short identifier of an Entity Group. */ name?: pulumi.Input; /** * List of policy external identifiers. */ policyExtIds?: pulumi.Input[] | undefined>; } //# sourceMappingURL=entityGroupV2.d.ts.map