try to fix 201-vmss-packer-jumpbox
This commit is contained in:
parent
c35766fb83
commit
6d61deaee5
@ -35,6 +35,14 @@ variable "image_resource_group_name" {
|
|||||||
default = "myPackerImages"
|
default = "myPackerImages"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "oidc_request_url" {
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "oidc_request_token" {
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
# arm builder
|
# arm builder
|
||||||
source "azure-arm" "builder" {
|
source "azure-arm" "builder" {
|
||||||
client_id = var.client_id
|
client_id = var.client_id
|
||||||
@ -48,6 +56,8 @@ source "azure-arm" "builder" {
|
|||||||
os_type = "Linux"
|
os_type = "Linux"
|
||||||
subscription_id = var.subscription_id
|
subscription_id = var.subscription_id
|
||||||
tenant_id = var.tenant_id
|
tenant_id = var.tenant_id
|
||||||
|
oidc_request_url = var.oidc_request_url
|
||||||
|
oidc_request_token = var.oidc_request_token
|
||||||
vm_size = "Standard_DS2_v2"
|
vm_size = "Standard_DS2_v2"
|
||||||
azure_tags = {
|
azure_tags = {
|
||||||
"dept" : "Engineering",
|
"dept" : "Engineering",
|
||||||
|
@ -127,6 +127,12 @@ func test201VmssPackerJumpbox(t *testing.T) {
|
|||||||
if tenantId := os.Getenv("ARM_TENANT_ID"); tenantId != "" {
|
if tenantId := os.Getenv("ARM_TENANT_ID"); tenantId != "" {
|
||||||
packerVars["tenant_id"] = tenantId
|
packerVars["tenant_id"] = tenantId
|
||||||
}
|
}
|
||||||
|
if oidcRequestToken := os.Getenv("ACTIONS_ID_TOKEN_REQUEST_TOKEN"); oidcRequestToken != "" {
|
||||||
|
packerVars["oidc_request_token"] = oidcRequestToken
|
||||||
|
}
|
||||||
|
if oidcRequestUrl := os.Getenv("ACTIONS_ID_TOKEN_REQUEST_URL"); oidcRequestUrl != "" {
|
||||||
|
packerVars["oidc_request_url"] = oidcRequestUrl
|
||||||
|
}
|
||||||
patches := gomonkey.ApplyFunc(shell.RunCommandAndGetOutputE, func(t terratest.TestingT, command shell.Command) (string, error) {
|
patches := gomonkey.ApplyFunc(shell.RunCommandAndGetOutputE, func(t terratest.TestingT, command shell.Command) (string, error) {
|
||||||
output, err := shell.RunCommandAndGetStdOutE(t, command)
|
output, err := shell.RunCommandAndGetStdOutE(t, command)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user