Skip to content

Commit

Permalink
Release/v0.2.0 (#18)
Browse files Browse the repository at this point in the history

Co-authored-by: Graza <[email protected]>
Co-authored-by: ParthaI <[email protected]>
Co-authored-by: khushboosharma <[email protected]>
Co-authored-by: Khushboo <[email protected]>
  • Loading branch information
5 people authored Jul 24, 2024
1 parent 5fe0786 commit 7db0703
Show file tree
Hide file tree
Showing 41 changed files with 1,574 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.2.0 [2024-07-24]

_What's new?_

- Added 36 new pipelines for seamless integration with your App Service, Compute, IAM, Key Vault, Network resources, and more.

## v0.1.1 [2024-03-04]

_Bug fixes_
Expand Down
45 changes: 45 additions & 0 deletions pipelines/appservice/assign_appservice_webapp_identity.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
pipeline "assign_appservice_webapp_identity" {
title = "Assign Managed Identity to AppService Web App"
description = "Assign a managed identity to an Azure AppService Web App."

tags = {
type = "featured"
}

param "cred" {
type = string
description = local.cred_param_description
default = "default"
}

param "subscription_id" {
type = string
description = local.subscription_id_param_description
}

param "resource_group" {
type = string
description = local.resource_group_param_description
}

param "app_name" {
type = string
description = "Name of the AppService web app."
}

step "container" "assign_appservice_webapp_identity" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = [
"webapp", "identity", "assign",
"--resource-group", param.resource_group,
"--name", param.app_name
]

env = credential.azure[param.cred].env
}

output "assign_appservice_webapp_identity" {
description = "The assigned managed identity for the web app."
value = jsondecode(step.container.assign_appservice_webapp_identity.stdout)
}
}
32 changes: 32 additions & 0 deletions pipelines/appservice/delete_app_service_plan.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
pipeline "delete_app_service_plan" {
title = "Delete App Service Plan"
description = "Delete an Azure App Service Plan."

param "cred" {
type = string
description = "The credentials to use for authentication."
default = "default"
}

param "subscription_id" {
type = string
description = "The Azure subscription ID."
}

param "resource_group" {
type = string
description = "The name of the resource group that contains the App Service Plan."
}

param "service_plan_name" {
type = string
description = "The name of the App Service Plan that is being deleted."
}

step "container" "delete_app_service_plan" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["appservice", "plan", "delete", "--yes", "-g", param.resource_group, "--subscription", param.subscription_id, "-n", param.service_plan_name]

env = credential.azure[param.cred].env
}
}
63 changes: 63 additions & 0 deletions pipelines/appservice/set_ftps_config_appservice_webapp.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
pipeline "set_config_appservice_webapp" {
title = "Set Configuration for AppService Web App"
description = "Set the configuration for an Azure Web App."

tags = {
type = "featured"
}

param "cred" {
type = string
description = local.cred_param_description
default = "default"
}

param "subscription_id" {
type = string
description = local.subscription_id_param_description
}

param "resource_group" {
type = string
description = local.resource_group_param_description
}

param "app_name" {
type = string
description = "Name of the web app."
}

param "ftps_state" {
type = string
description = "FTPS state for the web app. Accepted values: disabled, FtpsOnly."
optional = true
}

param "enable_http2" {
type = bool
description = "Enable HTTP/2 for the web app."
optional = true
}

param "tls_version" {
type = string
description = "The TLS version to be updated."
optional = true
}

step "container" "set_config_appservice_webapp" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = concat(
["webapp", "config", "set", "--resource-group", param.resource_group, "--name", param.app_name],
param.ftps_state != null ? concat(["--ftps-state", param.ftps_state]) : [],
param.enable_http2 != null ? ["--http20-enabled", "true"] : [],
param.tls_version != null ? concat(["--min-tls-version", param.tls_version]) : []
)
env = credential.azure[param.cred].env
}

output "config_webapp" {
description = "The updated configuration settings for the web app."
value = jsondecode(step.container.set_config_appservice_webapp.stdout)
}
}
51 changes: 51 additions & 0 deletions pipelines/appservice/update_appservice_webapp.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
pipeline "update_appservice_webapp" {
title = "Update AppService Web App"
description = "Update setting for an Azure Web App."

tags = {
type = "featured"
}

param "cred" {
type = string
description = local.cred_param_description
default = "default"
}

param "subscription_id" {
type = string
description = local.subscription_id_param_description
}

param "resource_group" {
type = string
description = local.resource_group_param_description
}

param "app_name" {
type = string
description = "Name of the web app."
}

param "https_only" {
type = bool
description = "Enable or disable HTTPS only for the web app."
}

step "container" "update_appservice_webapp" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = [
"webapp", "update",
"--resource-group", param.resource_group,
"--name", param.app_name,
"--set", "httpsOnly=${param.https_only}"
]

env = credential.azure[param.cred].env
}

output "update_appservice_webapp" {
description = "The updated setting for the web app."
value = jsondecode(step.container.update_appservice_webapp.stdout)
}
}
48 changes: 48 additions & 0 deletions pipelines/appservice/update_appservice_webapp_auth.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pipeline "update_appservice_webapp_auth" {
title = "Update AppService Web App Authentication"
description = "Update the authentication settings of an Azure Web App."

tags = {
type = "featured"
}

param "cred" {
type = string
description = local.cred_param_description
default = "default"
}

param "subscription_id" {
type = string
description = local.subscription_id_param_description
}

param "resource_group" {
type = string
description = local.resource_group_param_description
}

param "app_name" {
type = string
description = "Name of the web app."
}

param "enabled" {
type = bool
description = "Enable or disable authentication for the web app."
}

step "container" "update_appservice_webapp_auth" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = concat(
["webapp", "auth", "update", "--resource-group", param.resource_group, "--name", param.app_name, "--enabled", tostring(param.enabled)]
)

env = credential.azure[param.cred].env
}

output "webapp_auth" {
description = "The updated web app authentication settings."
value = jsondecode(step.container.update_appservice_webapp_auth.stdout)
}
}
4 changes: 0 additions & 4 deletions pipelines/compute/delete_compute_disk.fp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ pipeline "delete_compute_disk" {
env = credential.azure[param.cred].env
}

output "disk" {
description = "The deleted compute disk details."
value = jsondecode(step.container.delete_compute_disk.stdout)
}
}
6 changes: 1 addition & 5 deletions pipelines/compute/delete_compute_snapshot.fp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ pipeline "delete_compute_snapshot" {

step "container" "delete_compute_snapshot" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["snapshot", "delete", "--yes", "-g", param.resource_group, "-n", param.snapshot_name, "--subscription", param.subscription_id]
cmd = ["snapshot", "delete", "-g", param.resource_group, "-n", param.snapshot_name, "--subscription", param.subscription_id]

env = credential.azure[param.cred].env
}

output "snapshot" {
description = "The deleted compute snapshot details."
value = jsondecode(step.container.delete_compute_snapshot.stdout)
}
}
33 changes: 33 additions & 0 deletions pipelines/compute/delete_compute_virtual_machine_scale_set.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
pipeline "delete_virtual_machine_scale_set" {
title = "Delete Virtual Machine Scale Set"
description = "Delete an Azure Virtual Machine Scale Set."

param "cred" {
type = string
description = "The credentials to use for authentication."
default = "default"
}

param "subscription_id" {
type = string
description = "The Azure subscription ID."
}

param "resource_group" {
type = string
description = "The name of the resource group that contains the App Service Plan."
}

param "vmss_name" {
type = string
description = "The name of the Virtual Machine Scale Set."
default = "test9000"
}

step "container" "delete_virtual_machine_scale_set" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["vmss", "delete", "-g", param.resource_group, "-n", param.vmss_name, "--subscription", param.subscription_id]

env = credential.azure[param.cred].env
}
}
48 changes: 48 additions & 0 deletions pipelines/compute/resize_compute_virtual_machine.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pipeline "resize_compute_virtual_machine" {
title = "Resize Compute Virtual Machine"
description = "Resize the properties of a VM."

param "cred" {
type = string
description = local.cred_param_description
default = "azure"
}

param "subscription_id" {
type = string
description = local.subscription_id_param_description
}

param "resource_group" {
type = string
description = local.resource_group_param_description
}

param "vm_name" {
type = string
description = "The name of the Virtual Machine."
}

param "new_size" {
type = string
description = "The new size for the Virtual Machine."
}

step "container" "resize_compute_virtual_machine" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = [
"vm", "resize",
"-g", param.resource_group,
"-n", param.vm_name,
"--subscription", param.subscription_id,
"--size", param.new_size
]

env = credential.azure[param.cred].env
}

output "virtual_machine" {
description = "The resized compute virtual machine."
value = jsondecode(step.container.resize_compute_virtual_machine.stdout)
}
}
38 changes: 38 additions & 0 deletions pipelines/compute/update_compute_snapshot.fp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
pipeline "update_compute_snapshot" {
title = "Update Compute Snapshot"
description = "Update a compute snapshot."

param "cred" {
type = string
description = local.cred_param_description
default = "default"
}

param "subscription_id" {
type = string
description = local.subscription_id_param_description
}

param "resource_group" {
type = string
description = local.resource_group_param_description
}

param "sku" {
type = string
description = "The SKU tier to be updated."
}

param "snapshot_name" {
type = string
description = "The name of the compute snapshot that is being deleted."
}

step "container" "update_compute_snapshot" {
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["snapshot", "update", "-g", param.resource_group, "-n", param.snapshot_name, "--subscription", param.subscription_id, "--sku", param.sku]

env = credential.azure[param.cred].env
}

}
Loading

0 comments on commit 7db0703

Please sign in to comment.