Terraform-provider-azurerm: CORS settings for App Service

Created on 7 Feb 2019  ·  7Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The azurerm_app_service object does currently not support editing CORS settings, and I can't find any issues that cover this. Are there any plans to implement this that have not been logged yet? If not, I might take a stab at implementing it (the SDK has support for it, so it should be pretty straightforward).

New or Affected Resource(s)

  • azurerm_app_service (both resource and data source)

Potential Terraform Configuration


I imagine something like this:

resource "azurerm_app_service" {
  # name, resource_group etc

  cors = {
    allowed_origins     = ["http://foo.bar", "http://baz"] # default empty
    support_credentials = true                             # default false
  }
}    

References

  • There's an open issue for the same thing in function apps, #1374, and one for blob storage, #19, but those are orthogonal to this one.
enhancement servicapp-service

Most helpful comment

All 7 comments

@tomasaschan Unfortunately Microsoft does not support setting the support_credentials property through their SDK as of now. There is however support for allowed_origins, so I might look into this in the upcoming days and add a PR for that!

@katbyte Should we perhaps move support_credentials into a new issue and label it with upstream-microsoft?

@joakimhew

@katbyte Should we perhaps move support_credentials into a new issue and label it with upstream-microsoft?

As that's missing from the SDK (and thus the Azure API Specs) I'd suggest opening an issue about the support_credentials flag on this repository so that that can be added, rather than tracking that here (at least until it's available)?

@joakimhew @tombuildsstuff Are you sure it's missing? I haven't looked that closely, but there's at least a reference to it in services\web\mgmt\2018-02-01\web\models.go (line 6898) in the SDK that indicates it knows about it.

@tomasaschan Hmm you're right, it seems to be there. It was added 26 days ago though so might explain why we don't have it in the SDK referenced in the provider yet:

models #L6894

@tombuildsstuff Since it was added quite recently to the SDK, I'm supposing it would be available here too soon, right?

Edit:

Here's the specific commit that added SupportCredentials:
3e1219644c98904f5d7328f9a608bd35cb412b04

It was realsed in 25.1.0

We are currently using 24.0.0

@joakimhew @tomasaschan good spot - we can look to upgrade the Azure SDK to v25.1.0 in v1.23.0 of the Provider :)

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings