Coder Social home page Coder Social logo

topological_inventory-azure's Introduction

topological_inventory-azure

Build Status Maintainability Test Coverage security


Create Azure service principal and configure roles

Red Hat recommends configuring dedicated credentials to grant topological inventory read-only access to Azure data.

  1. Once in the Azure portal, enter the cloud shell by clicking on the terminal icon on the top menu bar.

  2. In the shell environment, run the following command to obtain your Azure subscription ID:

    az account show --query "{subscription_id: id }"

    The subscription ID will be required for one of the following steps.

  3. Now, run the following command to create the TopologicalInventory service principle with an initial role of Reader. The command will return the API keys that will be used by the Azure source.

    az ad sp create-for-rbac -n "https://TopologicalInventory" --role "Reader" --query '{"tenant": tenant, "client_id": appId, "secret": password}'

    Note: Service principal names are global for the Azure account, so you may need to use a different name if https://TopologicalInventory already exists.

  4. Finally, we need to add the Storage Account Contributor role to our newly created service principal, to enable topological inventory to collect storage information. This is accomplished by running the following:

    az role assignment create --role "Storage Account Contributor" --assignee https://TopologicalInventory --subscription <SubscriptionID>

    Note: Replace with the value obtained in the first step.

Assigning API keys to Azure source

The az ad sp create-for-rbac ... command mentioned above, should return the keys in the following format:

{
  "client_id": "XXX",
  "secret": "YYY",
  "tenant": "ZZZ"
}

When seeding the source information via the scripts in the guides repository, assign these values in your config.sh as follows:

export AZURE_CLIENT_ID="XXX"
export AZURE_CLIENT_SECRET="YYY"
export AZURE_TENANT_ID="ZZZ"

topological_inventory-azure's People

Contributors

slemrmartin avatar ladas avatar agrare avatar pkomanek avatar syncrou avatar gtanzillo avatar gmcculloug avatar carbonin avatar roliveri avatar bdunne avatar lindgrenj6 avatar lpichler avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.