Skip to content

Commit

Permalink
Merge pull request #344 from hashicorp/rename-volume-resources
Browse files Browse the repository at this point in the history
volumes: rename existing volume resources
  • Loading branch information
lgfa29 authored Jul 11, 2023
2 parents 247eead + 4a70932 commit 4afd543
Show file tree
Hide file tree
Showing 13 changed files with 1,485 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,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))
* resource/nomad_job: Switch to HCL2 parsing by default. Jobs that require HCL1 parsing must set `hcl1 = true`. ([#343](https://github.com/hashicorp/terraform-provider-nomad/pull/343))

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

0 comments on commit 4afd543

Please sign in to comment.