From f8ccb99590bdd85193f3e1d3a7f38cb839803454 Mon Sep 17 00:00:00 2001 From: Ramya Bangera Date: Fri, 13 Oct 2023 16:06:18 +0530 Subject: [PATCH 1/3] Add example for creating Self provisioned AWS S3 or S3 compatible storage credential for data protection Signed-off-by: Ramya Bangera --- docs/data-sources/kubernetes_secret.md | 10 +++---- docs/resources/credential.md | 33 +++++++++++++++++++++ docs/resources/kubernetes_secret.md | 18 +++++------ examples/resources/credential/generic_s3.tf | 26 ++++++++++++++++ templates/resources/credential.md.tmpl | 6 ++++ 5 files changed, 79 insertions(+), 14 deletions(-) create mode 100644 examples/resources/credential/generic_s3.tf diff --git a/docs/data-sources/kubernetes_secret.md b/docs/data-sources/kubernetes_secret.md index aaddc6b6f..a4eba80a3 100644 --- a/docs/data-sources/kubernetes_secret.md +++ b/docs/data-sources/kubernetes_secret.md @@ -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 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 } } } diff --git a/docs/resources/credential.md b/docs/resources/credential.md index bc10a83f7..30e6d8dd8 100644 --- a/docs/resources/credential.md +++ b/docs/resources/credential.md @@ -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 = "1m" // Wait time for credential create operations to finish (default: 3m). +} +``` + # Credential for Tanzu Observability ## Example Usage diff --git a/docs/resources/kubernetes_secret.md b/docs/resources/kubernetes_secret.md index 49277f501..9cc2a9d80 100644 --- a/docs/resources/kubernetes_secret.md +++ b/docs/resources/kubernetes_secret.md @@ -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" @@ -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 } } } diff --git a/examples/resources/credential/generic_s3.tf b/examples/resources/credential/generic_s3.tf new file mode 100644 index 000000000..1ed80cf7c --- /dev/null +++ b/examples/resources/credential/generic_s3.tf @@ -0,0 +1,26 @@ +# 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 = "1m" // Wait time for credential create operations to finish (default: 3m). +} diff --git a/templates/resources/credential.md.tmpl b/templates/resources/credential.md.tmpl index 36cd1376c..4d65e3fc4 100644 --- a/templates/resources/credential.md.tmpl +++ b/templates/resources/credential.md.tmpl @@ -31,6 +31,12 @@ For proxy credential add the annotation `proxyType : explicit` for explicit prox {{ tffile "examples/resources/credential/dataprotection.tf" }} +# Credential for Self provisioned AWS S3 or S3-compatible storage used for data-protection + +## Example Usage + +{{ tffile "examples/resources/credential/generic_s3.tf" }} + # Credential for Tanzu Observability ## Example Usage From 6155167f414add3c2c2ae37f7eb91af1843e3e03 Mon Sep 17 00:00:00 2001 From: Ramya Bangera Date: Fri, 20 Oct 2023 12:02:34 +0530 Subject: [PATCH 2/3] Format the example terraform resource files Signed-off-by: Ramya Bangera --- examples/data-sources/package/data-source.tf | 6 ++-- .../packageinstall/data-source.tf | 16 ++++----- examples/data-sources/packages/data-source.tf | 4 +-- .../tanzupackagerepository/data-source.tf | 2 +- examples/resources/credential/generic_s3.tf | 6 ++-- .../git_repository/resource_cluster.tf | 2 +- .../kustomization/resource_cluster.tf | 2 +- examples/resources/packageinstall/resource.tf | 34 +++++++++---------- .../resource_cluster_group_ssh.tf | 2 +- ...esource_cluster_group_username_password.tf | 2 +- .../source_secret/resource_cluster_ssh.tf | 2 +- .../resource_cluster_username_password.tf | 6 ++-- .../tanzupackagerepository/resource.tf | 4 +-- examples/usecases/auth_git_repo_usecase.tf | 6 ++-- examples/usecases/ssh_cg_git_repo_usecase.tf | 6 ++-- examples/usecases/ssh_repo_credential.tf | 6 ++-- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/examples/data-sources/package/data-source.tf b/examples/data-sources/package/data-source.tf index b932f176d..4941e503a 100644 --- a/examples/data-sources/package/data-source.tf +++ b/examples/data-sources/package/data-source.tf @@ -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 } diff --git a/examples/data-sources/packageinstall/data-source.tf b/examples/data-sources/packageinstall/data-source.tf index 056643fc1..499b5cdd2 100644 --- a/examples/data-sources/packageinstall/data-source.tf +++ b/examples/data-sources/packageinstall/data-source.tf @@ -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 } + } } \ No newline at end of file diff --git a/examples/data-sources/packages/data-source.tf b/examples/data-sources/packages/data-source.tf index 9c0867654..bfe01107f 100644 --- a/examples/data-sources/packages/data-source.tf +++ b/examples/data-sources/packages/data-source.tf @@ -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 } diff --git a/examples/data-sources/tanzupackagerepository/data-source.tf b/examples/data-sources/tanzupackagerepository/data-source.tf index 4131c210b..511cfc254 100644 --- a/examples/data-sources/tanzupackagerepository/data-source.tf +++ b/examples/data-sources/tanzupackagerepository/data-source.tf @@ -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 } diff --git a/examples/resources/credential/generic_s3.tf b/examples/resources/credential/generic_s3.tf index 1ed80cf7c..f6ddaef65 100644 --- a/examples/resources/credential/generic_s3.tf +++ b/examples/resources/credential/generic_s3.tf @@ -16,11 +16,11 @@ resource "tanzu-mission-control_credential" "aws_eks_cred" { key_value { type = "OPAQUE_SECRET_TYPE" data = { - "aws_access_key_id" = "abcd=" - "aws_secret_access_key" = "xyz==" + "aws_access_key_id" = "abcd=" + "aws_secret_access_key" = "xyz==" } } } } - ready_wait_timeout = "1m" // Wait time for credential create operations to finish (default: 3m). + ready_wait_timeout = "5m" // Wait time for credential create operations to finish (default: 3m). } diff --git a/examples/resources/git_repository/resource_cluster.tf b/examples/resources/git_repository/resource_cluster.tf index 47ff9c77d..185775e6f 100644 --- a/examples/resources/git_repository/resource_cluster.tf +++ b/examples/resources/git_repository/resource_cluster.tf @@ -6,7 +6,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 } diff --git a/examples/resources/kustomization/resource_cluster.tf b/examples/resources/kustomization/resource_cluster.tf index aa802e25e..bfc234fe9 100644 --- a/examples/resources/kustomization/resource_cluster.tf +++ b/examples/resources/kustomization/resource_cluster.tf @@ -6,7 +6,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 } diff --git a/examples/resources/packageinstall/resource.tf b/examples/resources/packageinstall/resource.tf index 27e138874..73f3f5619 100644 --- a/examples/resources/packageinstall/resource.tf +++ b/examples/resources/packageinstall/resource.tf @@ -1,26 +1,26 @@ # 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" } + } } \ No newline at end of file diff --git a/examples/resources/source_secret/resource_cluster_group_ssh.tf b/examples/resources/source_secret/resource_cluster_group_ssh.tf index 9f0f7e223..51d200589 100644 --- a/examples/resources/source_secret/resource_cluster_group_ssh.tf +++ b/examples/resources/source_secret/resource_cluster_group_ssh.tf @@ -15,7 +15,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 } diff --git a/examples/resources/source_secret/resource_cluster_group_username_password.tf b/examples/resources/source_secret/resource_cluster_group_username_password.tf index f209244c0..6bab03407 100644 --- a/examples/resources/source_secret/resource_cluster_group_username_password.tf +++ b/examples/resources/source_secret/resource_cluster_group_username_password.tf @@ -15,7 +15,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_group_sou spec { data { - username_password { + username_password { username = "testusername" # Required password = "testpassword" # Required } diff --git a/examples/resources/source_secret/resource_cluster_ssh.tf b/examples/resources/source_secret/resource_cluster_ssh.tf index 971a2a88f..0071d24f3 100644 --- a/examples/resources/source_secret/resource_cluster_ssh.tf +++ b/examples/resources/source_secret/resource_cluster_ssh.tf @@ -17,7 +17,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 } diff --git a/examples/resources/source_secret/resource_cluster_username_password.tf b/examples/resources/source_secret/resource_cluster_username_password.tf index fc6ee35c7..47169c5a9 100644 --- a/examples/resources/source_secret/resource_cluster_username_password.tf +++ b/examples/resources/source_secret/resource_cluster_username_password.tf @@ -17,9 +17,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 } } } diff --git a/examples/resources/tanzupackagerepository/resource.tf b/examples/resources/tanzupackagerepository/resource.tf index 3fa943721..8f2f19ea2 100644 --- a/examples/resources/tanzupackagerepository/resource.tf +++ b/examples/resources/tanzupackagerepository/resource.tf @@ -4,7 +4,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 } @@ -17,7 +17,7 @@ resource "tanzu-mission-control_package_repository" "create_cluster_pkg_reposito spec { imgpkg_bundle { - image = "testImage" # Required + image = "testImage" # Required } } } \ No newline at end of file diff --git a/examples/usecases/auth_git_repo_usecase.tf b/examples/usecases/auth_git_repo_usecase.tf index 5cfc5f785..69d5f5880 100644 --- a/examples/usecases/auth_git_repo_usecase.tf +++ b/examples/usecases/auth_git_repo_usecase.tf @@ -59,9 +59,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 } } } diff --git a/examples/usecases/ssh_cg_git_repo_usecase.tf b/examples/usecases/ssh_cg_git_repo_usecase.tf index 55378c477..d7f07f73e 100644 --- a/examples/usecases/ssh_cg_git_repo_usecase.tf +++ b/examples/usecases/ssh_cg_git_repo_usecase.tf @@ -32,9 +32,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 } } } diff --git a/examples/usecases/ssh_repo_credential.tf b/examples/usecases/ssh_repo_credential.tf index 4a4195942..a640f43b6 100644 --- a/examples/usecases/ssh_repo_credential.tf +++ b/examples/usecases/ssh_repo_credential.tf @@ -59,9 +59,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 } } } From 8d2244abce2b87b0b6fed9ba1b4438591e5a34ae Mon Sep 17 00:00:00 2001 From: Ramya Bangera Date: Fri, 20 Oct 2023 12:30:47 +0530 Subject: [PATCH 3/3] Regenerate docs after terraform-fmt Signed-off-by: Ramya Bangera --- docs/data-sources/package.md | 6 ++-- docs/data-sources/package_install.md | 16 +++++----- docs/data-sources/package_repository.md | 2 +- docs/data-sources/packages.md | 4 +-- docs/guides/tanzu-mission-control_gitops.md | 18 +++++------ docs/resources/credential.md | 6 ++-- docs/resources/git_repository.md | 2 +- docs/resources/kustomization.md | 2 +- docs/resources/package_install.md | 34 ++++++++++----------- docs/resources/package_repository.md | 4 +-- docs/resources/repository_credential.md | 12 ++++---- 11 files changed, 53 insertions(+), 53 deletions(-) diff --git a/docs/data-sources/package.md b/docs/data-sources/package.md index fbae1b553..85210754c 100644 --- a/docs/data-sources/package.md +++ b/docs/data-sources/package.md @@ -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 } diff --git a/docs/data-sources/package_install.md b/docs/data-sources/package_install.md index 304b9626e..957d4b243 100644 --- a/docs/data-sources/package_install.md +++ b/docs/data-sources/package_install.md @@ -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 } + } } ``` diff --git a/docs/data-sources/package_repository.md b/docs/data-sources/package_repository.md index 7ebd87e4b..a29c6c193 100644 --- a/docs/data-sources/package_repository.md +++ b/docs/data-sources/package_repository.md @@ -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 } diff --git a/docs/data-sources/packages.md b/docs/data-sources/packages.md index c08e893ff..f04f1120b 100644 --- a/docs/data-sources/packages.md +++ b/docs/data-sources/packages.md @@ -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 } diff --git a/docs/guides/tanzu-mission-control_gitops.md b/docs/guides/tanzu-mission-control_gitops.md index e70fe38d2..da733188e 100644 --- a/docs/guides/tanzu-mission-control_gitops.md +++ b/docs/guides/tanzu-mission-control_gitops.md @@ -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 } } } @@ -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 } } } @@ -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 } } } diff --git a/docs/resources/credential.md b/docs/resources/credential.md index 30e6d8dd8..1acf8a3d7 100644 --- a/docs/resources/credential.md +++ b/docs/resources/credential.md @@ -195,13 +195,13 @@ resource "tanzu-mission-control_credential" "aws_eks_cred" { key_value { type = "OPAQUE_SECRET_TYPE" data = { - "aws_access_key_id" = "abcd=" - "aws_secret_access_key" = "xyz==" + "aws_access_key_id" = "abcd=" + "aws_secret_access_key" = "xyz==" } } } } - ready_wait_timeout = "1m" // Wait time for credential create operations to finish (default: 3m). + ready_wait_timeout = "5m" // Wait time for credential create operations to finish (default: 3m). } ``` diff --git a/docs/resources/git_repository.md b/docs/resources/git_repository.md index 44c5ebe0e..8d8d95a33 100644 --- a/docs/resources/git_repository.md +++ b/docs/resources/git_repository.md @@ -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 } diff --git a/docs/resources/kustomization.md b/docs/resources/kustomization.md index 9d8383eca..3c18c2b01 100644 --- a/docs/resources/kustomization.md +++ b/docs/resources/kustomization.md @@ -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 } diff --git a/docs/resources/package_install.md b/docs/resources/package_install.md index b5d920f9d..bf18126bb 100644 --- a/docs/resources/package_install.md +++ b/docs/resources/package_install.md @@ -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" } + } } ``` diff --git a/docs/resources/package_repository.md b/docs/resources/package_repository.md index 594db2018..0874d89b2 100644 --- a/docs/resources/package_repository.md +++ b/docs/resources/package_repository.md @@ -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 } @@ -37,7 +37,7 @@ resource "tanzu-mission-control_package_repository" "create_cluster_pkg_reposito spec { imgpkg_bundle { - image = "testImage" # Required + image = "testImage" # Required } } } diff --git a/docs/resources/repository_credential.md b/docs/resources/repository_credential.md index c142c1111..0efc985f8 100644 --- a/docs/resources/repository_credential.md +++ b/docs/resources/repository_credential.md @@ -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 } @@ -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 } } } @@ -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 } @@ -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 }