Skip to content

Commit 8b04e0b

Browse files
Merge pull request #68 from fortanix/DEVOPS-4473
On branch DEVOPS-4473
2 parents 8d1f751 + 22130be commit 8b04e0b

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

docs/resources/dsm_aws_sobject.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,14 @@ The following arguments are supported in the `dsm_aws_sobject` resource block:
5656
* **aws-policy** - JSON format of AWS policy that should be enforced for the key.
5757
* * _**rotation_policy(optional)**_ = Policy to rotate a Security Object, configure the below parameters.
5858
* * _**interval_days**_ = Rotate the key for every given number of days
59-
* * _**interval_weeks**_ = Rotate the key for every given number of weeks
6059
* * _**interval_months**_ = Rotate the key for every given number of months
61-
* * _**interval_years**_ = Rotate the key for every given number of years
6260
* * _**effective_at**_ = Start of the rotation policy time
6361

6462
## Note on rotational_policy
6563

6664
Only one of the following attributes should be used while configuring the interval in rotational_policy
6765
1. interval_days
68-
2. interval_weeks
69-
3. interval_months
70-
4. interval_years
71-
66+
2. interval_months
7267

7368
## Attribute Reference
7469

docs/resources/dsm_azure_sobject.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,15 @@ The following arguments are supported in the `dsm_azure_sobject` resource block:
5050
* **azure-key-name** - Key name within Azure KV
5151
* _**rotation_policy(optional)**_ = Policy to rotate a Security Object, configure the below parameters.
5252
* * _**interval_days**_ = Rotate the key for every given number of days
53-
* * _**interval_weeks**_ = Rotate the key for every given number of weeks
5453
* * _**interval_months**_ = Rotate the key for every given number of months
55-
* * _**interval_years**_ = Rotate the key for every given number of years
5654
* * _**effective_at**_ = Start of the rotation policy time
5755
* * _**deactivate_rotated_key**_ = Deactivate original key after rotation (true/false)
5856

5957
## Note on rotational_policy
6058

6159
Only one of the following attributes should be used while configuring the interval in rotational_policy
6260
1. interval_days
63-
2. interval_weeks
64-
3. interval_months
65-
4. interval_years
61+
2. interval_months
6662

6763
## Attribute Reference
6864

docs/resources/dsm_sobject.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,16 @@ The following arguments are supported in the `dsm_sobject` resource block:
6666
* _**subgroup\_size**_ = Subgroup Size for DSA and ECKCDSA
6767
* _**rotation_policy(optional)**_ = Policy to rotate a Security Object, configure the below parameters.
6868
* * _**interval_days**_ = Rotate the key for every given number of days
69-
* * _**interval_weeks**_ = Rotate the key for every given number of weeks
7069
* * _**interval_months**_ = Rotate the key for every given number of months
71-
* * _**interval_years**_ = Rotate the key for every given number of years
7270
* * _**effective_at**_ = Start of the rotation policy time
7371
* * _**deactivate_rotated_key**_ = Deactivate original key after rotation (true/false)
7472
* * _**rotate_copied_keys**_ = Enable key rotation for copied keys
7573

7674
## Note on rotational_policy
7775

7876
Only one of the following attributes should be used while configuring the interval in rotational_policy
79-
1. interval_days
80-
2. interval_weeks
81-
3. interval_months
82-
4. interval_years
83-
84-
77+
1. interval_days
78+
2. interval_months
8579

8680
## Attribute Reference
8781

dsm/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func sobj_rotation_policy_write(rp map[string]interface{}) map[string]interface{
161161
/* while sending the request, interval_days should be assigned as an integer.
162162
Hence it is converted to integer from the string.
163163
*/
164-
if k == "interval_days" {
164+
if k == "interval_days" || k == "interval_months" {
165165
val, _ := strconv.Atoi(v.(string))
166166
rotation_policy[k] = val
167167
} else if k == "deactivate_rotated_key" {
@@ -184,7 +184,7 @@ func sobj_rotation_policy_read(rp map[string]interface{}) map[string]interface{}
184184
/* while reading the rotation_policy from terraform the interval_days attribute is assigned as float64 datatype.
185185
Hence it will be converted to string from float object.
186186
*/
187-
if k == "interval_days" {
187+
if k == "interval_days" || k == "interval_months" {
188188
rotation_policy[k] = strconv.FormatFloat(v.(float64), 'f', -1, 64)
189189
} else if k == "deactivate_rotated_key" {
190190
rotation_policy[k] = strconv.FormatBool(v.(bool))

0 commit comments

Comments
 (0)