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

volumes: rename existing volume resources #344

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
BACKWARDS INCOMPATIBILITIES:
* provider: Terraform Plugin SDK upgraded to v2.10.1. **Terraform versions prior to 0.12 are no longer supported.** ([#339](https://github.com/hashicorp/terraform-provider-nomad/issues/339))

DEPRECATIONS:
* resource/nomad_volume: The `nomad_volume` resource has been deprecated. Use the new `nomad_csi_volume_registration` resource instead. ([#344](https://github.com/hashicorp/terraform-provider-nomad/pull/344))
* resource/nomad_external_volume: The `nomad_external_volume` resource has been deprecated. Use the new `nomad_csi_volume` resource instead. ([#344](https://github.com/hashicorp/terraform-provider-nomad/pull/344))

IMPROVEMENTS:
* provider: add `skip_verify` configuration to skip TLS verification ([#319](https://github.com/hashicorp/terraform-provider-nomad/pull/319))
* provider: update Go to 1.20.5 ([#334](https://github.com/hashicorp/terraform-provider-nomad/pull/334))
Expand Down
12 changes: 12 additions & 0 deletions nomad/helper/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package helper

func ToMapStringString(m any) map[string]string {
mss := map[string]string{}
for k, v := range m.(map[string]any) {
mss[k] = v.(string)
}
return mss
}
28 changes: 15 additions & 13 deletions nomad/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,21 @@ func Provider() *schema.Provider {
},

ResourcesMap: map[string]*schema.Resource{
"nomad_acl_auth_method": resourceACLAuthMethod(),
"nomad_acl_binding_rule": resourceACLBindingRule(),
"nomad_acl_policy": resourceACLPolicy(),
"nomad_acl_role": resourceACLRole(),
"nomad_acl_token": resourceACLToken(),
"nomad_external_volume": resourceExternalVolume(),
"nomad_job": resourceJob(),
"nomad_namespace": resourceNamespace(),
"nomad_quota_specification": resourceQuotaSpecification(),
"nomad_sentinel_policy": resourceSentinelPolicy(),
"nomad_volume": resourceVolume(),
"nomad_scheduler_config": resourceSchedulerConfig(),
"nomad_variable": resourceVariable(),
"nomad_acl_auth_method": resourceACLAuthMethod(),
"nomad_acl_binding_rule": resourceACLBindingRule(),
"nomad_acl_policy": resourceACLPolicy(),
"nomad_acl_role": resourceACLRole(),
"nomad_acl_token": resourceACLToken(),
"nomad_csi_volume": resourceCSIVolume(),
"nomad_csi_volume_registration": resourceCSIVolumeRegistration(),
"nomad_external_volume": resourceExternalVolume(),
"nomad_job": resourceJob(),
"nomad_namespace": resourceNamespace(),
"nomad_quota_specification": resourceQuotaSpecification(),
"nomad_sentinel_policy": resourceSentinelPolicy(),
"nomad_volume": resourceVolume(),
"nomad_scheduler_config": resourceSchedulerConfig(),
"nomad_variable": resourceVariable(),
},
}
}
Expand Down
Loading