Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a terraform script to deploy application to Azure app service #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gomtimehta
Copy link
Contributor

Add a new Azure App Service resource and update README for deployment instructions.

  • Azure App Service Resource

    • Add azurerm_app_service resource for application deployment.
    • Set app_service_plan_id, location, name, resource_group_name, and https_only attributes.
    • Configure site_config block with min_tls_version set to "1.2".
    • Add auth_settings block with enabled set to true.
    • Add connection_string block with necessary connection string details.
  • README Update

    • Update Azure Setup section to include instructions for deploying the application to Azure App Service.
    • Add a new subsection for application deployment under the Azure Setup section.
    • Provide detailed steps for creating the Azure App Service and deploying the application.

Add a new Azure App Service resource and update README for deployment instructions.

* **Azure App Service Resource**
  - Add `azurerm_app_service` resource for application deployment.
  - Set `app_service_plan_id`, `location`, `name`, `resource_group_name`, and `https_only` attributes.
  - Configure `site_config` block with `min_tls_version` set to "1.2".
  - Add `auth_settings` block with `enabled` set to true.
  - Add `connection_string` block with necessary connection string details.

* **README Update**
  - Update Azure Setup section to include instructions for deploying the application to Azure App Service.
  - Add a new subsection for application deployment under the Azure Setup section.
  - Provide detailed steps for creating the Azure App Service and deploying the application.
Comment on lines +35 to +55
resource "azurerm_app_service" "app-service3" {
app_service_plan_id = azurerm_app_service_plan.example.id
location = var.location
name = "terragoat-app-service-${var.environment}-deployment"
resource_group_name = azurerm_resource_group.example.name
https_only = true

site_config {
min_tls_version = "1.2"
}

auth_settings {
enabled = true
}

connection_string {
name = "MyConnectionString"
type = "SQLAzure"
value = "Server=tcp:myserver.database.windows.net,1433;Database=mydatabase;User ID=myuser;Password=mypassword;Encrypt=true;Connection Timeout=30;"
}
}

Check notice

Code scanning / Trivy

Web App accepts incoming client certificate Low

Artifact: terraform/azure/app_service.tf
Type: terraform
Vulnerability AVD-AZU-0001
Severity: LOW
Message: App service does not have client certificates enabled.
Link: AVD-AZU-0001
Comment on lines +35 to +55
resource "azurerm_app_service" "app-service3" {
app_service_plan_id = azurerm_app_service_plan.example.id
location = var.location
name = "terragoat-app-service-${var.environment}-deployment"
resource_group_name = azurerm_resource_group.example.name
https_only = true

site_config {
min_tls_version = "1.2"
}

auth_settings {
enabled = true
}

connection_string {
name = "MyConnectionString"
type = "SQLAzure"
value = "Server=tcp:myserver.database.windows.net,1433;Database=mydatabase;User ID=myuser;Password=mypassword;Encrypt=true;Connection Timeout=30;"
}
}

Check notice

Code scanning / Trivy

Web App has registration with AD enabled Low

Artifact: terraform/azure/app_service.tf
Type: terraform
Vulnerability AVD-AZU-0002
Severity: LOW
Message: App service does not have an identity type.
Link: AVD-AZU-0002
Comment on lines +42 to +44
site_config {
min_tls_version = "1.2"
}

Check notice

Code scanning / Trivy

Web App uses the latest HTTP version Low

Artifact: terraform/azure/app_service.tf
Type: terraform
Vulnerability AVD-AZU-0005
Severity: LOW
Message: App service does not have HTTP/2 enabled.
Link: AVD-AZU-0005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant