Skip to content

Commit

Permalink
Merge branch 'beta' (#192)
Browse files Browse the repository at this point in the history
* Add support for specifying Azure resource groups for RSC features (#150)
* Update rubrik-polaris-sdk-for-go to v0.10.0-beta.2 (#152)
* Show diffs in the beta guide as HCL code (#155)
* Improve documentation for resource groups (#154)
* Bump the GH Actions Go compiler version to v1.22 (#156)
* Add account name and FQDN to the polaris_deployment data source (#157)
* Add support for Azure shared exocompute (#160)
* Update rubrik-polaris-sdk-for-go to v0.10.0-beta.5 (#165)
* Add changelog (#167)
* Add support for Azure archival locations (#168)
* Move changelog and upgrade guides to guides folder (#170)
* Fix Azure permission upgrade issue (#171)
* Update changelog (#172)
* Add Azure archival location data source (#173)
* Improve Azure documentation (#175)
* Improve documentation (#176)
* Update guides (#180)
* Update documentation (#184)
* Add support for cluster setup YAML (#186)
* Add data sources to look up cloud accounts (#188)
* Fix Azure acceptance test (#189)
* Add support for updating AWS archival location bucket tags (#187)
* Update changelog (#191)
  • Loading branch information
johan3141592 authored Aug 5, 2024
1 parent e1473cd commit 3edb51e
Show file tree
Hide file tree
Showing 118 changed files with 6,451 additions and 1,647 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5.0.0
with:
go-version: 1.21
go-version: 1.22
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6.1.0
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ provider "polaris" {
##### Environment Variables for Local User Accounts
When using a local user account the following environmental variables can be used to override the default local user
account behaviour:
* *RUBRIK_POLARIS_ACCOUNT_CREDENTIALS* — Overrides the content of the local user account file.
* *RUBRIK_POLARIS_ACCOUNT_FILE* — Overrides the name and path of the file to read local user accounts from.
* *RUBRIK_POLARIS_ACCOUNT_NAME* — Overrides the name of the local user account given to the credentials
parameter in the provider configuration.
Expand Down Expand Up @@ -109,6 +110,7 @@ provider "polaris" {
##### Environment Variables for Service Accounts
When using a service account the following environmental variables can be used to override the default service account
behaviour:
* *RUBRIK_POLARIS_SERVICEACCOUNT_CREDENTIALS* — Overrides the content of the service account credentials file.
* *RUBRIK_POLARIS_SERVICEACCOUNT_FILE* — Overrides the name and path of the service account credentials file.
* *RUBRIK_POLARIS_SERVICEACCOUNT_NAME* — Overrides the name of the service account.
* *RUBRIK_POLARIS_SERVICEACCOUNT_CLIENTID* — Overrides the client id of the service account.
Expand Down
48 changes: 48 additions & 0 deletions docs/data-sources/account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "polaris_account Data Source - terraform-provider-polaris"
subcategory: ""
description: |-
The polaris_account data source is used to access information about the RSC account.
-> Note: The fqdn and name fields are read from the local RSC credentials and
not from RSC.
---

# polaris_account (Data Source)

The `polaris_account` data source is used to access information about the RSC account.

-> **Note:** The `fqdn` and `name` fields are read from the local RSC credentials and
not from RSC.

## Example Usage

```terraform
# Output the features enabled for the RSC account.
data "polaris_account" "account" {}
output "features" {
value = data.polaris_account.account.features
}
# Using the fqdn field from the deployment data source to create an Azure
# AD application.
data "polaris_deployment" "deployment" {}
resource "azuread_application" "app" {
display_name = "Rubrik Security Cloud Integration"
web {
homepage_url = "https://${data.polaris_account.account.fqdn}/setup_azure"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `features` (Set of String) Features enabled for the RSC account.
- `fqdn` (String) Fully qualified domain name of the RSC account.
- `id` (String) SHA-256 hash of the features, the fully qualified domain name and the name.
- `name` (String) RSC account name.
40 changes: 40 additions & 0 deletions docs/data-sources/aws_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "polaris_aws_account Data Source - terraform-provider-polaris"
subcategory: ""
description: |-
The polaris_aws_account data source is used to access information about an AWS account
added to RSC. An AWS account is looked up using either the AWS account ID or the name.
-> Note: The account name is the name of the AWS account as it appears in RSC.
---

# polaris_aws_account (Data Source)

The `polaris_aws_account` data source is used to access information about an AWS account
added to RSC. An AWS account is looked up using either the AWS account ID or the name.

-> **Note:** The account name is the name of the AWS account as it appears in RSC.

## Example Usage

```terraform
data "polaris_aws_account" "example" {
name = "example"
}
output "example_aws_account" {
value = data.polaris_aws_account.example
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `account_id` (String) AWS account ID.
- `name` (String) AWS account name.

### Read-Only

- `id` (String) RSC cloud account ID (UUID).
20 changes: 11 additions & 9 deletions docs/data-sources/aws_archival_location.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
page_title: "polaris_aws_archival_location Data Source - terraform-provider-polaris"
subcategory: ""
description: |-
The polaris_aws_archival_location data source is used to access information about an
AWS archival location. An archival location is looked up using either the ID or the name.
---

# polaris_aws_archival_location (Data Source)


The `polaris_aws_archival_location` data source is used to access information about an
AWS archival location. An archival location is looked up using either the ID or the name.

## Example Usage

```terraform
# Using the archival location ID.
data "polaris_aws_archival_location" "location" {
archival_location_id = "db34f042-79ea-48b1-bab8-c40dfbf2ab82"
id = "db34f042-79ea-48b1-bab8-c40dfbf2ab82"
}
# Using the name.
Expand All @@ -29,16 +31,16 @@ data "polaris_aws_archival_location" "location" {

### Optional

- `archival_location_id` (String) ID of the archival location.
- `name` (String) Name of the archival location.
- `archival_location_id` (String, Deprecated) Cloud native archival location ID (UUID). **Deprecated:** use `id` instead.
- `id` (String) Cloud native archival location ID (UUID).
- `name` (String) Name of the cloud native archival location.

### Read-Only

- `bucket_prefix` (String) AWS bucket prefix.
- `bucket_prefix` (String) AWS bucket prefix. Note, `rubrik-` will always be prepended to the prefix.
- `bucket_tags` (Map of String) AWS bucket tags.
- `connection_status` (String) Connection status of the archival location.
- `id` (String) The ID of this resource.
- `kms_master_key` (String, Sensitive) AWS KMS master key alias/ID.
- `location_template` (String) Location template. If a region was specified, it will be `SPECIFIC_REGION`, otherwise `SOURCE_REGION`.
- `location_template` (String) RSC location template. If a region was specified, it will be `SPECIFIC_REGION`, otherwise `SOURCE_REGION`.
- `region` (String) AWS region to store the snapshots in. If not specified, the snapshots will be stored in the same region as the workload.
- `storage_class` (String) AWS bucket storage class.
- `storage_class` (String) AWS bucket storage class. Possible values are `STANDARD`, `STANDARD_IA`, `ONEZONE_IA`, `GLACIER_INSTANT_RETRIEVAL`, `GLACIER_DEEP_ARCHIVE` and `GLACIER_FLEXIBLE_RETRIEVAL`. Default value is `STANDARD_IA`.
104 changes: 98 additions & 6 deletions docs/data-sources/aws_cnp_artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,110 @@
page_title: "polaris_aws_cnp_artifacts Data Source - terraform-provider-polaris"
subcategory: ""
description: |-
The polaris_aws_archival_location data source is used to access information about
instance profiles and roles required by RSC for a specified feature set.
Permission Groups
Following is a list of features and their applicable permission groups. These are used
when specifying the feature set.
CLOUDNATIVEARCHIVAL
BASIC - Represents the basic set of permissions required to onboard the feature.
CLOUDNATIVEPROTECTION
BASIC - Represents the basic set of permissions required to onboard the feature.EXPORT_AND_RESTORE - Represents the set of permissions required for export and
restore operations.FILE_LEVEL_RECOVERY - Represents the set of permissions required for file-level
recovery operations.SNAPSHOT_PRIVATE_ACCESS - Represents the set of permissions required for private
access to disk snapshots.
CLOUDNATIVES3_PROTECTION
BASIC - Represents the basic set of permissions required to onboard the feature.
EXOCOMPUTE
BASIC - Represents the basic set of permissions required to onboard the feature.PRIVATE_ENDPOINTS - Represents the set of permissions required for usage of private
endpoints.RSC_MANAGED_CLUSTER - Represents the set of permissions required for the Rubrik-
managed Exocompute cluster.
RDS_PROTECTION
BASIC - Represents the basic set of permissions required to onboard the feature.
-> Note: When permission groups are specified, the BASIC permission group must
always be included.
---

# polaris_aws_cnp_artifacts (Data Source)

The `polaris_aws_archival_location` data source is used to access information about
instance profiles and roles required by RSC for a specified feature set.

## Permission Groups
Following is a list of features and their applicable permission groups. These are used
when specifying the feature set.

### CLOUD_NATIVE_ARCHIVAL
* `BASIC` - Represents the basic set of permissions required to onboard the feature.

### CLOUD_NATIVE_PROTECTION
* `BASIC` - Represents the basic set of permissions required to onboard the feature.
* `EXPORT_AND_RESTORE` - Represents the set of permissions required for export and
restore operations.
* `FILE_LEVEL_RECOVERY` - Represents the set of permissions required for file-level
recovery operations.
* `SNAPSHOT_PRIVATE_ACCESS` - Represents the set of permissions required for private
access to disk snapshots.

### CLOUD_NATIVE_S3_PROTECTION
* `BASIC` - Represents the basic set of permissions required to onboard the feature.

### EXOCOMPUTE
* `BASIC` - Represents the basic set of permissions required to onboard the feature.
* `PRIVATE_ENDPOINTS` - Represents the set of permissions required for usage of private
endpoints.
* `RSC_MANAGED_CLUSTER` - Represents the set of permissions required for the Rubrik-
managed Exocompute cluster.

### RDS_PROTECTION
* `BASIC` - Represents the basic set of permissions required to onboard the feature.

-> **Note:** When permission groups are specified, the `BASIC` permission group must
always be included.

## Example Usage

```terraform
# Permission groups defaults to BASIC.
data "polaris_aws_cnp_artifacts" "artifacts" {
feature {
name = "CLOUD_NATIVE_PROTECTION"
}
}
# Multiple permission groups. When permission groups are specified,
# the BASIC permission group must always be included.
data "polaris_aws_cnp_artifacts" "artifacts" {
feature {
name = "CLOUD_NATIVE_PROTECTION"
permission_groups = [
"BASIC",
"EXPORT_AND_RESTORE",
"FILE_LEVEL_RECOVERY",
]
}
}
# Multiple features with permission groups.
data "polaris_aws_cnp_artifacts" "artifacts" {
features = ["CLOUD_NATIVE_PROTECTION"]
feature {
name = "CLOUD_NATIVE_ARCHIVAL"
permission_groups = [
"BASIC",
]
}
feature {
name = "CLOUD_NATIVE_PROTECTION"
permission_groups = [
"BASIC",
"EXPORT_AND_RESTORE",
"FILE_LEVEL_RECOVERY",
]
}
}
```

Expand All @@ -27,11 +119,11 @@ data "polaris_aws_cnp_artifacts" "artifacts" {

### Optional

- `cloud` (String) AWS cloud type.
- `cloud` (String) AWS cloud type. Possible values are `STANDARD`, `CHINA` and `GOV`. Default value is `STANDARD`.

### Read-Only

- `id` (String) The ID of this resource.
- `id` (String) SHA-256 hash of the instance profile keys and the roleskeys.
- `instance_profile_keys` (Set of String) Instance profile keys for the RSC features.
- `role_keys` (Set of String) Role keys for the RSC features.

Expand All @@ -40,5 +132,5 @@ data "polaris_aws_cnp_artifacts" "artifacts" {

Required:

- `name` (String) Feature name.
- `permission_groups` (Set of String) Permission groups to assign to the feature.
- `name` (String) RSC feature name. Possible values are `CLOUD_NATIVE_ARCHIVAL`, `CLOUD_NATIVE_PROTECTION`, `CLOUD_NATIVE_S3_PROTECTION`, `EXOCOMPUTE` and `RDS_PROTECTION`.
- `permission_groups` (Set of String) RSC permission groups for the feature. Possible values are `BASIC`, `EXPORT_AND_RESTORE`, `FILE_LEVEL_RECOVERY`, `SNAPSHOT_PRIVATE_ACCESS`, `PRIVATE_ENDPOINT` and `RSC_MANAGED_CLUSTER`. For backwards compatibility, `[]` is interpreted as all applicable permission groups.
Loading

0 comments on commit 3edb51e

Please sign in to comment.