Skip to content

Commit

Permalink
Updated constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jbristowe committed Sep 27, 2020
1 parent 8cbac76 commit a679aec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions octopusdeploy/constants.go
Expand Up @@ -101,6 +101,7 @@ const (
constPackageID string = "package_id"
constPackageRequirement string = "package_requirement"
constPassword string = "password"
constPGPKey string = "pgp_key"
constPhase string = "phase"
constPrimaryPackage string = "primary_package"
constProject string = "project"
Expand All @@ -119,6 +120,7 @@ const (
constRule string = "rule"
constRunKubectlScriptAction string = "run_kubectl_script_action"
constRunOnServer string = "run_on_server"
constRunScriptAction string = "run_script_action"
constScope string = "scope"
constScriptParameters string = "script_parameters"
constScriptFileName string = "script_file_name"
Expand Down Expand Up @@ -174,7 +176,5 @@ const (
IsDefault2 string = "isdefault"
IsInProcess string = "isinprocess"
MachinePolicy string = "machinepolicy"
PGPKey string = "pgp_key"
RunScriptAction string = "run_script_action"
StatusSummary string = "statussummary"
)
4 changes: 2 additions & 2 deletions octopusdeploy/deployment_step.go
Expand Up @@ -74,7 +74,7 @@ func getDeploymentStepSchema() *schema.Schema {
constApplyTerraformAction: getApplyTerraformActionSchema(),
constDeployPackageAction: getDeployPackageAction(),
constDeployWindowsServiceAction: getDeployWindowsServiceActionSchema(),
"run_script_action": getRunScriptActionSchema(),
constRunScriptAction: getRunScriptActionSchema(),
constRunKubectlScriptAction: getRunRunKubectlScriptSchema(),
constDeployKubernetesSecretAction: getDeployKubernetesSecretActionSchema(),
},
Expand Down Expand Up @@ -141,7 +141,7 @@ func buildDeploymentStepResource(tfStep map[string]interface{}) model.Deployment
}
}

if attr, ok := tfStep["run_script_action"]; ok {
if attr, ok := tfStep[constRunScriptAction]; ok {
for _, tfAction := range attr.([]interface{}) {
action := buildRunScriptActionResource(tfAction.(map[string]interface{}))
step.Actions = append(step.Actions, action)
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/resource_variable.go
Expand Up @@ -83,7 +83,7 @@ func resourceVariable() *schema.Resource {
},
},
},
"pgp_key": {
constPGPKey: {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Expand Down

0 comments on commit a679aec

Please sign in to comment.