From e7ab629ad217dce05a31a434db2db9f12f5cac40 Mon Sep 17 00:00:00 2001 From: Enis Soztutar Date: Thu, 14 Dec 2023 17:07:14 -0800 Subject: [PATCH] Regenerated the docs for environments_proxy_configuration and other changes I also updated the release instructions. --- README.md | 39 +++--- ...vironments_aws_credential_prerequisites.md | 3 +- docs/resources/datalake_gcp_datalake.md | 115 ++++++++---------- .../environments_proxy_configuration.md | 36 ++++++ 4 files changed, 106 insertions(+), 87 deletions(-) create mode 100644 docs/resources/environments_proxy_configuration.md diff --git a/README.md b/README.md index 0871593f..bd58c141 100644 --- a/README.md +++ b/README.md @@ -210,30 +210,31 @@ to the Terraform Registry. #### Publishing new releases 1. Make sure that the build is fine, and unit tests and Terraform acceptance tests are running fine. -2. Make sure that the NOTICE file is up to date and re-export and re-commit the NOTICE using the tool. -3. Review the change log and update it as necessary. Ideally the content is +2. Run `make docs` to make sure that there is no new content being generated. If so, get a PR merged with those changes first. +3. Make sure that the NOTICE file is up to date and re-export and re-commit the NOTICE using the tool. +4. Review the change log and update it as necessary. Ideally the content is up-to-date as it has been maintained along the way. Note the data of the release and create a new, empty unreleased entry at the top. -4. Set the GPG fingerprint to use to sign the release `export GPG_FINGERPRINT=`. Use (`gpg --list-secret-keys --keyid-format=long` to find out). -5. Cache the password for your GPG private key with `echo "foo" | gpg --armor --detach-sign --default-key $GPG_FINGERPRINT` (GoReleaser does not support signing binaries with a GPG key that requires a passphrase. Some systems may cache your GPG passphrase for a few minutes). -6. Tag the commit with an appropriate semantic version, e.g. `git tag v0.0.1`. +5. Set the GPG fingerprint to use to sign the release `export GPG_FINGERPRINT=`. Use (`gpg --list-secret-keys --keyid-format=long` to find out). +6. Cache the password for your GPG private key with `echo "foo" | gpg --armor --detach-sign --default-key $GPG_FINGERPRINT` (GoReleaser does not support signing binaries with a GPG key that requires a passphrase. Some systems may cache your GPG passphrase for a few minutes). +7. Tag the commit with an appropriate semantic version, e.g. `git tag v0.0.1`. 1. We use [Semantic Versioning](https://semver.org/) to mark the releases and `v` prefix is mandatory for terraform providers 2. A release-candidate can be pushed by adding `-rc1` suffix like `v0.0.1-rc1`. 3. You can find the next version to use by looking at the existing releases / tags. -7. Push the tag: `git push origin v0.0.1`. -8. Run `goreleaser`: `make release` -9. If goreleaser runs successfully, it will automatically: - 1. Cross-compile against all platforms and create binaries under `dist/` - 2. Create zip archives for all binaries. - 3. Checksums all of the binaries using sha256 and saves the checksums under `dist/terraform-provider-cdp__SHA256SUMS`. - 4. Signs the checksums file with the gpg keys of the user. - 5. Creates other metadata files for the build and release. - 6. Creates a release **as a draft** in Github (we are intentionally doing this. Once we get the other mechanics working we can do non-draft releases). - 7. Uploads artifacts and release notes to the Github release. -10. Until otherwise noted, select the pre-release checkbox to indicate that we +8. Push the tag: `git push origin v0.0.1`. +9. Run `goreleaser`: `make release` +10. If goreleaser runs successfully, it will automatically: + 1. Cross-compile against all platforms and create binaries under `dist/` + 2. Create zip archives for all binaries. + 3. Checksums all of the binaries using sha256 and saves the checksums under `dist/terraform-provider-cdp__SHA256SUMS`. + 4. Signs the checksums file with the gpg keys of the user. + 5. Creates other metadata files for the build and release. + 6. Creates a release **as a draft** in Github (we are intentionally doing this. Once we get the other mechanics working we can do non-draft releases). + 7. Uploads artifacts and release notes to the Github release. +11. Until otherwise noted, select the pre-release checkbox to indicate that we are not yet production ready. -11. The release that is pushed by goreleaser is a draft release. Go to the release page in Github, and double check the release notes, artifacts and the version. If everything is fine, click on "Edit" and then "Publish Release" button. -12. Once the release is done, send a PR to update the `CHANGELOG.md` with the new release section, and update the release date. +12. The release that is pushed by goreleaser is a draft release. Go to the release page in Github, and double check the release notes, artifacts and the version. If everything is fine, click on "Edit" and then "Publish Release" button. +13. Once the release is done, send a PR to update the `CHANGELOG.md` with the new release section, and update the release date. #### Publishing new releases to Terraform Registry -Above staps only publish the artifacts to github. We need to futher publish the artifacts to Terraform Registry. The steps will be documented here. +Above steps only publish the artifacts to github. We need to futher publish the artifacts to Terraform Registry. The steps will be documented here. diff --git a/docs/data-sources/environments_aws_credential_prerequisites.md b/docs/data-sources/environments_aws_credential_prerequisites.md index d4b0b604..1a920ef6 100644 --- a/docs/data-sources/environments_aws_credential_prerequisites.md +++ b/docs/data-sources/environments_aws_credential_prerequisites.md @@ -65,4 +65,5 @@ output "external_id" { ### Read-Only - `account_id` (String) The AWS account ID of the identity used by CDP when assuming a delegated access role associated with a CDP credential. -- `external_id` (String) The external ID that will be used when assuming a delegated access role associated with a CDP credential. \ No newline at end of file +- `external_id` (String) The external ID that will be used when assuming a delegated access role associated with a CDP credential. +- `id` (String) The ID of this resource. \ No newline at end of file diff --git a/docs/resources/datalake_gcp_datalake.md b/docs/resources/datalake_gcp_datalake.md index f0606172..0af22cf5 100644 --- a/docs/resources/datalake_gcp_datalake.md +++ b/docs/resources/datalake_gcp_datalake.md @@ -10,17 +10,53 @@ description: |- A Data Lake is a service which provides a protective ring around the data stored in a cloud object store, including authentication, authorization, and governance support. - +## Example Usage + +```terraform +// Copyright 2023 Cloudera. All Rights Reserved. +// +// This file is licensed under the Apache License Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +// +// This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +// OF ANY KIND, either express or implied. Refer to the License for the specific +// permissions and limitations governing your use of the file. + +resource "cdp_datalake_gcp_datalake" "example" { + datalake_name = "" + environment_name = "" + cloud_provider_configuration = { + service_account_email = "" + storage_location = "" + } +} + +output "name" { + value = cdp_datalake_gcp_datalake.example.datalake_name +} + +output "environment" { + value = cdp_datalake_gcp_datalake.example.environment_name +} + +output "service_account_email" { + value = cdp_datalake_gcp_datalake.example.cloud_provider_configuration.service_account_email +} + +output "storage_location" { + value = cdp_datalake_gcp_datalake.example.cloud_provider_configuration.storage_location +} +``` ## Schema ### Required +- `cloud_provider_configuration` (Attributes) (see [below for nested schema](#nestedatt--cloud_provider_configuration)) - `datalake_name` (String) - `environment_name` (String) -- `instance_profile` (String) -- `storage_location_base` (String) ### Optional @@ -37,18 +73,22 @@ A Data Lake is a service which provides a protective ring around the data stored ### Read-Only -- `certificate_expiration_state` (String) -- `cloudera_manager` (Attributes) (see [below for nested schema](#nestedatt--cloudera_manager)) - `creation_date` (String) - `crn` (String) -- `endpoints` (Attributes Set) (see [below for nested schema](#nestedatt--endpoints)) - `environment_crn` (String) - `id` (String) The ID of this resource. -- `instance_groups` (Attributes Set) (see [below for nested schema](#nestedatt--instance_groups)) -- `product_versions` (Attributes Set) (see [below for nested schema](#nestedatt--product_versions)) - `status` (String) - `status_reason` (String) + +### Nested Schema for `cloud_provider_configuration` + +Required: + +- `service_account_email` (String) +- `storage_location` (String) + + ### Nested Schema for `custom_instance_groups` @@ -93,62 +133,3 @@ Required: ### Nested Schema for `recipes.recipe_names` - - -### Nested Schema for `cloudera_manager` - -Read-Only: - -- `cloudera_manager_repository_url` (String) -- `cloudera_manager_server_url` (String) -- `version` (String) - - - -### Nested Schema for `endpoints` - -Read-Only: - -- `display_name` (String) -- `knox_service` (String) -- `mode` (String) -- `open` (Boolean) -- `service_name` (String) -- `service_url` (String) - - - -### Nested Schema for `instance_groups` - -Read-Only: - -- `instances` (Attributes Set) (see [below for nested schema](#nestedatt--instance_groups--instances)) -- `name` (String) - - -### Nested Schema for `instance_groups.instances` - -Read-Only: - -- `discovery_fqdn` (String) -- `id` (String) -- `instance_group` (String) -- `instance_status` (String) -- `instance_type_val` (String) -- `private_ip` (String) -- `public_ip` (String) -- `ssh_port` (Number) -- `state` (String) -- `status_reason` (String) - - - - -### Nested Schema for `product_versions` - -Read-Only: - -- `name` (String) -- `version` (String) - - diff --git a/docs/resources/environments_proxy_configuration.md b/docs/resources/environments_proxy_configuration.md new file mode 100644 index 00000000..0f3028f5 --- /dev/null +++ b/docs/resources/environments_proxy_configuration.md @@ -0,0 +1,36 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "cdp_environments_proxy_configuration Resource - terraform-provider-cdp" +subcategory: "" +description: |- + +--- + +# cdp_environments_proxy_configuration (Resource) + + + + + + +## Schema + +### Required + +- `host` (String) +- `name` (String) +- `port` (Number) +- `protocol` (String) + +### Optional + +- `description` (String) +- `no_proxy_hosts` (Set of String) +- `password` (String) +- `user` (String) + +### Read-Only + +- `id` (String) The ID of this resource. + +