OfficeDev / TeamsFx

Developer tools for building Teams apps
Other
427 stars 165 forks source link

Provisioning in the cloud issues. #1846

Closed KristapsD closed 2 years ago

KristapsD commented 2 years ago

Hello! The current situation is the following: we've created a custom teams app, and we want to provision it in the cloud through Teams Toolkit extension for VSC. However, when provisioning it, we get an error, saying that it can't create a resource group for the app. What we want to do is define a previously created resource group for it to use. For example, it's trying to provision eParaksts-rg, but we want it to use a previously made resource group - eparaksts-dev-westeu-rg. Where can we define the resource group we want it to use?

Another problem is also that it's trying to provision resources in EAST US when our companys policy only allows resources in WEST EU, where do we change the default from EAST US to WEST EU?

ghost commented 2 years ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

MuyangAmigo commented 2 years ago

Hi @KristapsD, Thanks for your feedback! We are in the progress of enabling resource provision using ARM templates and you will be able to customize the regions and resource groups. We will enable this feature with an early preview soon so please stay tuned!

KristapsD commented 2 years ago

hi! @MuyangAmigo thanks for your response, how soon are we talking? because we need this ASAP. Or maybe there is some work around that we can do for now?

MuyangAmigo commented 2 years ago

Hey @KristapsD, may I understand what capabilities/resources (tab, bot, function, SQL, etc., ) you have included in your Teams app project? We have an early version that supports ARM right now but it's limited to the tab the only project, wondering if that would be sufficient for you right now. Meanwhile, let me find out what workarounds we can do right now.

KristapsD commented 2 years ago

@MuyangAmigo The teams app is using the following capabilities:

And the language im using is react.

KristapsD commented 2 years ago

For now we've decided to provision the teams app, where it wants to provision itself, but this feature is still going to be needed.

galytoh commented 2 years ago

Hey @MuyangAmigo, @KristapsD!

We have an early version that supports ARM right now but it's limited to the tab the only project,

Do we have any updates guys? If yes, where can we get this early version?

We have exactly the same configuration and needs as @KristapsD. We stay tuned!

MuyangAmigo commented 2 years ago

Hey, we have included a preview feature in the latest Teams Toolkit with ARM support, if you wish to give it a try, please follow the Wiki Page to Enable ARM Support! Feel free to raise an issue should you meet any problems.

schinna commented 2 years ago

@MuyangAmigo : Did not work for me. Please let me know if you have any reference.

shuenSL commented 2 years ago

Hello, I too need the ability to specify my geolocation badly. I enabled ARM support but encountered the following errors. I see the folder .\infra\azure\parameters was created but it is empty. Please advise. Thanks. .... [Error] - [Teams Toolkit] Failed to get expanded parameter from c:_codes\sample01\infra\azure\parameters\parameters.template.json. [Error] - fail to provision 'sh-sample01' in the cloud! .... .... [Info] - [core] finish task:provisionResources [Error] - code:Teams Toolkit.FailedToDeployArmTemplatesToAzure, message: ENOENT: no such file or directory, open 'c:_codes\sample01\infra\azure\parameters\parameters.template.json', stack: FailedToDeployArmTemplatesToAzure: ENOENT: no such file or directory, open 'c:_codes\sample01\infra\azure\parameters\parameters.template.json'

MuyangAmigo commented 2 years ago

Just want to make some more updates in this thread:

I'm closing this thread for now, but feel free to report any issues you have encountered with the insider features.

Thanks a lot for the interest and continuous feedback!

KristapsD commented 2 years ago

@MuyangAmigo When trying to provision into a rg. it's showing me this error in the activity log of specified rg.

Deployment template validation failed: 'The template parameters 'identity_managedIdentityName' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'resourceBaseName, frontendHosting_storageName, m365ClientId, m365ClientSecret, m365TenantId, m365OauthAuthorityHost, function_serverfarmsName, function_webappName, function_storageName, simpleAuth_sku, simpleAuth_serverFarmsName, simpleAuth_webAppName, simpleAuth_packageUri'. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'.

blackchoey commented 2 years ago

@KristapsD Can you remove identity_managedIdentityName from .fx/config/azure.parameters.{your_env_name}.json and try again? ARM does not allow passing extra parameters when provision. According to the error message, identity_managedIdentityName does not exist in the ARM template (authored in bicep) so it cannot be included in .fx/config/azure.parameters.{your_env_name}.json.

By the way, can you help recall what modifications have you made to .fx/config/azure.parameters.{your_env_name}.json and bicep files under templates/azure/? So I can try to figure out how can I improve your experience on such kind of errors. Thanks!

ghost commented 2 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

ghost commented 2 years ago

Due to lack of details for further investigation, we will archive the issue for now. In case you still have following-up questions on this issue, please always feel free to reopen the issue by clicking ‘reopen issue’ button below the comment box. We will get back to you as soon as possible.