SOCA automatically applies custom SOCA-specific tags (prefixed with soca:
) to all deployed resources, making them easy to identify. You can also configure and add your own tags as needed.
Before installing SOCA¶
If you haven't installed SOCA, navigate to installer/default_config.yml and update the custom_tags
section:
custom_tags:
- Key: 'example:custom:Tag1Name'
Value: 'Tag1Value'
- Key: 'example:custom:Tag2Name'
Value: 'Tag2Value'
Save the file and proceed to a standard SOCA installation. Your tags will automatically be added to all resources deployed by SOCA.
- Green: AWS Specific Tags
- Red: Your Custom Tags
- Blue: SOCA Specific Tags
After SOCA is deployed¶
You can add/remove your Custom Tags post-deployment using socactl.
List your current tags:¶
./socactl config get --key "/configuration/CustomTags/" --output json
{
"/configuration/CustomTags/examplecustomTag1Name": "{'Key': 'example:custom:Tag1Name', 'Value': 'Tag1Value', 'Enabled': True}",
"/configuration/CustomTags/examplecustomTag2Name": "{'Key': 'example:custom:Tag2Name', 'Value': 'Tag2Value', 'Enabled': True}"
}
Add a new tag: example:custom:PostDeploymentTag¶
./socactl config set --key "/configuration/CustomTags/mynewtag" \
--value "{'Key': 'example:custom:PostDeploymentTag', 'Value': 'PostDeploymentTagValue', 'Enabled': True}"
Cache updated
Success: Key has been updated successfully
Validate your new Custom Tags¶
./socactl config get --key "/configuration/CustomTags/" --output json
{
"/configuration/CustomTags/examplecustomTag1Name": "{'Key': 'example:custom:Tag1Name', 'Value': 'Tag1Value', 'Enabled': True}",
"/configuration/CustomTags/examplecustomTag2Name": "{'Key': 'example:custom:Tag2Name', 'Value': 'Tag2Value', 'Enabled': True}",
"/configuration/CustomTags/mynewtag": "{'Key': 'example:custom:PostDeploymentTag', 'Value': 'PostDeploymentTagValue', 'Enabled': True}"
}
Now go back to SOCA and launch a new resource, your new tag (example:custom:PostDeploymentTag
) will automatically be applied:
To remove a tag, delete the entry in AWS System Manager Parameter Store and flush SOCA cache.