Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for Self provisioned AWS S3 or S3-compatible storage credential creation #296

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/data-sources/kubernetes_secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Only one scope per resource is allowed.
```terraform
# Read Tanzu Mission Control kubernetes secret : fetch namespace details
data "tanzu-mission-control_kubernetes_secret" "read_secret" {
name = "tf-secret" # Required
namespace_name = "tf-secret-namespace-name" # Required
name = "tf-secret" # Required
namespace_name = "tf-secret-namespace-name" # Required
shobha2626 marked this conversation as resolved.
Show resolved Hide resolved

scope {
cluster {
cluster_name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
cluster_name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ The Available tab on the Catalog page in the Tanzu Mission Control console shows
```terraform
# Read Tanzu Mission Control package : fetch cluster package details
data "tanzu-mission-control_package" "get_cluster_package" {
name = "test-package-version" # Required
name = "test-package-version" # Required

metadata_name = "package-metadata-name" # Required
metadata_name = "package-metadata-name" # Required

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
16 changes: 8 additions & 8 deletions docs/data-sources/package_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ The Available tab on the Catalog page in the Tanzu Mission Control console shows
```terraform
# Read Tanzu Mission Control package install with attached set as default value.
data "tanzu-mission-control_package_install" "read_package_install" {
name = "test-pakage-install-name" # Required
name = "test-pakage-install-name" # Required

namespace = "test-namespace-name" # Required
namespace = "test-namespace-name" # Required

scope {
cluster {
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
scope {
cluster {
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
}
}
```
<!-- schema generated by tfplugindocs -->
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/package_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data "tanzu-mission-control_package_repository" "read_cluster_pkg_repository" {

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ The Available tab on the Catalog page in the Tanzu Mission Control console shows
```terraform
# Read Tanzu Mission Control packages : fetch cluster packages details
data "tanzu-mission-control_packages" "read_cluster_packages" {
metadata_name = "package-metadata-name" # Required
metadata_name = "package-metadata-name" # Required

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
18 changes: 9 additions & 9 deletions docs/guides/tanzu-mission-control_gitops.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se

spec {
data {
username_password {
username = "testusername" # Required
password = "testpassword" # Required
username_password {
username = "testusername" # Required
password = "testpassword" # Required
}
}
}
Expand Down Expand Up @@ -360,9 +360,9 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se

spec {
data {
ssh_key {
identity = "testidentity" # Required
known_hosts = "testknown_hosts" # Required
ssh_key {
identity = "testidentity" # Required
known_hosts = "testknown_hosts" # Required
}
}
}
Expand Down Expand Up @@ -407,9 +407,9 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se

spec {
data {
ssh_key {
identity = "testidentity" # Required
known_hosts = "testknown_hosts" # Required
ssh_key {
identity = "testidentity" # Required
known_hosts = "testknown_hosts" # Required
}
}
}
Expand Down
33 changes: 33 additions & 0 deletions docs/resources/credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,39 @@ resource "tanzu-mission-control_credential" "tmc_provisioned_aws_s3_cred" {
}
```

# Credential for Self provisioned AWS S3 or S3-compatible storage used for data-protection

## Example Usage

```terraform
# Create Self provisioned AWS S3 or S3-compatible credential
resource "tanzu-mission-control_credential" "aws_eks_cred" {
name = "tf-aws-s3-self-test"

meta {
description = "Self provisioned AWS S3 or S3-compatible storage credential for data protection"
labels = {
"key1" : "value1",
}
}

spec {
capability = "DATA_PROTECTION"
provider = "GENERIC_S3"
data {
key_value {
type = "OPAQUE_SECRET_TYPE"
data = {
"aws_access_key_id" = "abcd="
"aws_secret_access_key" = "xyz=="
}
}
}
}
ready_wait_timeout = "5m" // Wait time for credential create operations to finish (default: 3m).
}
```

# Credential for Tanzu Observability

## Example Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/git_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository"

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
18 changes: 9 additions & 9 deletions docs/resources/kubernetes_secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ Only one scope per resource is allowed.
```terraform
# Create Tanzu Mission Control kubernetes secret with attached set as default value.
resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
name = "tf-secret" # Required
namespace_name = "tf-secret-namespace-name" # Required
name = "tf-secret" # Required
namespace_name = "tf-secret-namespace-name" # Required

scope {
cluster {
cluster_name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
cluster_name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
}

export = false # Default: false
export = false # Default: false

meta {
description = "Create namespace through terraform"
Expand All @@ -56,9 +56,9 @@ resource "tanzu-mission-control_kubernetes_secret" "create_secret" {

spec {
docker_config_json {
username = "testusername" # Required
password = "testpassword" # Required
image_registry_url = "testimageregistryurl" # Required
username = "testusername" # Required
password = "testpassword" # Required
image_registry_url = "testimageregistryurl" # Required
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/kustomization.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" {

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
34 changes: 17 additions & 17 deletions docs/resources/package_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ The Available tab on the Catalog page in the Tanzu Mission Control console shows
```terraform
# Create Tanzu Mission Control package install with attached set as default value.
resource "tanzu-mission-control_package_install" "create_package_install" {
name = "test-pakage-install-name" # Required
name = "test-pakage-install-name" # Required

namespace = "test-namespace-name" # Required
namespace = "test-namespace-name" # Required

scope {
cluster {
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
scope {
cluster {
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
}

spec {
package_ref {
package_metadata_name = "test-package-metadata-name" # Required
spec {
package_ref {
package_metadata_name = "test-package-metadata-name" # Required

version_selection {
constraints = "test-version-selection" # Required
}
}

inline_values = {"test" : "test" }
version_selection {
constraints = "test-version-selection" # Required
}
}

inline_values = { "test" : "test" }
}
}
```
<!-- schema generated by tfplugindocs -->
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/package_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "tanzu-mission-control_package_repository" "create_cluster_pkg_reposito

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand All @@ -37,7 +37,7 @@ resource "tanzu-mission-control_package_repository" "create_cluster_pkg_reposito

spec {
imgpkg_bundle {
image = "testImage" # Required
image = "testImage" # Required
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions docs/resources/repository_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_group_sou

spec {
data {
username_password {
username_password {
username = "testusername" # Required
password = "testpassword" # Required
}
Expand Down Expand Up @@ -88,9 +88,9 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se

spec {
data {
username_password {
username = "testusername" # Required
password = "testpassword" # Required
username_password {
username = "testusername" # Required
password = "testpassword" # Required
}
}
}
Expand Down Expand Up @@ -119,7 +119,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_group_sou

spec {
data {
ssh_key {
ssh_key {
identity = "testidentity" # Required
known_hosts = "testknown_hosts" # Required
}
Expand Down Expand Up @@ -152,7 +152,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se

spec {
data {
ssh_key {
ssh_key {
identity = "testidentity" # Required
known_hosts = "testknown_hosts" # Required
}
Expand Down
6 changes: 3 additions & 3 deletions examples/data-sources/package/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Read Tanzu Mission Control package : fetch cluster package details
data "tanzu-mission-control_package" "get_cluster_package" {
name = "test-package-version" # Required
name = "test-package-version" # Required

metadata_name = "package-metadata-name" # Required
metadata_name = "package-metadata-name" # Required

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
16 changes: 8 additions & 8 deletions examples/data-sources/packageinstall/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Read Tanzu Mission Control package install with attached set as default value.
data "tanzu-mission-control_package_install" "read_package_install" {
name = "test-pakage-install-name" # Required
name = "test-pakage-install-name" # Required

namespace = "test-namespace-name" # Required
namespace = "test-namespace-name" # Required

scope {
cluster {
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
scope {
cluster {
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
}
}
4 changes: 2 additions & 2 deletions examples/data-sources/packages/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Read Tanzu Mission Control packages : fetch cluster packages details
data "tanzu-mission-control_packages" "read_cluster_packages" {
metadata_name = "package-metadata-name" # Required
metadata_name = "package-metadata-name" # Required

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data "tanzu-mission-control_package_repository" "read_cluster_pkg_repository" {

scope {
cluster {
name = "testcluster" # Required
name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
Expand Down
Loading