Info icon
End of Life Notice: For Trend Cloud One™ - Conformity Customers, Conformity will reach its End of Sale on “July 31st, 2025” and End of Life “July 31st, 2026”. The same capabilities and much more is available in TrendAI Vision One™ Cloud Risk Management. For details, please refer to Upgrade to TrendAI Vision One™
Use the Knowledge Base AI to help improve your Cloud Posture

Check for Cost Allocation Tags

TrendAI Vision One™ provides continuous assurance that gives peace of mind for your cloud infrastructure, delivering over 1400 automated best practice checks.

Risk Level: Low (generally tolerable level of risk)
Rule ID: OCI-FileStorage-006

Ensure that cost allocation tags are used for labeling, organizing, and budget tracking your OCI File Storage systems. In Oracle Cloud Infrastructure (OCI), resource tags are simple key-value pairs assigned to cloud resources for simplified organization, management, and budgeting.
For robust cost allocation and tracking, TrendAI Vision One™ Cloud Risk Management recommends the following tagging schema:

  • CostCenter: used to allocate and track cloud spending to a specific financial entity.
  • Project: used to identify individual projects consuming the resource.
  • Environment: used to distinguish between different stages (e.g., Development, Staging, and Production).
  • Owner: used to identify the person responsible for the cloud resource.
  • BillingCode: used to identify the formal code used by the finance department to categorize and charge the expense.
Cost
optimisation

By leveraging a structured tagging schema on your Oracle Cloud Infrastructure (OCI) File Storage systems, you enable granular cost allocation and budget tracking. This process provides enhanced operational visibility, allowing you to efficiently query and filter vaults based on crucial metadata dimensions, such as owner, environment, and cost attribution.


Audit

To determine if your Oracle Cloud Infrastructure (OCI) File Storage systems are using cost allocation tags, perform the following operations:

Using OCI Console

  1. Sign in to your Oracle Cloud Infrastructure (OCI) account.

  2. Navigate to File Storage console available at https://cloud.oracle.com/fss/.

  3. In the left navigation panel, choose File Systems, and select an OCI compartment from the Compartment dropdown menu, to list the file systems provisioned in that compartment.

  4. Click on the name (link) of the file system that you want to examine, listed in the Name column.

  5. Select the Tags tab to access the resource tags defined for the selected file system. There are two types of resource tags: defined tags and free-form tags. A defined tag is a structured key-value metadata with enforced policies and namespace, that has the following format: \<tag-namespace\>.\<tag-key\>:\<tag-value\>. A free-form tag is a simple key-value metadata with no structure or namespace enforcement, with the following format: \<tag-key\>:\<tag-value\>.

  6. Choose the Defined tags/Free-form tags tab, and search for the following combination of tag keys (\<tag-key\>): CostCenter, Project, Environment, Owner, and BillingCode. If the Defined tags/Free-form tags list does not contain the specified combination of tag keys, the selected Oracle Cloud Infrastructure (OCI) File Storage system is not using cost allocation tags.

Using OCI CLI

  1. Run iam compartment list command (Windows/macOS/Linux) with output query filters to list the ID of each compartment available in your Oracle Cloud Infrastructure (OCI) account:

    oci iam compartment list
    	--all
    	--include-root
    	--query 'data[]."id"'
    
  2. The command output should return the requested OCI compartment identifiers (OCIDs):

    [
    	"ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    	"ocid1.compartment.oc1..abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd"
    ]
    
  3. Run fs file-system list command (Windows/macOS/Linux) with the ID of the OCI compartment that you want to examine as the identifier parameter, to list the ID of each File Storage system provisioned in the selected OCI compartment:

    oci fs file-system list
    	--compartment-id 'ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--availability-domain 'ABC1:AB-ABC123-1-BC-1'
    	--all
    	--query 'data[]."id"'
    
  4. The command output should return the requested file system IDs:

    [
    	"ocid1.filesystem.oc1.ap_sydney_1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    	"ocid1.filesystem.oc1.ap_sydney_1.aaaabbbbccccddddabcdabcd1234abcd1234abcd1234abcd1234abcd1234"
    ]
    
  5. Run fs file-system get command (Windows/macOS/Linux) to describe the resource tags (defined tags and free-form tags) defined for the specified OCI File Storage system:

    oci fs file-system get
    	--file-system-id 'ocid1.filesystem.oc1.ap_sydney_1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--query 'data.["defined-tags","freeform-tags"]'
    
  6. The command output should return the resource tags used by the selected file system:

    [
    	{
    		"Project": "Project5"
    	},
    	{
    		"Oracle-Tags": {
    			"CreatedBy": "Sydney Ops Team"
    		}
    	}
    ]
    

    There are two types of resource tags: defined tags and free-form tags. A defined tag is a structured key-value metadata with enforced policies and namespace, that has the following format: "\<tag-namespace\>": {"\<tag-key\>": "\<tag-value\>"}. A free-form tag is a simple key-value metadata with no structure or namespace enforcement, with the following format: "\<tag-key\>": "\<tag-value\>". Check each tag key returned by the fs file-system get command output (e.g., "Project") for the following combination of tag keys: "CostCenter", "Project", "Environment", "Owner", and "BillingCode". If the command output does not return the specified combination of tag keys, the selected Oracle Cloud Infrastructure (OCI) File Storage system is not using cost allocation tags.

Remediation / Resolution

To implement cost allocation tags for your Oracle Cloud Infrastructure (OCI) File Storage systems, perform the following operations:

Using OCI Console

  1. Sign in to your Oracle Cloud Infrastructure (OCI) account.

  2. Navigate to File Storage console available at https://cloud.oracle.com/fss/.

  3. In the left navigation panel, choose File Systems, and select an OCI compartment from the Compartment dropdown menu, to list the file systems provisioned in that compartment.

  4. Click on the name (link) of the file system that you want to configure, listed in the Name column.

  5. Choose Add tags from the resource top menu, and perform the following actions to create the recommended cost allocation tags for the selected File Storage system:

    1. For Namespace, select a tag namespace from the dropdown list to add a defined tag or select None to add a free-form tag. A defined tag is a structured key-value metadata with enforced policies and namespace. A free-form tag is a simple key-value metadata with no structure or namespace enforcement.
    2. For Key, choose a cost allocation tag key that's associated with the selected tag namespace if you are adding a defined tag, or type CostCenter, Project, Environment, Owner, or BillingCode in the tag key box if you're adding a free-form tag.
    3. For Value, enter the tag value for the chosen cost allocation tag key.
    4. Choose Add tag and make sure that each cost allocation tag (i.e., CostCenter, Project, Environment, Owner, and BillingCode) is defined.
    5. Choose Add tags to apply the recommended cost allocation tags to your OCI resource.

Using OCI CLI

  1. Run fs file-system update command (Windows/macOS/Linux) to add cost allocation tags (free-form tags) to the specified Oracle Cloud Infrastructure (OCI) File Storage system. A free-form tag is a simple key-value metadata with no structure or namespace enforcement. Make sure that you include any existing free-form tags to the --freeform-tags parameter value:

    oci fs file-system update
    	--file-system-id 'ocid1.filesystem.oc1.ap_sydney_1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--freeform-tags '{"BillingCode":"P5009","Project":"Project5"}'
    
  2. Type Y and press Enter for confirmation:

    WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue? [y/N]: Y
    
  3. The command output should return the configuration information (including tags) available for the modified file system:

    {
    	"data": {
    		"are-quota-rules-enabled": false,
    		"availability-domain": "ABCD:AP-SYDNEY-1-AD-1",
    		"clone-attach-status": "DETACHED",
    		"clone-count": 0,
    		"compartment-id": "ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    		"defined-tags": {},
    		"display-name": "cc-project5-file-system",
    		"filesystem-snapshot-policy-id": null,
    		"freeform-tags": {
    			"BillingCode": "P5009",
    			"Project": "Project5"
    		},
    		"id": "ocid1.filesystem.oc1.ap_sydney_1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    		"is-clone-parent": false,
    		"is-hydrated": true,
    		"is-targetable": false,
    		"kms-key-id": null,
    		"lifecycle-details": null,
    		"lifecycle-state": "ACTIVE",
    		"metered-bytes": 0,
    		"quota-enforcement-state": "DISABLED",
    		"replication-source-count": 0,
    		"replication-target-id": null,
    		"source-details": null,
    		"system-tags": null,
    		"time-created": "2025-10-16T03:45:20.573000+00:00"
    	},
    	"etag": "abcd1234abcd1234abcd1234abcd1234"
    }
    
  4. Run fs file-system update command (Windows/macOS/Linux) to add cost allocation tags (defined tags) to the specified OCI File Storage system. A defined tag is a structured key-value metadata with enforced policies and namespace. Make sure that you include any existing defined tags to the --defined-tags parameter value:

    oci fs file-system update
    	--file-system-id 'ocid1.filesystem.oc1.ap_sydney_1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--defined-tags '{"Cost":{"BillingCode":"P5009"}}'
    
  5. Type Y and press Enter for confirmation:

    WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue? [y/N]: Y
    
  6. The command output should return the configuration information (including tags) available for the modified file system:

    {
    	"data": {
    		"are-quota-rules-enabled": false,
    		"availability-domain": "ABCD:AP-SYDNEY-1-AD-1",
    		"clone-attach-status": "DETACHED",
    		"clone-count": 0,
    		"compartment-id": "ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    		"defined-tags": {
    			"Cost": {
    				"BillingCode": "P5009"
    			}
    		},
    		"display-name": "cc-project5-file-system",
    		"filesystem-snapshot-policy-id": null,
    		"freeform-tags": {},
    		"id": "ocid1.filesystem.oc1.ap_sydney_1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    		"is-clone-parent": false,
    		"is-hydrated": true,
    		"is-targetable": false,
    		"kms-key-id": null,
    		"lifecycle-details": null,
    		"lifecycle-state": "ACTIVE",
    		"metered-bytes": 0,
    		"quota-enforcement-state": "DISABLED",
    		"replication-source-count": 0,
    		"replication-target-id": null,
    		"source-details": null,
    		"system-tags": null,
    		"time-created": "2025-10-16T03:45:20.573000+00:00"
    	},
    	"etag": "abcd1234abcd1234abcd1234abcd1234"
    }
    
  7. Repeat steps no. 1 - 6 for each recommended cost allocation tag, i.e., CostCenter, Project, Environment, Owner, and BillingCode.

References

Publication date Nov 12, 2025