Raise error when serviceRepository is not found during Read operation. Gets ahead of nil pointer dereference as posted in linked issue above.
[X] List your changes here
[ ] Make a changie entry
Tophatting
With this config
resource "opslevel_service_repository" "foo" {
service = "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS85MzMzMA"
repository = "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRodWIvMTAyMzM2NA"
name = "Foo"
base_directory = "bar"
}
Create Service Repository, terraform apply
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# opslevel_service_repository.foo will be created
+ resource "opslevel_service_repository" "foo" {
+ base_directory = "bar"
+ id = (known after apply)
+ last_updated = (known after apply)
+ name = "Foo"
+ repository = "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRodWIvMTAyMzM2NA"
+ service = "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS85MzMzMA"
}
Plan: 1 to add, 0 to change, 0 to destroy.
opslevel_service_repository.foo: Creating...
opslevel_service_repository.foo: Creation complete after 0s [id=Z2lkOi8vb3BzbGV2ZWwvU2VydmljZVJlcG9zaXRvcnkvNzI4MjA]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Delete Repository from Service in OpsLevel UI
Re-Create Service Repository, terraform apply
opslevel_service_repository.foo: Refreshing state... [id=Z2lkOi8vb3BzbGV2ZWwvU2VydmljZVJlcG9zaXRvcnkvNzI4MjA]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# opslevel_service_repository.foo must be replaced
-/+ resource "opslevel_service_repository" "foo" {
+ base_directory = "bar"
+ id = (known after apply)
+ last_updated = (known after apply)
+ name = "Foo"
+ repository = "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRodWIvMTAyMzM2NA" # forces replacement
+ service = "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS85MzMzMA" # forces replacement
}
Plan: 1 to add, 0 to change, 1 to destroy.
opslevel_service_repository.foo: Destroying...
opslevel_service_repository.foo: Destruction complete after 0s
opslevel_service_repository.foo: Creating...
opslevel_service_repository.foo: Creation complete after 0s [id=Z2lkOi8vb3BzbGV2ZWwvU2VydmljZVJlcG9zaXRvcnkvNzI4MjE]
Apply complete! Resources: 1 added, 0 changed, 1 destroyed.
Verify Repository for Service put back in OpsLevel UI ✅
Delete Service Repository, terraform destroy
opslevel_service_repository.foo: Refreshing state... [id=Z2lkOi8vb3BzbGV2ZWwvU2VydmljZVJlcG9zaXRvcnkvNzI4MjE]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# opslevel_service_repository.foo will be destroyed
- resource "opslevel_service_repository" "foo" {
- base_directory = "bar" -> null
- id = "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZVJlcG9zaXRvcnkvNzI4MjE" -> null
- last_updated = "Wednesday, 29-May-24 12:07:01 CDT" -> null
- name = "Foo" -> null
- repository = "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRodWIvMTAyMzM2NA" -> null
- service = "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS85MzMzMA" -> null
}
Plan: 0 to add, 0 to change, 1 to destroy.
opslevel_service_repository.foo: Destroying... [id=Z2lkOi8vb3BzbGV2ZWwvU2VydmljZVJlcG9zaXRvcnkvNzI4MjE]
opslevel_service_repository.foo: Destruction complete after 0s
Destroy complete! Resources: 1 destroyed.
Verify Repository removed from Service in OpsLevel UI ✅
Issues
odd provider crash
Changelog
Raise error when
serviceRepository
is not found during Read operation. Gets ahead of nil pointer dereference as posted in linked issue above.changie
entryTophatting
With this config
Create Service Repository,
terraform apply
Delete Repository from Service in OpsLevel UI
Re-Create Service Repository,
terraform apply
Verify Repository for Service put back in OpsLevel UI ✅
Delete Service Repository,
terraform destroy
Verify Repository removed from Service in OpsLevel UI ✅