Skip to content

Commit f63667b

Browse files
Terraform Team AutomationjiaqchenO
authored andcommitted
Added - Support for KMS Cross Region Replication for Virtual Vaults
1 parent b9255a4 commit f63667b

File tree

9 files changed

+36
-20
lines changed

9 files changed

+36
-20
lines changed

internal/integrationtest/kms_vault_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ func TestKmsVaultResource_basic(t *testing.T) {
369369
resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"),
370370
resource.TestCheckResourceAttrSet(singularDatasourceName, "id"),
371371
resource.TestCheckResourceAttrSet(singularDatasourceName, "is_primary"),
372+
resource.TestCheckResourceAttrSet(singularDatasourceName, "is_vault_replicable"),
372373
resource.TestCheckResourceAttrSet(singularDatasourceName, "management_endpoint"),
373374

374375
resource.TestCheckResourceAttrSet(singularDatasourceName, "state"),

internal/service/kms/kms_vault_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ func (s *KmsVaultDataSourceCrud) SetData() error {
9494
s.D.Set("is_primary", *s.Res.IsPrimary)
9595
}
9696

97+
if s.Res.IsVaultReplicable != nil {
98+
s.D.Set("is_vault_replicable", *s.Res.IsVaultReplicable)
99+
}
100+
97101
if s.Res.ManagementEndpoint != nil {
98102
s.D.Set("management_endpoint", *s.Res.ManagementEndpoint)
99103
}

internal/service/kms/kms_vault_resource.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ func KmsVaultResource() *schema.Resource {
258258
Type: schema.TypeBool,
259259
Computed: true,
260260
},
261+
"is_vault_replicable": {
262+
Type: schema.TypeBool,
263+
Computed: true,
264+
},
261265
"management_endpoint": {
262266
Type: schema.TypeString,
263267
Computed: true,
@@ -555,6 +559,10 @@ func (s *KmsVaultResourceCrud) SetData() error {
555559
s.D.Set("is_primary", *s.Res.IsPrimary)
556560
}
557561

562+
if s.Res.IsVaultReplicable != nil {
563+
s.D.Set("is_vault_replicable", *s.Res.IsVaultReplicable)
564+
}
565+
558566
if s.Res.ManagementEndpoint != nil {
559567
s.D.Set("management_endpoint", *s.Res.ManagementEndpoint)
560568
}

website/docs/d/kms_key.html.markdown

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ The following arguments are supported:
4141
The following attributes are exported:
4242

4343
* `auto_key_rotation_details` - The details of auto rotation schedule for the Key being create updated or imported.
44-
* `last_rotation_message` - The last execution status message.
44+
* `last_rotation_message` - The last execution status message of auto key rotation.
4545
* `last_rotation_status` - The status of last execution of auto key rotation.
46-
* `rotation_interval_in_days` - The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year)
47-
* `time_of_last_rotation` - A property indicating Last rotation Date Example: `2023-04-04T00:00:00Z`.
48-
* `time_of_next_rotation` - A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
49-
* `time_of_schedule_start` - A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
46+
* `rotation_interval_in_days` - The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule.
47+
* `time_of_last_rotation` - A property indicating Last rotation Date. Example: `2023-04-04T00:00:00Z`.
48+
* `time_of_next_rotation` - A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z`. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z.
49+
* `time_of_schedule_start` - A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today’s date will be used if not specified by customer.
5050
* `compartment_id` - The OCID of the compartment that contains this master encryption key.
5151
* `current_key_version` - The OCID of the key version used in cryptographic operations. During key rotation, the service might be in a transitional state where this or a newer key version are used intermittently. The `currentKeyVersion` property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations.
5252
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`

website/docs/d/kms_keys.html.markdown

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ The following attributes are exported:
5757
The following attributes are exported:
5858

5959
* `auto_key_rotation_details` - The details of auto rotation schedule for the Key being create updated or imported.
60-
* `last_rotation_message` - The last execution status message.
60+
* `last_rotation_message` - The last execution status message of auto key rotation.
6161
* `last_rotation_status` - The status of last execution of auto key rotation.
62-
* `rotation_interval_in_days` - The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year)
63-
* `time_of_last_rotation` - A property indicating Last rotation Date Example: `2023-04-04T00:00:00Z`.
64-
* `time_of_next_rotation` - A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
65-
* `time_of_schedule_start` - A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
62+
* `rotation_interval_in_days` - The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule.
63+
* `time_of_last_rotation` - A property indicating Last rotation Date. Example: `2023-04-04T00:00:00Z`.
64+
* `time_of_next_rotation` - A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z`. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z.
65+
* `time_of_schedule_start` - A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today’s date will be used if not specified by customer.
6666
* `compartment_id` - The OCID of the compartment that contains this master encryption key.
6767
* `current_key_version` - The OCID of the key version used in cryptographic operations. During key rotation, the service might be in a transitional state where this or a newer key version are used intermittently. The `currentKeyVersion` property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations.
6868
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`

website/docs/d/kms_vault.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ The following attributes are exported:
5252
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
5353
* `id` - The OCID of the vault.
5454
* `is_primary` - A Boolean value that indicates whether the Vault is primary Vault or replica Vault.
55+
* `is_vault_replicable` - A Boolean value that indicates whether the Vault has cross region replication capability. Always true for Virtual Private Vaults.
5556
* `management_endpoint` - The service endpoint to perform management operations against. Management operations include "Create," "Update," "List," "Get," and "Delete" operations.
5657
* `replica_details` - Vault replica details
5758
* `replication_id` - ReplicationId associated with a vault operation

website/docs/d/kms_vaults.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The following attributes are exported:
5858
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
5959
* `id` - The OCID of the vault.
6060
* `is_primary` - A Boolean value that indicates whether the Vault is primary Vault or replica Vault.
61+
* `is_vault_replicable` - A Boolean value that indicates whether the Vault has cross region replication capability. Always true for Virtual Private Vaults.
6162
* `management_endpoint` - The service endpoint to perform management operations against. Management operations include "Create," "Update," "List," "Get," and "Delete" operations.
6263
* `replica_details` - Vault replica details
6364
* `replication_id` - ReplicationId associated with a vault operation

website/docs/r/kms_key.html.markdown

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ resource "oci_kms_key" "test_key" {
6262
The following arguments are supported:
6363

6464
* `auto_key_rotation_details` - (Optional) (Updatable) The details of auto rotation schedule for the Key being create updated or imported.
65-
* `last_rotation_message` - (Optional) (Updatable) The last execution status message.
65+
* `last_rotation_message` - (Optional) (Updatable) The last execution status message of auto key rotation.
6666
* `last_rotation_status` - (Optional) (Updatable) The status of last execution of auto key rotation.
67-
* `rotation_interval_in_days` - (Optional) (Updatable) The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year)
68-
* `time_of_last_rotation` - (Optional) (Updatable) A property indicating Last rotation Date Example: `2023-04-04T00:00:00Z`.
69-
* `time_of_next_rotation` - (Optional) (Updatable) A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
70-
* `time_of_schedule_start` - (Optional) (Updatable) A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
67+
* `rotation_interval_in_days` - (Optional) (Updatable) The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule.
68+
* `time_of_last_rotation` - (Optional) (Updatable) A property indicating Last rotation Date. Example: `2023-04-04T00:00:00Z`.
69+
* `time_of_next_rotation` - (Optional) (Updatable) A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z`. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z.
70+
* `time_of_schedule_start` - (Optional) (Updatable) A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today’s date will be used if not specified by customer.
7171
* `compartment_id` - (Required) (Updatable) The OCID of the compartment where you want to create the master encryption key.
7272
* `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
7373
* `desired_state` - (Optional) (Updatable) Desired state of the key. Possible values : `ENABLED` or `DISABLED`
@@ -106,12 +106,12 @@ Any change to a property that does not support update will force the destruction
106106
The following attributes are exported:
107107

108108
* `auto_key_rotation_details` - The details of auto rotation schedule for the Key being create updated or imported.
109-
* `last_rotation_message` - The last execution status message.
109+
* `last_rotation_message` - The last execution status message of auto key rotation.
110110
* `last_rotation_status` - The status of last execution of auto key rotation.
111-
* `rotation_interval_in_days` - The interval of auto key rotation. For auto key rotation the interval should between 30 day and 365 days (1 year)
112-
* `time_of_last_rotation` - A property indicating Last rotation Date Example: `2023-04-04T00:00:00Z`.
113-
* `time_of_next_rotation` - A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
114-
* `time_of_schedule_start` - A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z` .
111+
* `rotation_interval_in_days` - The interval of auto key rotation. For auto key rotation the interval should between 60 day and 365 days (1 year). Note: User must specify this parameter when creating a new schedule.
112+
* `time_of_last_rotation` - A property indicating Last rotation Date. Example: `2023-04-04T00:00:00Z`.
113+
* `time_of_next_rotation` - A property indicating Next estimated scheduled Time, as per the interval, expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z`. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z.
114+
* `time_of_schedule_start` - A property indicating scheduled start date expressed as date YYYY-MM-DD String. Example: `2023-04-04T00:00:00Z. The time has no significance when scheduling an auto key rotation as this can be done anytime approximately the scheduled day, KMS ignores the time and replaces it with 00:00, for example 2023-04-04T15:14:13Z will be used as 2023-04-04T00:00:00Z . Note : Today’s date will be used if not specified by customer.
115115
* `compartment_id` - The OCID of the compartment that contains this master encryption key.
116116
* `current_key_version` - The OCID of the key version used in cryptographic operations. During key rotation, the service might be in a transitional state where this or a newer key version are used intermittently. The `currentKeyVersion` property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations.
117117
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`

website/docs/r/kms_vault.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ The following attributes are exported:
9696
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
9797
* `id` - The OCID of the vault.
9898
* `is_primary` - A Boolean value that indicates whether the Vault is primary Vault or replica Vault.
99+
* `is_vault_replicable` - A Boolean value that indicates whether the Vault has cross region replication capability. Always true for Virtual Private Vaults.
99100
* `management_endpoint` - The service endpoint to perform management operations against. Management operations include "Create," "Update," "List," "Get," and "Delete" operations.
100101
* `replica_details` - Vault replica details
101102
* `replication_id` - ReplicationId associated with a vault operation

0 commit comments

Comments
 (0)