Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clouddrove/terraform-azure-app-service
This terraform module is designed to create Azure Databricks resources. Azure App Service is an HTTP-based service for hosting web applications, REST APIs, and mobile back ends. You can develop in your favorite language, be it . NET, . NET Core, Java, Ruby, Node
https://github.com/clouddrove/terraform-azure-app-service
azure azure-app-service clouddrove hcl terraform terraform-azure terraform-azurerm terraform-module terraform-modules
Last synced: 4 days ago
JSON representation
This terraform module is designed to create Azure Databricks resources. Azure App Service is an HTTP-based service for hosting web applications, REST APIs, and mobile back ends. You can develop in your favorite language, be it . NET, . NET Core, Java, Ruby, Node
- Host: GitHub
- URL: https://github.com/clouddrove/terraform-azure-app-service
- Owner: clouddrove
- License: apache-2.0
- Created: 2023-04-04T18:08:05.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-17T09:23:06.000Z (2 months ago)
- Last Synced: 2024-09-17T18:46:17.850Z (2 months ago)
- Topics: azure, azure-app-service, clouddrove, hcl, terraform, terraform-azure, terraform-azurerm, terraform-module, terraform-modules
- Language: HCL
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Terraform AZURE APP SERVICE
Terraform module to create app-service resource on AZURE.
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy Bigger problems are always solved by breaking them into smaller manageable problems. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller connected yet manageable pieces within the infrastructure.
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
We have [*fifty plus terraform modules*][terraform_modules]. A few of them are comepleted and are available for open source usage while a few others are in progress.
## Prerequisites
This module has a few dependencies:
- [Terraform 1.x.x](https://learn.hashicorp.com/terraform/getting-started/install.html)
- [Go](https://golang.org/doc/install)
- [github.com/stretchr/testify/assert](https://github.com/stretchr/testify)
- [github.com/gruntwork-io/terratest/modules/terraform](https://github.com/gruntwork-io/terratest)## Examples
**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/clouddrove/terraform-azure-app-service/releases).
### Simple Example
Here is an example of how you can use this module in your inventory structure:
#### Default App Service with NODE
```hcl
module "key_vault" {
source = "clouddrove/app-service/azure"
version = "1.0.0"
enabled = true
name = "app"
environment = "test"
label_order = ["name", "environment", ]
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_locationservice_plan = {
kind = "Windows"
size = "S1"
tier = "Free"
}app_service_name = "test-app-service"
enable_client_affinity = true
enable_https = truesite_config = {
use_32_bit_worker_process = true
windows_fx_version = "node|18-lts"
}app_settings = {
WEBSITE_NODE_DEFAULT_VERSION = "~16"
}
}
```## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| active\_directory\_auth\_setttings | Acitve directory authentication provider settings for app service | `any` | `{}` | no |
| addon\_resource\_group\_name | The name of the addon vnet resource group | `string` | `""` | no |
| addon\_vent\_link | The name of the addon vnet | `bool` | `false` | no |
| addon\_virtual\_network\_id | The name of the addon vnet link vnet id | `string` | `""` | no |
| app\_insights\_name | The Name of the application insights | `string` | `""` | no |
| app\_service\_name | Specifies the name of the App Service. | `string` | `""` | no |
| app\_settings | A key-value pair of App Settings. | `map(string)` | `{}` | no |
| application\_insights\_enabled | Specify the Application Insights use for this App Service | `bool` | `true` | no |
| application\_insights\_id | Resource ID of the existing Application Insights | `any` | `null` | no |
| application\_insights\_type | Specifies the type of Application Insights to create. Valid values are `ios` for iOS, `java` for Java web, `MobileCenter` for App Center, `Node.JS` for Node.js, `other` for General, `phone` for Windows Phone, `store` for Windows Store and `web` for ASP.NET. | `string` | `"web"` | no |
| connection\_strings | Connection strings for App Service | `list(map(string))` | `[]` | no |
| default\_auth\_provider | The default provider to use when multiple providers have been set up. Possible values are `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount` and `Twitter` | `string` | `"AzureActiveDirectory"` | no |
| disable\_ip\_masking | By default the real client ip is masked as `0.0.0.0` in the logs. Use this argument to disable masking and log the real client ip | `bool` | `false` | no |
| enable\_auth\_settings | Specifies the Authenication enabled or not | `bool` | `false` | no |
| enable\_client\_affinity | Should the App Service send session affinity cookies, which route client requests in the same session to the same instance? | `bool` | `false` | no |
| enable\_client\_certificate | Does the App Service require client certificates for incoming requests | `bool` | `false` | no |
| enable\_https | Can the App Service only be accessed via HTTPS? | `bool` | `false` | no |
| enable\_private\_endpoint | enable or disable private endpoint to storage account | `bool` | `false` | no |
| enable\_vnet\_integration | Manages an App Service Virtual Network Association | `bool` | `false` | no |
| enabled | Set to false to prevent the module from creating any resources. | `bool` | `true` | no |
| environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no |
| existing\_private\_dns\_zone | Name of the existing private DNS zone | `string` | `null` | no |
| existing\_private\_dns\_zone\_resource\_group\_name | The name of the existing resource group | `string` | `""` | no |
| identity\_ids | Specifies a list of user managed identity ids to be assigned | `any` | `null` | no |
| integration\_subnet\_id | The resource ID of the subnet | `string` | `null` | no |
| ips\_allowed | IPs restriction for App Service to allow specific IP addresses or ranges | `list(string)` | `[]` | no |
| label\_order | Label order, e.g. sequence of application name and environment `name`,`environment`,'attribute' [`webserver`,`qa`,`devops`,`public`,] . | `list(any)` | `[]` | no |
| location | Location where resource group will be created. | `string` | `null` | no |
| managedby | ManagedBy, eg ''. | `string` | `""` | no |
| name | Name (e.g. `app` or `cluster`). | `string` | `""` | no |
| repository | Terraform current module repo | `string` | `""` | no |
| resource\_group\_name | A container that holds related resources for an Azure solution | `string` | `""` | no |
| retention\_in\_days | Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730` | `number` | `90` | no |
| service\_plan | Definition of the dedicated plan to use |object({| n/a | yes |
kind = string
size = string
capacity = optional(number)
tier = string
per_site_scaling = optional(bool)
})
| site\_config | Site configuration for Application Service | `any` | `{}` | no |
| storage\_mounts | Storage account mount points for App Service | `list(map(string))` | `[]` | no |
| subnet\_id | The resource ID of the subnet | `string` | `null` | no |
| subnet\_ids\_allowed | Allow Specific Subnets for App Service | `list(string)` | `[]` | no |
| tags | A map of tags to add to all resources | `map(string)` | `{}` | no |
| token\_store\_enabled | If enabled the module will durably store platform-specific security tokens that are obtained during login flows | `bool` | `false` | no |
| unauthenticated\_client\_action | The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage` | `string` | `"RedirectToLoginPage"` | no |
| virtual\_network\_id | The name of the virtual network | `string` | `null` | no |## Outputs
| Name | Description |
|------|-------------|
| custom\_domain\_verification\_id | An identifier used by App Service to perform domain ownership verification via DNS TXT record. |
| default\_site\_hostname | The Default Hostname associated with the App Service - such as mysite.azurewebsites.net |
| id | The ID of the App Service. |
| maximum\_number\_of\_workers | The maximum number of workers supported with the App Service Plan's sku. |
| outbound\_ip\_address\_list | A list of outbound IP addresses - such as ['52.23.25.3', '52.143.43.12'] |
| outbound\_ip\_addresses | A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12 |
| possible\_outbound\_ip\_address\_list | A list of outbound IP addresses - such as ['52.23.25.3', '52.143.43.12', '52.143.43.17'] - not all of which are necessarily in use. Superset of outbound\_ip\_address\_list |
| possible\_outbound\_ip\_addresses | A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound\_ip\_addresses |
| service\_plan\_id | The ID of the App Service Plan component. |
| site\_credential | A site\_credential block as defined below, which contains the site-level credentials used to publish to this App Service. |
| source\_control | A source\_control block as defined below, which contains the Source Control information when scm\_type is set to LocalGit. |## Testing
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.You need to run the following command in the testing folder:
```hcl
go test -run Test
```## Feedback
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-azure-app-service/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]).If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-azure-app-service)!
## About us
At [CloudDrove][website], we offer expert guidance, implementation support and services to help organisations accelerate their journey to the cloud. Our services include docker and container orchestration, cloud migration and adoption, infrastructure automation, application modernisation and remediation, and performance engineering.
We are The Cloud Experts!
We ❤️ Open Source and you can check out our other modules to get help with your new Cloud ideas.
[website]: https://clouddrove.com
[github]: https://github.com/clouddrove
[linkedin]: https://cpco.io/linkedin
[twitter]: https://twitter.com/clouddrove/
[email]: https://clouddrove.com/contact-us.html
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=