Code Monkey home page Code Monkey logo

claranet-azure-pre-configuration's Introduction

Claranet Azure pre-configuration script

The purpose of this script is to execute all necessary high privileges actions needed by Claranet for Azure subscriptions management.

This includes:

  • Creation of a "claranet-tools" (or any other given name) service principal
  • Creation of a "claranet-deploy" (or any other given name) service principal
  • Rights assignment of Reader service principal on selected Subscription(s) with following rights:
  • Specific right assignment at the tenant level to read Reservations for FinOps purposes
  • Rights assignment of Deployment service principal on selected Subscription(s) with following rights:
  • Optional creation of a "Claranet DevOps" user group and rights assignment on subscriptions

A report is generated at the end of the script and needs to be provided to Claranet in a secure way.

Prerequisites

In order to play this script, you'll need:

  • Azure Active Directory privileges for creating Service Principals
  • A terminal with the Azure CLI configured (it can be Azure Cloud Shell)
  • Azure Subscriptions to configure rights on them

Important notes

If the given service principal name already exists, the script will re-use the existing one.

How to use it

With Azure Cloud Shell (recommended)

You can find Azure Cloud Shell documentation here: https://docs.microsoft.com/en-us/azure/cloud-shell/overview

Open Azure Cloud Shell from the Azure portal in Bash mode and launch the following command:

bash <(curl -s https://raw.githubusercontent.com/claranet/claranet-azure-pre-configuration/master/setup.sh)

Azure Cloud Shell usage

From your terminal

Either clone this repository or download the script setup.sh locally and launch it in your terminal or launch the following command locally:

bash <(curl -s https://raw.githubusercontent.com/claranet/claranet-azure-pre-configuration/master/setup.sh)

Troubleshooting

I can't see my subscription in the list

If the subscription has been recently created, be sure to you've logged in with the Azure CLI after the subscription creation. This issue should not occur when using the Azure Cloud Shell method.

You can do this with the following command:

az login

claranet-azure-pre-configuration's People

Contributors

bzspi avatar jmapro avatar nicolas-morel-claranet avatar rossifumax avatar shr3ps avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

shr3ps

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.