Search
K

Resource Auto Mapping

The Easiest Way to Associate Resources with Services and Environments and Keep Drift Free
Resource auto mapping allows you to specify cloud tags and labels in your services and environments and have configure8 automatically map all your cloud resources to the specified environments and services. Each time configure8 does a new discovery job on your cloud accounts, the auto mapping will be re-run, enabling a drift-free mapping of your resources to your environments and services.
Auto Mapping is currently supported for AWS, Kubernetes and Azure resource types, with GCP coming soon.
There is a limitation for cloud tags functionality in Azure. For Azure Functions it is not possible to fetch tags from API, even though they can be modified in portal. Therefore, Azure Functions resources will only contain the subscription id meta tag.

Enable resource Auto Mapping

To enable resource auto mapping:
  1. 1.
    Go into the Environment you wish to have auto mapped. Create a new piece of metadata of type Auto Map, and enter the key-value pair you use to identify a resource's environment in your company's tagging scheme. For example, if you have an env: production tag on all the resources in your production environment, you'd add the following metadata to your production environment:
  1. 2.
    Go into the Service you wish to have auto mapped. Create a new piece of metadata of type Auto Map, and enter the key-value pair you use to identify a resource's service in your company's tagging scheme. Configure8 will look at both Tags as well as Kubernetes Namespaces in the matching process. For example, if you have a service: exampleservice tag on all the resources that correspond to ExampleService, you'd add the following metadata to the service detail page for ExampleService:
  1. 3.
    In the Service page, go to the Environments tab and click + Add Environment to add the environment you tagged in Step1 to the service:
Configure8 does the rest of the work, automatically mapping resources based on the intersection of resources' Auto Map metadata that match the Auto Map metadata you entered for your environments and services.
Services' and environments' Auto Map metadata is compared to resources' Auto Map metadata fully, not partially. So that all Auto Map metadata from service and all Auto Map metadata from environment need to be present in resource in order for auto mapping to be performed.
For example, you have service1 with two meta tags:
serviceName: test
acc: demo
And it has environment1 with meta tag:
env: prod
In order to map resource1 to service1 and environment1, it has to have these meta tags:
serviceName: test
acc: demo
env: prod
If resource1 has only these meta tags for example, it will not be mapped to service1 and environment1:
serviceName: test
env: prod
When you create new Auto Map metadata, updates will be applied soon (similar to discovery). Additionally, remapping will be run automatically after each discovery job and whenever you change a tag or label in your service or environment's Auto Map metadata.

Auto Mapping Specifics

Auto Mapping Kubernetes Namespaces

configure8 supports mapping Kubernetes resources by specifying the name of namespace to map all resources in that namespace to a service. To map a namespace, create a new piece of Metadata of type Auto Map, set the key to kubernetes.io/metadata.name, and set the value to the namespace (i.e. opencost). configure8 supports specifying multiple namespaces via adding many Auto Map metadata entries. For example, if you set 3 auto-mapping tags with the same name configure8 will assume that at least one of the namespaces should be present to Auto Map the pods/containers to the service.

Auto Mapping AWS resources by keywords

In addition to Auto Mapping based on resources' cloud tags, AWS resources can also be mapped based on keywords. The keywords that can be used for this type of Auto Mapping vary depending on the AWS resource type, but basically Configure8 searches for patterns that contain these keywords:
  • Id
  • Name
  • Arn
  • InUseBy
  • VpcId
So for instance, if an EC2 instance contains VpcId information inside details on discovery, it will be mapped to the corresponding VPC based on its id.

Auto Mapping Azure resource by subscription id

In addition to Auto Mapping based on resources' cloud tags, Azure resources can also be mapped based on subscription id. Since every discovered resource can be associated with subscription id it belongs to, Configure8 adds a meta tag with key subscriptionId and value set to the currently discovered subscription id to all discovered resources. To map resources within a specific subscription to an environment, you need to add the corresponding meta tag to the environment with the key subscriptionId and value set to the desired subscription id.
There is a limitation for cloud tags functionality in Azure. For Azure Functions it is not possible to fetch tags from API, even though they can be modified in portal. Therefore, Azure Functions resources will only contain the subscription id meta tag.
Copyright © 2023 configure8, Inc. All rights reserved.