Skip to content

Commit 01fb1ee

Browse files
committed
Update the GCP part of the provider
* Add support for custom GCP labels. * Add support for GCP archival locations. * Add support for GCP shared VPC host. * Add support for GCP permission groups.
1 parent 400fa62 commit 01fb1ee

File tree

64 files changed

+2948
-595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2948
-595
lines changed

docs/data-sources/aws_account.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ ID, the RSC cloud account ID or the name.
2525
data "polaris_aws_account" "account" {
2626
name = "example"
2727
}
28-
29-
output "cloud_account_id" {
30-
value = data.polaris_aws_account.account.id
31-
}
3228
```
3329

3430
<!-- schema generated by tfplugindocs -->

docs/data-sources/aws_archival_location.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AWS archival location. An archival location is looked up using either the ID or
1515
## Example Usage
1616

1717
```terraform
18-
# Using the archival location ID.
18+
# Using the ID.
1919
data "polaris_aws_archival_location" "location" {
2020
id = "db34f042-79ea-48b1-bab8-c40dfbf2ab82"
2121
}

docs/data-sources/azure_archival_location.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ data "polaris_azure_archival_location" "archival_location" {
4545

4646
- `connection_status` (String) Connection status of the cloud native archival location.
4747
- `container_name` (String) Azure storage container name.
48-
- `customer_managed_key` (Set of Object) Customer managed storage encryption. Specify the regions and their respective encryption details. For other regions, data will be encrypted using platform managed keys. (see [below for nested schema](#nestedatt--customer_managed_key))
48+
- `customer_managed_key` (Set of Object) Customer managed storage encryption. For `SPECIFIC_REGION`, a customer managed key for the specified region will be returned. For `SOURCE_REGION`, a customer managed key for each specified region will be returned, for other regions, data will be encrypted using platform managed keys. (see [below for nested schema](#nestedatt--customer_managed_key))
4949
- `location_template` (String) RSC location template. If a storage account region was specified, it will be `SPECIFIC_REGION`, otherwise `SOURCE_REGION`.
5050
- `redundancy` (String) Azure storage redundancy. Possible values are `GRS`, `GZRS`, `LRS`, `RA_GRS`, `RA_GZRS` and `ZRS`. Default value is `LRS`.
5151
- `storage_account_name_prefix` (String) Azure storage account name prefix. The storage account name prefix cannot be longer than 14 characters and can only consist of numbers and lower case letters.
52-
- `storage_account_region` (String) Azure region to store the snapshots in. If not specified, the snapshots will be stored in the same region as the workload.
52+
- `storage_account_region` (String) Azure region to store the snapshots in (`SPECIFIC_REGION`). If not specified, the snapshots will be stored in the same region as the workload (`SOURCE_REGION`).
5353
- `storage_account_tags` (Map of String) Azure storage account tags. Each tag will be added to the storage account created by RSC.
5454
- `storage_tier` (String) Azure storage tier. Possible values are `COOL` and `HOT`. Default value is `COOL`.
5555

@@ -59,5 +59,5 @@ data "polaris_azure_archival_location" "archival_location" {
5959
Read-Only:
6060

6161
- `name` (String) Key name.
62-
- `region` (String) The region in which the key will be used. Regions without customer managed keys will use platform managed keys.
62+
- `region` (String) The region in which the key will be used.
6363
- `vault_name` (String) Key vault name.

docs/data-sources/azure_permissions.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ page_title: "polaris_azure_permissions Data Source - terraform-provider-polaris"
44
subcategory: ""
55
description: |-
66
The polaris_azure_permissions data source is used to access information about
7-
the permissions required by RSC for a specified RSC feature.
8-
The polaris_azure_permissions data source can be used with the permissions
9-
field of the polaris_azure_subscription resource and the
10-
azurerm_role_definition resource to automatically update the permissions of
11-
roles and notify RSC about the updated permissions.
7+
the permissions required by RSC for an RSC feature.
8+
The polaris_azure_permissions data source can be used with the
9+
azurerm_role_definition resource and the permissions field of the
10+
polaris_azure_subscription resource to automatically update the permissions
11+
of roles and notify RSC about the updated.
1212
Permission Groups
1313
Following is a list of features and their applicable permission groups. These
14-
are used when specifying the feature set.
14+
are used when specifying the feature.
1515
AZURE_SQL_DB_PROTECTION
1616
BASIC - Represents the basic set of permissions required to onboard the
1717
feature.RECOVERY - Represents the set of permissions required for all recovery
@@ -46,6 +46,8 @@ description: |-
4646
feature.PRIVATE_ENDPOINTS - Represents the set of permissions required for usage
4747
of private endpoints.CUSTOMER_MANAGED_BASIC - Represents the permissions required to enable
4848
customer-managed Exocompute feature.
49+
-> Note: When permission groups are specified, the BASIC permission group
50+
is always required .
4951
-> Note: To better fit the RSC Azure permission model where each RSC feature
5052
have two Azure roles, the features field has been deprecated and replaced
5153
with the feature field.
@@ -63,16 +65,16 @@ description: |-
6365
# polaris_azure_permissions (Data Source)
6466

6567
The `polaris_azure_permissions` data source is used to access information about
66-
the permissions required by RSC for a specified RSC feature.
68+
the permissions required by RSC for an RSC feature.
6769

68-
The `polaris_azure_permissions` data source can be used with the `permissions`
69-
field of the `polaris_azure_subscription` resource and the
70-
`azurerm_role_definition` resource to automatically update the permissions of
71-
roles and notify RSC about the updated permissions.
70+
The `polaris_azure_permissions` data source can be used with the
71+
`azurerm_role_definition` resource and the `permissions` field of the
72+
`polaris_azure_subscription` resource to automatically update the permissions
73+
of roles and notify RSC about the updated.
7274

7375
## Permission Groups
7476
Following is a list of features and their applicable permission groups. These
75-
are used when specifying the feature set.
77+
are used when specifying the feature.
7678

7779
`AZURE_SQL_DB_PROTECTION`
7880
* `BASIC` - Represents the basic set of permissions required to onboard the
@@ -128,6 +130,9 @@ are used when specifying the feature set.
128130
* `CUSTOMER_MANAGED_BASIC` - Represents the permissions required to enable
129131
customer-managed Exocompute feature.
130132

133+
-> **Note:** When permission groups are specified, the `BASIC` permission group
134+
is always required .
135+
131136
-> **Note:** To better fit the RSC Azure permission model where each RSC feature
132137
have two Azure roles, the `features` field has been deprecated and replaced
133138
with the `feature` field.
@@ -188,7 +193,7 @@ resource "polaris_azure_subscription" "subscription" {
188193

189194
### Optional
190195

191-
- `feature` (String) RSC feature. Note that the feature name must be given in the `EXAMPLE_FEATURE_NAME` style. Possible values are `AZURE_SQL_DB_PROTECTION`, `AZURE_SQL_MI_PROTECTION`, `CLOUD_NATIVE_ARCHIVAL`, `CLOUD_NATIVE_ARCHIVAL_ENCRYPTION`, `CLOUD_NATIVE_BLOB_PROTECTION`, `CLOUD_NATIVE_PROTECTION` and `EXOCOMPUTE`.
196+
- `feature` (String) RSC feature. Note that the feature must be given in the `EXAMPLE_FEATURE_NAME` style. Possible values are `AZURE_SQL_DB_PROTECTION`, `AZURE_SQL_MI_PROTECTION`, `CLOUD_NATIVE_ARCHIVAL`, `CLOUD_NATIVE_ARCHIVAL_ENCRYPTION`, `CLOUD_NATIVE_BLOB_PROTECTION`, `CLOUD_NATIVE_PROTECTION` and `EXOCOMPUTE`.
192197
- `features` (Set of String, Deprecated) RSC features. Possible values are `AZURE_SQL_DB_PROTECTION`, `AZURE_SQL_MI_PROTECTION`, `CLOUD_NATIVE_ARCHIVAL`, `CLOUD_NATIVE_ARCHIVAL_ENCRYPTION`, `CLOUD_NATIVE_BLOB_PROTECTION`, `CLOUD_NATIVE_PROTECTION` and `EXOCOMPUTE`. **Deprecated:** use `feature` instead.
193198
- `permission_groups` (Set of String) Permission groups for the RSC feature. Possible values are `BASIC`, `EXPORT_AND_RESTORE`, `FILE_LEVEL_RECOVERY`, `SNAPSHOT_PRIVATE_ACCESS`, `PRIVATE_ENDPOINTS`, `CUSTOMER_MANAGED_BASIC`, `ENCRYPTION`, `SQL_ARCHIVAL`, `RECOVERY` and `BACKUP_V2`.
194199

docs/data-sources/azure_subscription.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
page_title: "polaris_azure_subscription Data Source - terraform-provider-polaris"
44
subcategory: ""
55
description: |-
6-
The polaris_azure_subscription data source is used to access information about an
7-
Azure subscription added to RSC. An Azure subscription is looked up using either the
8-
Azure subscription ID or the name. When looking up an Azure subscription using the
9-
subscription name, the tenant domain can be used to specify in which tenant to look
10-
for the name.
6+
The polaris_azure_subscription data source is used to access information
7+
about an Azure subscription added to RSC. An Azure subscription is looked up
8+
using either the Azure subscription ID, the RSC cloud account ID, or the name.
9+
When looking up an Azure subscription using the subscription name, the tenant
10+
domain can be used to specify in which tenant to look for the name.
1111
-> Note: The subscription name is the name of the Azure subscription as it appears
1212
in RSC.
1313
---
1414

1515
# polaris_azure_subscription (Data Source)
1616

17-
The `polaris_azure_subscription` data source is used to access information about an
18-
Azure subscription added to RSC. An Azure subscription is looked up using either the
19-
Azure subscription ID or the name. When looking up an Azure subscription using the
20-
subscription name, the tenant domain can be used to specify in which tenant to look
21-
for the name.
17+
The `polaris_azure_subscription` data source is used to access information
18+
about an Azure subscription added to RSC. An Azure subscription is looked up
19+
using either the Azure subscription ID, the RSC cloud account ID, or the name.
20+
When looking up an Azure subscription using the subscription name, the tenant
21+
domain can be used to specify in which tenant to look for the name.
2222

2323
-> **Note:** The subscription name is the name of the Azure subscription as it appears
2424
in RSC.
@@ -29,21 +29,14 @@ for the name.
2929
data "polaris_azure_subscription" "subscription" {
3030
name = "example"
3131
}
32-
33-
output "cloud_account_id" {
34-
value = data.polaris_azure_subscription.subscription.id
35-
}
3632
```
3733

3834
<!-- schema generated by tfplugindocs -->
3935
## Schema
4036

4137
### Optional
4238

39+
- `id` (String) RSC cloud account ID (UUID).
4340
- `name` (String) Azure subscription name.
4441
- `subscription_id` (String) Azure subscription ID.
4542
- `tenant_domain` (String) Azure tenant primary domain.
46-
47-
### Read-Only
48-
49-
- `id` (String) RSC cloud account ID (UUID).
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
page_title: "polaris_gcp_archival_location Data Source - terraform-provider-polaris"
3+
subcategory: ""
4+
description: |-
5+
6+
The `polaris_gcp_archival_location` data source is used to access information
7+
about a GCP archival location. An archival location is looked up using either
8+
the ID or the name.
9+
10+
---
11+
12+
# polaris_gcp_archival_location (Data Source)
13+
14+
15+
The `polaris_gcp_archival_location` data source is used to access information
16+
about a GCP archival location. An archival location is looked up using either
17+
the ID or the name.
18+
19+
20+
21+
## Example Usage
22+
23+
```terraform
24+
# Using the ID.
25+
data "polaris_gcp_archival_location" "location" {
26+
id = "9e90a8bb-0578-43dc-9330-57f86a9ae1e6"
27+
}
28+
29+
# Using the name.
30+
data "polaris_gcp_archival_location" "location" {
31+
name = "my-archival-location"
32+
}
33+
```
34+
35+
36+
## Schema
37+
38+
### Optional
39+
40+
- `id` (String) Cloud native archival location ID (UUID).
41+
- `name` (String) Name of the cloud native archival location.
42+
43+
### Read-Only
44+
45+
- `bucket_labels` (Map of String) GCP bucket labels.
46+
- `bucket_prefix` (String) GCP bucket prefix. Note, `rubrik-` will always be prepended to the prefix.
47+
- `cloud_account_id` (String) RSC cloud account ID (UUID).
48+
- `connection_status` (String) Connection status of the archival location.
49+
- `customer_managed_key` (Set of Object) Customer managed storage encryption. For `SPECIFIC_REGION`, a customer managed key for the specified region will be returned. For `SOURCE_REGION`, a customer managed key for each specified region will be returned, for other regions, data will be encrypted using platform managed keys. (see [below for nested schema](#nestedatt--customer_managed_key))
50+
- `location_template` (String) RSC location template. If a region was specified, it will be `SPECIFIC_REGION`, otherwise `SOURCE_REGION`.
51+
- `region` (String) GCP region to store the snapshots in (`SPECIFIC_REGION`). If not specified, the snapshots will be stored in the same region as the workload (`SOURCE_REGION`).
52+
- `storage_class` (String) GCP bucket storage class. Possible values are `ARCHIVE`, `COLDLINE`, `NEARLINE`, `STANDARD` and `DURABLE_REDUCED_AVAILABILITY`.
53+
54+
<a id="nestedatt--customer_managed_key"></a>
55+
### Nested Schema for `customer_managed_key`
56+
57+
Read-Only:
58+
59+
- `name` (String) Key name
60+
- `region` (String) The region in which the key will be used.
61+
- `ring_name` (String) Key ring name.

docs/data-sources/gcp_permissions.md

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,109 @@
33
page_title: "polaris_gcp_permissions Data Source - terraform-provider-polaris"
44
subcategory: ""
55
description: |-
6-
6+
The polaris_gcp_permissions data source is used to access information about
7+
the permissions required by RSC for an RSC feature.
8+
The polaris_gcp_permissions data source can be used with the
9+
google_project_iam_custom_role resource and the permissions field of the
10+
polaris_gcp_project resource to automatically update the permissions of roles
11+
and notify RSC about the updated.
12+
Permission Groups
13+
Following is a list of features and their applicable permission groups. These
14+
are used when specifying the feature.
15+
CLOUD_NATIVE_ARCHIVAL
16+
BASIC - Represents the basic set of permissions required to onboard the
17+
feature.ENCRYPTION - Represents the set of permissions required for encryption
18+
operation.
19+
CLOUD_NATIVE_PROTECTION
20+
BASIC - Represents the basic set of permissions required to onboard the
21+
feature.EXPORT_AND_RESTORE - Represents the set of permissions required for export
22+
and restore operations.FILE_LEVEL_RECOVERY - Represents the set of permissions required for
23+
file-level recovery operations.
24+
GCP_SHARED_VPC_HOST
25+
BASIC - Represents the basic set of permissions required to onboard the
26+
feature.
27+
EXOCOMPUTE
28+
BASIC - Represents the basic set of permissions required to onboard the
29+
feature.
30+
-> Note: When permission groups are specified, the BASIC permission group
31+
is always required .
32+
-> Note: Due to backward compatibility, the features field allow the
33+
feature names to be given in 3 different styles: EXAMPLE_FEATURE_NAME,
34+
example-feature-name or example_feature_name. The recommended style is
35+
EXAMPLE_FEATURE_NAME as it is what the RSC API itself uses.
736
---
837

938
# polaris_gcp_permissions (Data Source)
1039

40+
The `polaris_gcp_permissions` data source is used to access information about
41+
the permissions required by RSC for an RSC feature.
1142

43+
The `polaris_gcp_permissions` data source can be used with the
44+
`google_project_iam_custom_role` resource and the `permissions` field of the
45+
`polaris_gcp_project` resource to automatically update the permissions of roles
46+
and notify RSC about the updated.
47+
48+
## Permission Groups
49+
Following is a list of features and their applicable permission groups. These
50+
are used when specifying the feature.
51+
52+
`CLOUD_NATIVE_ARCHIVAL`
53+
* `BASIC` - Represents the basic set of permissions required to onboard the
54+
feature.
55+
* `ENCRYPTION` - Represents the set of permissions required for encryption
56+
operation.
57+
58+
`CLOUD_NATIVE_PROTECTION`
59+
* `BASIC` - Represents the basic set of permissions required to onboard the
60+
feature.
61+
* `EXPORT_AND_RESTORE` - Represents the set of permissions required for export
62+
and restore operations.
63+
* `FILE_LEVEL_RECOVERY` - Represents the set of permissions required for
64+
file-level recovery operations.
65+
66+
`GCP_SHARED_VPC_HOST`
67+
* `BASIC` - Represents the basic set of permissions required to onboard the
68+
feature.
69+
70+
`EXOCOMPUTE`
71+
* `BASIC` - Represents the basic set of permissions required to onboard the
72+
feature.
73+
74+
-> **Note:** When permission groups are specified, the `BASIC` permission group
75+
is always required .
76+
77+
-> **Note:** Due to backward compatibility, the `features` field allow the
78+
feature names to be given in 3 different styles: `EXAMPLE_FEATURE_NAME`,
79+
`example-feature-name` or `example_feature_name`. The recommended style is
80+
`EXAMPLE_FEATURE_NAME` as it is what the RSC API itself uses.
1281

1382
## Example Usage
1483

1584
```terraform
16-
data "polaris_gcp_permissions" "default" {
17-
features = [
18-
"CLOUD_NATIVE_PROTECTION",
85+
data "polaris_gcp_permissions" "cloud_native_archival" {
86+
feature = "CLOUD_NATIVE_ARCHIVAL"
87+
permission_groups = [
88+
"BASIC",
89+
"ENCRYPTION",
1990
]
2091
}
2192
```
2293

2394
<!-- schema generated by tfplugindocs -->
2495
## Schema
2596

26-
### Required
97+
### Optional
2798

28-
- `features` (Set of String) Enabled features.
99+
- `feature` (String) RSC feature. Note that the feature must be given in the `EXAMPLE_FEATURE_NAME` style. Possible values are `CLOUD_NATIVE_ARCHIVAL`, `CLOUD_NATIVE_PROTECTION`, `GCP_SHARED_VPC_HOST` and `EXOCOMPUTE`.
100+
- `features` (Set of String, Deprecated) RSC features. Possible values are `CLOUD_NATIVE_ARCHIVAL`, `CLOUD_NATIVE_PROTECTION`, `GCP_SHARED_VPC_HOST` and `EXOCOMPUTE`. **Deprecated:** use `feature` instead.
101+
- `permission_groups` (Set of String) Permission groups for the RSC feature. Possible values are `BASIC`, `ENCRYPTION`, `EXPORT_AND_RESTORE` and `FILE_LEVEL_RECOVERY`.
29102

30103
### Read-Only
31104

32-
- `hash` (String) SHA-256 hash of the permissions, can be used to detect changes to the permissions.
33-
- `id` (String) The ID of this resource.
34-
- `permissions` (List of String) Permissions required for the features enabled.
105+
- `conditions` (Set of String) Conditions for the permissions with conditions.
106+
- `hash` (String, Deprecated) SHA-256 hash of the permissions, can be used to detect changes to the permissions. **Deprecated:** use `id` instead.
107+
- `id` (String) SHA-256 hash of the required permissions, will be updated as the required permissions changes.
108+
- `permissions` (List of String, Deprecated) Permissions required for the set of RSC features. Includes permissions with conditions. **Deprecated:** use `with_conditions` and `without_conditions` instead.
109+
- `services` (Set of String) GCP services required for the RSC feature.
110+
- `with_conditions` (Set of String) Permissions with conditions required for the RSC feature.
111+
- `without_conditions` (Set of String) Permissions without conditions required for the RSC feature.

0 commit comments

Comments
 (0)