Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Deleting deployment template from GUI results in error on next plan #69

Open
adarobin opened this issue Aug 21, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@adarobin
Copy link

Bug Description

If a resource created via Terraform is deleted in the GUI, this will result in an error when attempting to run another terraform operation.

Normally, I think you'd check if the error returned from

omeTemplateData, err := omeClient.GetTemplateByID(templateID)
was a 404 and mark the resource as deleted.

Resource or DataSource Name

ome_template

Terraform Version

1.5.4

go Version

n/a

OME Version

3.10.0 (Build 169)

Operating System

Linux

Terraform File Used

resource "ome_template" "test" {
  name       = "Test"
  content    = file("${path.module}/template.xml")
}

Logs

╷
│ Error: Unable to read template
│ 
│ status: 400, body: {"error":{"code":"Base.1.0.GeneralError","message":"A
│ general error has occurred. See ExtendedInfo for more
│ information.","@Message.ExtendedInfo":[{"MessageId":"CTEM1026","RelatedProperties":[],"Message":"Unable
│ to process the request because the template ID 59 provided is
│ invalid.","MessageArgs":["59"],"Severity":"Informational","Resolution":"Enter
│ a valid template ID and retry the operation. For information about valid
│ template IDs. Refer to the API Guide or Product Guide available on the
│ support site."}]}}
╵


Error: Failed to perform terraform plan. Unexpected exit code: 1

Steps to Reproduce

Create an ome_template resource via terraform. Delete the resource from the GUI and run terraform plan

Expected Behavior

The Terraform plan succeeds.

If the resource is still declared in the code, create a new deployment template.

If the resource is not declared in the code, Terraform will not see changes as being necessary.

Actual Behavior

The terraform plan operation fails with the error mentioned previously.

Screenshots

No response

Additional Information

No response

@Krishnan-Priyanshu Krishnan-Priyanshu added the enhancement New feature or request label Aug 23, 2023
@Krishnan-Priyanshu Krishnan-Priyanshu self-assigned this Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants