-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new Compute VM pipelines, update param descriptions, and update o…
…utput for composite mod (#5)
- Loading branch information
Showing
46 changed files
with
242 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
pipelines/compute/get_compute_virtual_machine_instance_view.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
pipeline "get_compute_virtual_machine_instance_view" { | ||
title = "Get Compute Virtual Machine Instance View" | ||
description = "Get the instance view of a compute virtual machine." | ||
|
||
param "subscription_id" { | ||
type = string | ||
description = local.subscription_id_param_description | ||
default = var.subscription_id | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "resource_group" { | ||
type = string | ||
description = local.resource_group_param_description | ||
default = var.resource_group | ||
} | ||
|
||
param "vm_name" { | ||
type = string | ||
description = "The name of the Virtual Machine." | ||
} | ||
|
||
param "tenant_id" { | ||
type = string | ||
description = local.tenant_id_param_description | ||
default = var.tenant_id | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "client_secret" { | ||
type = string | ||
description = local.client_secret_param_description | ||
default = var.client_secret | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "client_id" { | ||
type = string | ||
description = local.client_id_param_description | ||
default = var.client_id | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "query" { | ||
type = string | ||
description = "A JMESPath query to use in filtering the response data." | ||
optional = true | ||
} | ||
|
||
step "container" "get_compute_virtual_machine_instance_view" { | ||
image = "my-azure-image" | ||
cmd = concat( | ||
["vm", "get-instance-view", "--name", param.vm_name, "-g", param.resource_group, "--subscription", param.subscription_id], | ||
param.query != null ? ["--query", param.query] : [], | ||
) | ||
|
||
env = { | ||
AZURE_TENANT_ID = param.tenant_id | ||
AZURE_CLIENT_ID = param.client_id | ||
AZURE_CLIENT_SECRET = param.client_secret | ||
} | ||
} | ||
|
||
output "stdout" { | ||
description = "The standard output stream from the Azure CLI." | ||
value = jsondecode(step.container.get_compute_virtual_machine_instance_view.stdout) | ||
} | ||
|
||
output "stderr" { | ||
description = "The standard error stream from the Azure CLI." | ||
value = step.container.get_compute_virtual_machine_instance_view.stderr | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
pipeline "list_compute_virtual_machines" { | ||
title = "List Compute Virtual Machines" | ||
description = "List Compute Virtual Machines." | ||
|
||
param "subscription_id" { | ||
type = string | ||
description = local.subscription_id_param_description | ||
default = var.subscription_id | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "resource_group" { | ||
type = string | ||
description = local.resource_group_param_description | ||
default = var.resource_group | ||
} | ||
|
||
param "tenant_id" { | ||
type = string | ||
description = local.tenant_id_param_description | ||
default = var.tenant_id | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "client_secret" { | ||
type = string | ||
description = local.client_secret_param_description | ||
default = var.client_secret | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "client_id" { | ||
type = string | ||
description = local.client_id_param_description | ||
default = var.client_id | ||
# TODO: Add once supported | ||
#sensitive = true | ||
} | ||
|
||
param "query" { | ||
type = string | ||
description = "A JMESPath query to use in filtering the response data." | ||
optional = true | ||
} | ||
|
||
step "container" "list_compute_virtual_machines" { | ||
image = "my-azure-image" | ||
cmd = concat( | ||
["vm", "list", "-g", param.resource_group, "--subscription", param.subscription_id], | ||
param.query != null ? ["--query", param.query] : [], | ||
) | ||
|
||
env = { | ||
AZURE_TENANT_ID = param.tenant_id | ||
AZURE_CLIENT_ID = param.client_id | ||
AZURE_CLIENT_SECRET = param.client_secret | ||
} | ||
} | ||
|
||
output "stdout" { | ||
description = "The standard output stream from the Azure CLI." | ||
value = jsondecode(step.container.list_compute_virtual_machines.stdout) | ||
} | ||
|
||
output "stderr" { | ||
description = "The standard error stream from the Azure CLI." | ||
value = step.container.list_compute_virtual_machines.stderr | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.