Moving an NSG to a Different Compartment
Move a network security group (NSG) in a Virtual Cloud Network (VCN) between compartments.
When you move an NSG to a new compartment, inherent policies apply immediately.
For more information about using compartments and policies to control access to resources in a cloud network, see Access Control. For general information about compartments, see Managing Compartments.
Use the network nsg change-compartment command and required parameters to move an NSG from one compartment to another:
oci network nsg change-compartment --compartment-id destination-compartment-ocid --nsg-id nsg-ocid ... [OPTIONS]
For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.
Run the ChangeNetworkSecurityGroupCompartment operation to move an NSG from one compartment to another.