Skip to content

Commit

Permalink
Type updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AdminTurnedDevOps committed Sep 23, 2020
1 parent 6f7c406 commit 4f174b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions octopusdeploy/deploy_package.go
Expand Up @@ -22,6 +22,7 @@ func getDeployPackageAction() *schema.Schema {
}

func buildDeployPackageActionResource(tfAction map[string]interface{}) model.DeploymentAction {

action := buildDeploymentActionResource(tfAction)
action.ActionType = "Octopus.TentaclePackage"
addWindowsServiceFeatureToActionResource(tfAction, action)
Expand Down
12 changes: 4 additions & 8 deletions octopusdeploy/resource_aws_account.go
Expand Up @@ -108,11 +108,11 @@ func buildAmazonWebServicesAccountResource(d *schema.ResourceData) (*model.Accou

func resourceAmazonWebServicesAccountCreate(d *schema.ResourceData, m interface{}) error {
if d == nil {
return createInvalidParameterError("resourceAzureServicePrincipalRead", "d")
return createInvalidParameterError("resourceAmazonWebServicesAccountCreate", "d")
}

if m == nil {
return createInvalidParameterError("resourceAzureServicePrincipalRead", "m")
return createInvalidParameterError("resourceAmazonWebServicesAccountCreate", "m")
}

apiClient := m.(*client.Client)
Expand All @@ -135,15 +135,11 @@ func resourceAmazonWebServicesAccountCreate(d *schema.ResourceData, m interface{

func resourceAmazonWebServicesAccountUpdate(d *schema.ResourceData, m interface{}) error {
if d == nil {
return createInvalidParameterError("resourceAzureServicePrincipalRead", "d")
return createInvalidParameterError("resourceAmazonWebServicesAccountUpdate", "d")
}

if m == nil {
return createInvalidParameterError("resourceAzureServicePrincipalRead", "m")
}

if d == nil {
return createInvalidParameterError("resourceAmazonWebServicesAccountUpdate", "d")
return createInvalidParameterError("resourceAmazonWebServicesAccountUpdate", "m")
}

account, err := buildAmazonWebServicesAccountResource(d)
Expand Down
4 changes: 2 additions & 2 deletions octopusdeploy/resource_certificate.go
Expand Up @@ -26,7 +26,7 @@ func resourceCertificate() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"certificate_data": {
CertificateData: {
Type: schema.TypeString,
Required: true,
Sensitive: true,
Expand Down Expand Up @@ -68,7 +68,7 @@ func resourceCertificateRead(d *schema.ResourceData, m interface{}) error {
certificateID := d.Id()
certificate, err := apiClient.Certificates.Get(certificateID)

if err == client.ErrItemNotFound {
if certificate == nil {
d.SetId("")
return nil
}
Expand Down

0 comments on commit 4f174b1

Please sign in to comment.