Tagging a VCN

Add metadata to virtual cloud networks (VCNs) in the form of tags. Tags enable you to define keys and values and associate them with resources.

You can apply tags to your VCNs to help you organize them according to your business needs. Apply tags when you create a VCN, or update the VCN with tags later. If you're not sure whether to apply tags, ask your administrator for guidance. For more information, see Resource Tags.

    1. Open the navigation menu, click Networking, and then click Virtual cloud networks.
    2. 2. Click the name of the VCN that you want to tag. You might need to change the compartment to find the VCN that you want.
    3. Click the Tags tab to view or edit the existing tags. Or click Add tags to add new ones.
  • Use the network vcn create command and parameters shown to add tags when you create a VCN:

    oci network vcn create --compartment-id compartment_id [. . .] [--defined-tags | --freeform-tags] tags [OPTIONS]

    Use the network vcn update command and parameters shown to add tags to an existing VCN:

    oci network vcn update --vcn-id ocid [. . .] [--defined-tags | --freeform-tags] tags [OPTIONS] 

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateVcn operation to to add tags when you create a VCN, and use the definedTags attribute.

    Run the UpdateVcn operation to add tags when you update a VCN, and use the definedTags or freeformTags attributes.