Skip to content

Commit

Permalink
Config fixes (#242)
Browse files Browse the repository at this point in the history
* terraform for OCI

* fix

* Connection config input type fix

* Update task.json

* Update oci-terraform-command-handler.ts

---------

Co-authored-by: mericstam <manuel.ericstam@gmail.com>
  • Loading branch information
mikarinneoracle and mericstam authored Oct 7, 2024
1 parent e4fc871 commit 4a8e1e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export class TerraformCommandHandlerOCI extends BaseTerraformCommandHandler {
//PAR = OCI Object Storage preauthenticated request (for the statefile bucket)

// Instead, will create a backend.tf config file for it in-flight when generate option was selected 'yes' (the default setting)
if(tasks.getInput("backendOCIBucketConfigGenerate", true) == 'yes')
if(tasks.getInput("backendOCIConfigGenerate", true) == 'yes')
{
tasks.debug('Generating backend tf statefile config.');
var config = "";
config = config + "terraform {\n backend \"http\" {\n";
config = config + " address = \"" + tasks.getInput("backendOCIBucketPar", true) + "\"\n";
config = config + " address = \"" + tasks.getInput("backendOCIPar", true) + "\"\n";
config = config + " update_method = \"PUT\"\n }\n }\n";

const workingDirectory = tasks.getInput("workingDirectory");
Expand Down Expand Up @@ -69,4 +69,4 @@ export class TerraformCommandHandlerOCI extends BaseTerraformCommandHandler {
process.env['TF_VAR_private_key_path'] = `${privateKeyFilePath}`;
}
}
}
}
8 changes: 4 additions & 4 deletions Tasks/TerraformTask/TerraformTaskV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,15 @@
"groupName": "backendOCI"
},
{
"name": "backendOCIBucketPar",
"name": "backendOCIPar",
"type": "string",
"label": "Bucket PAR for Terraform remote state file",
"label": "PAR for Terraform remote state file",
"required": false,
"helpMarkDown": "The OCI storage bucket PAR configuration for the Terraform remote state file (optional)",
"helpMarkDown": "The OCI object storage PAR configuration for the Terraform remote state file (optional)",
"groupName": "backendOCI"
},
{
"name": "backendOCIBucketConfigGenerate",
"name": "backendOCIConfigGenerate",
"type": "pickList",
"label": "Generate the Terraform remote state file config (Use Yes when not included in TF files)",
"required": true,
Expand Down
2 changes: 1 addition & 1 deletion azure-devops-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
"name": "Tenancy OCID",
"description": "OCI tenancy OCID",
"inputMode": "textbox",
"isConfidential": true,
"isConfidential": false,
"validation": {
"isRequired": true,
"dataType": "string"
Expand Down

0 comments on commit 4a8e1e0

Please sign in to comment.