Using terraform how can I create one service account used across multiple project? - terraform

I am currently trying to use a service account that is already created in one project and use it again in a different project. I do not want to create a new service account in the new project I want to use the already existing service account. I am clueless on how to go about implementing this.

You can use data terraform. But I think u need grant permisions or roles for the new project in this sa.

Related

Azure Custom Vision Project

I am creating an azure custom vision project in python, every time i run the code, it creates new projects and my project count keeps increasing.
How can i delete an existing project before creating a new one?
First you're going to want to check which projects you have, which you can check with the GetProjects API. This will give you have a list of projects with their project ids. Once you have project ids for the projects you want to delete, then you can just call the DeleteProject API, passing in the project id. You can also managed you projects via the Custom Vision Service portal at www.customvision.ai, just be sure to sign in with your account.

How to clone/make another copy of an deployed bot on Azure?

I want to create a copy of an existing bot deployed on Azure. So, that the new copy can be used to create a new bot with minor changes.
Wanted to know if there is any direct option on Azure portal itself to create the clone of the existing bot
You could use the Export Template functionality to export the existing bot and any other associated resources from Azure, then use the Template deployment function to deploy your custom template.
As the bot channels registration isn't currently supported for template export (as you have found), the best option might be to script something. You can build a bot and have it zipped up and then use cli/powershell to create the needed resources and have it deployed. You can script creating new apps and bot channel resources fairly easy.
See here for more info on how to generally go about that. Let me know if you want a sudo sample.

how to create two app with a single developer account in FourSquare?

I want to create two different app to get two ClientId and secrete key for my project. Is there any way i can create two app with single developer account in Foursquare?
I don't know its right question to ask on this platform. if not, please enlighten me with correct one.
You can create only one app with Personal developer account in Foursquare. You need to upgrade to Enterprise developer account to create two apps.
https://enterprise.foursquare.com/upgrade-to-enterprise

How to create additional directories along with Azure AD using powershell?

I was going through the Powershell support to the Azure, and while looking into the cmdlets provided by Azure PowerShell i did not found any reference for the command by which i can create new directory under my subscription.
May be I am missing something.
Can anyone tell me the exact way to achieve this programmatically (using pwoershell)?
Thanks.
We do not expose the ability to create new directories via our REST APIs or PowerShell Module.
I believe this ability is only available through our Portals, in a non-automated fashion.
Can you go into more details about your scenario, where you would need to create multiple directories in an automated fashion?

What is the best practice for updating an already existing web app deployment using ARM?

My company developed an Azure Resource Manager-based solution that deploys a set of resources (essentially a Storage, SQL DB and Web App), and it is already implemented as our provisioning process for new customers.
However, we are now studying the best way to perform updates, and one of the hypotheses we are considering is having a specific template that updates the binaries of this application.
The idea is to have a separate template, that only has the web app, an app host and a MSDeploy resource that gets the latest version of our package and reuploads it to that web app.
The only problem I'm seeing with this solution is the ability to handle any changes in configuration that are necessary with newer version of the binaries - we do not want users to have to re-input any parameters they placed for the original deploy (done via a Deploy To Azure button), so, any configurations will have to be performed within the application - the plan is for it to use the Microsoft.WindowsAzure.Management.WebSites library.
The major limitation with using Microsoft.WindowsAzure.Management.WebSites is that you are restricted to authenticating with either a certificate or a service principal. Ideally we would like to find a way for the updates to not need any authentication other than the one you provide when you are deploying the update.
Is there any recommendation of best practices to follow for this kind of scenario?
Thank you.
Link to the equivalent discussion on TechNet
It is possible to update only via ARM templates.
For example connection strings can be added automatically to the application settings even when creating the dependent resources themselves.
Ex. Account storage connection string.
Only first time creation of your web sites will take a bit more time, something like 30 sec.
ARM will not destroy your WebApps if they exist already. it will update only.
If there are no changes, then the deployment is very fast.
If your changes require a new Appsettings parameter, you can enter it in ARM , check in to your repository.
and next deployment will pick up and update the WebApp.
So no need for anyone to log-in and update.
Our final decision was to give up on using ARM exclusively. The Service Principal solution, through the SDK, would allow us to use a Web Job or a Site Extension to perform (automatic or prompted) updates that included configuration changes. However, it would require "too many" privileges - why would a customer trust an application that can, at will, create new resources or update existing ones to increase his Azure bill?
The decision was made to utilize Powershell only for updates - if the customer can see the scripts and authenticate himself, this is not a concern. Sadly, this increases update complexity, but we found it to be a necessary evil.

Resources