Skip to content

Commit

Permalink
Sync bitbucket and GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
carchi8py committed Jun 9, 2023
1 parent 677a49b commit 66f4271
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## 23.6.0
NEW FEATURES:
* resource/aws_fsx_volume: add new option`tags`.

## 23.5.2
NEW ENHANCEMENTS:
* resource/cvo_azure: add `saas_subscription_id`.
* provider: add `connector_host` for restricted mode.


## 23.5.1
NEW ENHANCEMENTS:
* resoruce/cvo_aws: add `assume_role_arn` for AWS CVO HA.
Expand Down
17 changes: 17 additions & 0 deletions cloudmanager/resource_netapp_cloudmanager_aws_fsx_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ func resourceFsxVolume() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},
"tags": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"tenant_id": {
Type: schema.TypeString,
Required: true,
Expand Down Expand Up @@ -126,6 +133,16 @@ func resourceFSXVolumeCreate(d *schema.ResourceData, meta interface{}) error {
volume.EnableCompression = false
volume.EnableThinProvisioning = true
volume.EnableStorageEfficiency = d.Get("enable_storage_efficiency").(bool)
if o, ok := d.GetOk("tags"); ok {
tags := make([]volumeTag, 0)
for k, v := range o.(map[string]interface{}) {
tag := volumeTag{}
tag.TagKey = k
tag.TagValue = v.(string)
tags = append(tags, tag)
}
volume.VolumeFSXTags = tags
}
err = client.setCommonAttributes(weInfo.WorkingEnvironmentType, d, &volume, clientID)
if err != nil {
return err
Expand Down
2 changes: 2 additions & 0 deletions cloudmanager/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type volumeRequest struct {
TenantID string `structs:"tenantId,omitempty"`
EnableStorageEfficiency bool `structs:"enableStorageEfficiency,omitempty"`
VolumeTags []volumeTag `structs:"volumeTags,omitempty"`
VolumeFSXTags []volumeTag `structs:"awsTags,omitempty"`
Comment string `structs:"comment,omitempty"`
}

Expand Down Expand Up @@ -148,6 +149,7 @@ type volumeTag struct {
TagKey string `structs:"tagKey"`
TagValue string `structs:"tagValue"`
}

type createSnapshotPolicyRequest struct {
SnapshotPolicyName string `structs:"snapshotPolicyName"`
Schedules []scheduleReq `structs:"schedules"`
Expand Down
4 changes: 4 additions & 0 deletions website/docs/r/aws_fsx_volume.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ resource "netapp-cloudmanager_aws_fsx_volume" "fsx-volume-nfs" {
export_policy_ip = ["0.0.0.0/0"]
export_policy_nfs_version = ["nfs4"]
file_system_id = "your-file-system-id"
tags = {
"abc" = "xyz"
}
client_id = netapp-cloudmanager_connector_gcp.cm-gcp.client_id
}
```
Expand Down Expand Up @@ -66,6 +69,7 @@ The following arguments are supported:
* `permission` (Optional) CIFS share permission type. (CIFS protocol parameters)
* `users` (Optional) List of users with the permission. (CIFS protocol parameters)
* `volume_protocol` - (Required) The protocol for the volume: ['nfs', 'cifs']. This affects the provided parameters.
* `tags` - (Optional) Set tags for the volume during creation. The API doesn't contain any information about tags so the provider doesn't guarantee tags will be added successfully and detect any drift after create.
* `tenant_id` - (Required) The workspace id.


Expand Down

0 comments on commit 66f4271

Please sign in to comment.