From 89ba6eb4970f26bbdb61495ce539929dc1f31deb Mon Sep 17 00:00:00 2001 From: Steve Wall Date: Tue, 31 Dec 2024 14:09:02 -0700 Subject: [PATCH] Change terraform file style from imperative to declarative. #482 Signed-off-by: steven.wall@capstonec.com --- docs/guides/tanzu-mission-control_cluster.md | 6 +- docs/guides/tanzu-mission-control_gitops.md | 68 +++++++++---------- docs/guides/tanzu-mission-control_helm.md | 32 ++++----- .../guides/tanzu-mission-control_node_pool.md | 6 +- docs/guides/tanzu-mission-control_policy.md | 30 ++++---- docs/resources/cluster.md | 6 +- docs/resources/cluster_group.md | 4 +- docs/resources/cluster_node_pool.md | 2 +- docs/resources/git_repository.md | 4 +- docs/resources/helm_feature.md | 4 +- docs/resources/helm_release.md | 12 ++-- docs/resources/kubernetes_secret.md | 8 +-- docs/resources/kustomization.md | 4 +- docs/resources/namespace.md | 4 +- docs/resources/package_install.md | 2 +- docs/resources/package_repository.md | 2 +- docs/resources/provisioner.md | 2 +- docs/resources/repository_credential.md | 8 +-- docs/resources/workspace.md | 2 +- .../cluster/resource_cluster_tkg_aws.tf | 2 +- .../cluster/resource_cluster_tkg_vsphere.tf | 2 +- .../cluster/resource_cluster_tkgs.tf | 2 +- examples/resources/cluster_group/resource.tf | 4 +- .../resources/cluster_node_pool/resource.tf | 2 +- .../git_repository/resource_cluster.tf | 2 +- .../git_repository/resource_cluster_group.tf | 2 +- examples/resources/helmfeature/cg_resource.tf | 2 +- examples/resources/helmfeature/cl_resource.tf | 2 +- examples/resources/helmrelease/cg_resource.tf | 4 +- .../helmrelease/cl_resource_git_type.tf | 4 +- .../helmrelease/cl_resource_helm_type.tf | 4 +- .../kubernetes_secret/cg_resource.tf | 4 +- .../resources/kubernetes_secret/resource.tf | 4 +- .../kustomization/resource_cluster.tf | 2 +- .../kustomization/resource_cluster_group.tf | 2 +- examples/resources/namespace/resource.tf | 4 +- examples/resources/packageinstall/resource.tf | 2 +- .../provisioner/provisioner_resource.tf | 2 +- .../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 | 2 +- .../tanzupackagerepository/resource.tf | 2 +- examples/resources/workspace/resource.tf | 2 +- examples/usecases/access_policy_usecase.tf | 18 ++--- examples/usecases/auth_git_repo_usecase.tf | 16 ++--- examples/usecases/cg_git_repo_usecase.tf | 14 ++-- .../usecases/cg_helm_release_git_usecase.tf | 12 ++-- .../usecases/cl_helm_release_git_usecase.tf | 10 +-- examples/usecases/cl_helm_release_usecase.tf | 10 +-- examples/usecases/custom_policy_usecase.tf | 4 +- ...tom_policy_with_custom_template_usecase.tf | 4 +- examples/usecases/git_repo_usecase.tf | 12 ++-- examples/usecases/nodepool_usecase.tf | 6 +- examples/usecases/security_policy_usecase.tf | 4 +- examples/usecases/ssh_cg_git_repo_usecase.tf | 20 +++--- examples/usecases/ssh_repo_credential.tf | 6 +- examples/usecases/usecase.tf | 36 +++++----- .../helmfeature/resource_helm_feature_test.go | 4 +- .../helmrelease/resource_helm_release_test.go | 8 +-- .../repository_data_source_test.go | 4 +- .../package/data_source_package_test.go | 4 +- .../packages/data_source_packages_test.go | 4 +- .../package_install_resource_test.go | 4 +- .../data_source_repository_test.go | 2 +- .../resource_package_repository_test.go | 2 +- internal/resources/testing/test_helper.go | 4 +- resource_templates/cluster_group.tf | 4 +- resource_templates/cluster_node_pool.tf | 2 +- resource_templates/cluster_tkg_aws.tf | 2 +- resource_templates/cluster_tkg_vsphere.tf | 2 +- resource_templates/cluster_tkgs.tf | 2 +- resource_templates/namespace.tf | 4 +- resource_templates/workspace.tf | 4 +- 74 files changed, 249 insertions(+), 249 deletions(-) diff --git a/docs/guides/tanzu-mission-control_cluster.md b/docs/guides/tanzu-mission-control_cluster.md index 38af44461..d0692172c 100644 --- a/docs/guides/tanzu-mission-control_cluster.md +++ b/docs/guides/tanzu-mission-control_cluster.md @@ -54,7 +54,7 @@ data "tanzu-mission-control_cluster" "ready_only_cluster_view" { } # Create Tanzu Mission Control Tanzu Kubernetes Grid Service workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkgs_workload" { +resource "tanzu-mission-control_cluster" "tkgs_workload" { management_cluster_name = "" provisioner_name = "" name = "" @@ -175,7 +175,7 @@ data "tanzu-mission-control_cluster" "ready_only_cluster_view" { } // Create Tanzu Mission Control Tanzu Kubernetes Grid vSphere workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_vsphere_cluster" { +resource "tanzu-mission-control_cluster" "tkg_vsphere_cluster" { management_cluster_name = "" // Default: attached provisioner_name = "" // Default: attached name = "" // Required @@ -312,7 +312,7 @@ data "tanzu-mission-control_cluster" "ready_only_cluster_view" { } // Create Tanzu Mission Control Tanzu Kubernetes Grid AWS workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_aws_cluster" { +resource "tanzu-mission-control_cluster" "tkg_aws_cluster" { management_cluster_name = "" // Default: attached provisioner_name = "" // Default: attached name = "" // Required diff --git a/docs/guides/tanzu-mission-control_gitops.md b/docs/guides/tanzu-mission-control_gitops.md index da733188e..c96a9884a 100644 --- a/docs/guides/tanzu-mission-control_gitops.md +++ b/docs/guides/tanzu-mission-control_gitops.md @@ -62,7 +62,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -84,7 +84,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -92,7 +92,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create basic Repository Credential -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_username_password" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_username_password" { name = "tf-secret" # Required scope { @@ -119,7 +119,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se } # Create cluster level Git Repository with basic authentication -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required @@ -139,7 +139,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" spec { url = "testGitRepositoryURL" # Required - secret_ref = tanzu-mission-control_repository_credential.create_cluster_source_secret_username_password.name + secret_ref = tanzu-mission-control_repository_credential.cluster_source_secret_username_password.name interval = "10m" # Default: 5m git_implementation = "GO_GIT" # Default: GO_GIT ref { @@ -152,7 +152,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" } # Create cluster level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required @@ -176,8 +176,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_git_repository.namespace_name # Required } } } @@ -200,7 +200,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -222,7 +222,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -230,7 +230,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create cluster level Git Repository -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required @@ -262,7 +262,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" } # Create cluster level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required @@ -286,8 +286,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_git_repository.namespace_name # Required } } } @@ -312,7 +312,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -334,7 +334,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -342,7 +342,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create cluster level Repository Credential -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_ssh" { name = "tf-secret" # Required scope { @@ -386,17 +386,17 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } # Create cluster group level SSH key type Repository Credential -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_ssh" { name = "tf-secret" # Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -417,14 +417,14 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se # Create cluster group level Git Repository with SSH key type authentication -resource "tanzu-mission-control_git_repository" "create_cluster_group_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_group_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -435,7 +435,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_group_git_reposi spec { url = "testGitRepositoryURL" # Required - secret_ref = tanzu-mission-control_repository_credential.create_cluster_source_secret_ssh.name + secret_ref = tanzu-mission-control_repository_credential.cluster_source_secret_ssh.name interval = "10m" # Default: 5m git_implementation = "GO_GIT" # Default: GO_GIT ref { @@ -449,14 +449,14 @@ resource "tanzu-mission-control_git_repository" "create_cluster_group_git_reposi # Create cluster group level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_group_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_group_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -471,8 +471,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_group_kustomizati interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_group_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_group_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_group_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_group_git_repository.namespace_name # Required } } } @@ -495,19 +495,19 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } # Create cluster group level Git Repository -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -530,14 +530,14 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" } # Create cluster group level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -552,8 +552,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_git_repository.namespace_name # Required } } } diff --git a/docs/guides/tanzu-mission-control_helm.md b/docs/guides/tanzu-mission-control_helm.md index 55e82bf30..e9522da1f 100644 --- a/docs/guides/tanzu-mission-control_helm.md +++ b/docs/guides/tanzu-mission-control_helm.md @@ -48,7 +48,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -70,7 +70,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -78,7 +78,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create Tanzu Mission Control cluster scope helm feature. -resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cl_helm_feature" { scope { cluster { name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.name # Required @@ -94,7 +94,7 @@ resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { } # Create Tanzu Mission Control cluster scope helm release. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_helm_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -107,7 +107,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" @@ -155,7 +155,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -177,7 +177,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -185,7 +185,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create Tanzu Mission Control cluster scope helm feature. -resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cl_helm_feature" { scope { cluster { name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.name # Required @@ -201,7 +201,7 @@ resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { } # Create Tanzu Mission Control cluster scope helm release. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_git_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_git_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -214,7 +214,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_git_type" } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" @@ -256,15 +256,15 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } # Create Tanzu Mission Control cluster group scope helm feature. -resource "tanzu-mission-control_helm_feature" "create_cg_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cg_helm_feature" { scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -275,18 +275,18 @@ resource "tanzu-mission-control_helm_feature" "create_cg_helm_feature" { } # Create Tanzu Mission Control cluster group scope helm release. -resource "tanzu-mission-control_helm_release" "create_cg_helm_release" { +resource "tanzu-mission-control_helm_release" "cg_helm_release" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster_group[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster_group[0].name meta { description = "Create namespace through terraform" diff --git a/docs/guides/tanzu-mission-control_node_pool.md b/docs/guides/tanzu-mission-control_node_pool.md index da7649c61..fe5a425c7 100644 --- a/docs/guides/tanzu-mission-control_node_pool.md +++ b/docs/guides/tanzu-mission-control_node_pool.md @@ -30,7 +30,7 @@ terraform { } # Create Tanzu Mission Control Tanzu Kubernetes Grid Service workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkgs_workload_cluster" { +resource "tanzu-mission-control_cluster" "tkgs_workload_cluster" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" name = "tkgs-workload" @@ -109,11 +109,11 @@ resource "tanzu-mission-control_cluster" "create_tkgs_workload_cluster" { } # Create Tanzu Mission Control nodepool entry -resource "tanzu-mission-control_cluster_node_pool" "create_node_pool" { +resource "tanzu-mission-control_cluster_node_pool" "node_pool" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" - cluster_name = tanzu-mission-control_cluster.create_tkgs_workload_cluster.name + cluster_name = tanzu-mission-control_cluster.tkgs_workload_cluster.name name = "terraform-nodepool" spec { diff --git a/docs/guides/tanzu-mission-control_policy.md b/docs/guides/tanzu-mission-control_policy.md index 3465a29a7..a792f56f6 100644 --- a/docs/guides/tanzu-mission-control_policy.md +++ b/docs/guides/tanzu-mission-control_policy.md @@ -33,7 +33,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -55,7 +55,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -127,7 +127,7 @@ terraform { } # Create workspace -resource "tanzu-mission-control_workspace" "create_workspace" { +resource "tanzu-mission-control_workspace" "workspace" { name = "demo-workspace" meta { @@ -139,7 +139,7 @@ resource "tanzu-mission-control_workspace" "create_workspace" { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -161,7 +161,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -169,7 +169,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create namespace with attached set as 'true' (need a running cluster) -resource "tanzu-mission-control_namespace" "create_namespace" { +resource "tanzu-mission-control_namespace" "namespace" { name = "demo-namespace" cluster_name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.name management_cluster_name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.management_cluster_name @@ -181,7 +181,7 @@ resource "tanzu-mission-control_namespace" "create_namespace" { } spec { - workspace_name = tanzu-mission-control_workspace.create_workspace.name // Default: default + workspace_name = tanzu-mission-control_workspace.workspace.name // Default: default attach = true } } @@ -190,10 +190,10 @@ resource "tanzu-mission-control_namespace" "create_namespace" { resource "tanzu-mission-control_iam_policy" "namespace_scoped_iam_policy" { scope { namespace { - management_cluster_name = tanzu-mission-control_namespace.create_namespace.management_cluster_name - provisioner_name = tanzu-mission-control_namespace.create_namespace.provisioner_name - cluster_name = tanzu-mission-control_namespace.create_namespace.cluster_name - name = tanzu-mission-control_namespace.create_namespace.name + management_cluster_name = tanzu-mission-control_namespace.namespace.management_cluster_name + provisioner_name = tanzu-mission-control_namespace.namespace.provisioner_name + cluster_name = tanzu-mission-control_namespace.namespace.cluster_name + name = tanzu-mission-control_namespace.namespace.name } } @@ -227,7 +227,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -237,7 +237,7 @@ resource "tanzu-mission-control_custom_policy" "cluster_group_scoped_tmc-block-r scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -299,7 +299,7 @@ terraform { } # Create cluster group. -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "tf-demo-cluster-group" } @@ -384,7 +384,7 @@ resource "tanzu-mission-control_custom_policy" "cluster_group_scoped_custom_temp scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } diff --git a/docs/resources/cluster.md b/docs/resources/cluster.md index 87fb31fee..4b7530f65 100644 --- a/docs/resources/cluster.md +++ b/docs/resources/cluster.md @@ -211,7 +211,7 @@ You must also have the appropriate permissions: ```terraform # Create Tanzu Mission Control Tanzu Kubernetes Grid Service workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkgs_workload" { +resource "tanzu-mission-control_cluster" "tkgs_workload" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" name = "tkgs-workload" @@ -315,7 +315,7 @@ You must also have the appropriate permissions: ```terraform # Create a Tanzu Kubernetes Grid Vsphere workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_vsphere_cluster" { +resource "tanzu-mission-control_cluster" "tkg_vsphere_cluster" { management_cluster_name = "tkgm-terraform" provisioner_name = "default" name = "tkgm-workload" @@ -430,7 +430,7 @@ You must also have the appropriate permissions: ```terraform # Create a Tanzu Mission Control Tanzu Kubernetes Grid AWS workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_aws_cluster" { +resource "tanzu-mission-control_cluster" "tkg_aws_cluster" { management_cluster_name = "tkgm-aws-terraform" // Default: attached provisioner_name = "default" // Default: attached name = "tkgm-aws-workload" // Required diff --git a/docs/resources/cluster_group.md b/docs/resources/cluster_group.md index 403109711..6931b0212 100644 --- a/docs/resources/cluster_group.md +++ b/docs/resources/cluster_group.md @@ -19,7 +19,7 @@ For more information, please refer [create a Cluster Group.][cluster-group] ```terraform # Create Tanzu Mission Control cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "tf-cluster-group" meta { description = "Create cluster group through terraform" @@ -31,7 +31,7 @@ resource "tanzu-mission-control_cluster_group" "create_cluster_group" { } # Create cluster group with minimal information -resource "tanzu-mission-control_cluster_group" "create_cluster_group_min_info" { +resource "tanzu-mission-control_cluster_group" "cluster_group_min_info" { name = "tf-cluster-group-min-info" } ``` diff --git a/docs/resources/cluster_node_pool.md b/docs/resources/cluster_node_pool.md index bb5028748..39724eb6f 100644 --- a/docs/resources/cluster_node_pool.md +++ b/docs/resources/cluster_node_pool.md @@ -15,7 +15,7 @@ because Tanzu Mission Control cannot provision additional resources in a cluster ```terraform # Create Tanzu Mission Control nodepool entry -resource "tanzu-mission-control_cluster_node_pool" "create_node_pool" { +resource "tanzu-mission-control_cluster_node_pool" "node_pool" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" diff --git a/docs/resources/git_repository.md b/docs/resources/git_repository.md index 8d8d95a33..514df7c89 100644 --- a/docs/resources/git_repository.md +++ b/docs/resources/git_repository.md @@ -29,7 +29,7 @@ Only one scope per resource is allowed. ```terraform # Create Tanzu Mission Control git repository with attached set as default value. -resource "tanzu-mission-control_git_repository" "create_cluster_group_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_group_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required @@ -66,7 +66,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_group_git_reposi ```terraform # Create Tanzu Mission Control git repository with attached set as default value. -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required diff --git a/docs/resources/helm_feature.md b/docs/resources/helm_feature.md index a7be1e296..24f783c1a 100644 --- a/docs/resources/helm_feature.md +++ b/docs/resources/helm_feature.md @@ -29,7 +29,7 @@ Only one scope per resource is allowed. ```terraform # Create Tanzu Mission Control cluster group scope helm feature with attached set as default value. -resource "tanzu-mission-control_helm_feature" "create_cg_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cg_helm_feature" { scope { cluster_group { name = "default" # Required @@ -49,7 +49,7 @@ resource "tanzu-mission-control_helm_feature" "create_cg_helm_feature" { ```terraform # Create Tanzu Mission Control cluster scope helm feature with attached set as default value. -resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cl_helm_feature" { scope { cluster { name = "testcluster" # Required diff --git a/docs/resources/helm_release.md b/docs/resources/helm_release.md index 5dd458b78..0b3bf44f8 100644 --- a/docs/resources/helm_release.md +++ b/docs/resources/helm_release.md @@ -33,7 +33,7 @@ The Helm service must already be enabled to be able to install Helm releases on ```terraform # Create Tanzu Mission Control cluster group scope helm release with attached set as default value. -resource "tanzu-mission-control_helm_release" "create_cg_helm_release" { +resource "tanzu-mission-control_helm_release" "cg_helm_release" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -44,7 +44,7 @@ resource "tanzu-mission-control_helm_release" "create_cg_helm_release" { } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster_group[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster_group[0].name meta { description = "Create namespace through terraform" @@ -75,7 +75,7 @@ resource "tanzu-mission-control_helm_release" "create_cg_helm_release" { ```terraform # Create Tanzu Mission Control cluster scope helm release with attached set as default value. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_gitrepo_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_gitrepo_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -88,7 +88,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_gitrepo_ty } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" @@ -124,7 +124,7 @@ The Helm service must already be enabled to be able to install Helm releases on ```terraform # Create Tanzu Mission Control cluster scope helm release with attached set as default value. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_helm_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -137,7 +137,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" diff --git a/docs/resources/kubernetes_secret.md b/docs/resources/kubernetes_secret.md index c8470e706..6574787d0 100644 --- a/docs/resources/kubernetes_secret.md +++ b/docs/resources/kubernetes_secret.md @@ -37,7 +37,7 @@ Only one scope per resource is allowed. ```terraform # Create Tanzu Mission Control kubernetes secret with attached set as default value. # Example for creating the dockerconfigjson secret -resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" { +resource "tanzu-mission-control_kubernetes_secret" "dockerconfigjson_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required @@ -66,7 +66,7 @@ resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secr } # Example for creating the opaque secret -resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" { +resource "tanzu-mission-control_kubernetes_secret" "opaque_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required @@ -186,7 +186,7 @@ Read-Only: ```terraform # Create Tanzu Mission Control kubernetes secret with attached set as default value. # Example for creating the dockerconfigjson secret -resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" { +resource "tanzu-mission-control_kubernetes_secret" "dockerconfigjson_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required @@ -213,7 +213,7 @@ resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secr } # Example for creating the opaque secret -resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" { +resource "tanzu-mission-control_kubernetes_secret" "opaque_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required diff --git a/docs/resources/kustomization.md b/docs/resources/kustomization.md index 3c18c2b01..325b463dd 100644 --- a/docs/resources/kustomization.md +++ b/docs/resources/kustomization.md @@ -30,7 +30,7 @@ Only one scope per resource is allowed. ```terraform # Create Tanzu Mission Control kustomization with attached set as default value. -resource "tanzu-mission-control_kustomization" "create_cluster_group_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_group_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required @@ -65,7 +65,7 @@ resource "tanzu-mission-control_kustomization" "create_cluster_group_kustomizati ```terraform # Create Tanzu Mission Control kustomization with attached set as default value. -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required diff --git a/docs/resources/namespace.md b/docs/resources/namespace.md index 03769badb..f060995de 100644 --- a/docs/resources/namespace.md +++ b/docs/resources/namespace.md @@ -20,7 +20,7 @@ For more information, see [create a Managed Namespace.][namespace] ```terraform # Create Tanzu Mission Control namespace with attached set as default value. -resource "tanzu-mission-control_namespace" "create_namespace" { +resource "tanzu-mission-control_namespace" "namespace" { name = "tf-namespace" # Required cluster_name = "testcluster" # Required provisioner_name = "attached" # Default: attached @@ -38,7 +38,7 @@ resource "tanzu-mission-control_namespace" "create_namespace" { } # Create Tanzu Mission Control namespace with attached set as 'true' -resource "tanzu-mission-control_namespace" "create_namespace_attached" { +resource "tanzu-mission-control_namespace" "namespace_attached" { name = "tf-namespace" # Required cluster_name = "testcluster" # Required provisioner_name = "attached" # Default: attached diff --git a/docs/resources/package_install.md b/docs/resources/package_install.md index f096245e2..026924666 100644 --- a/docs/resources/package_install.md +++ b/docs/resources/package_install.md @@ -23,7 +23,7 @@ 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" { +resource "tanzu-mission-control_package_install" "package_install" { name = "test-pakage-install-name" # Required namespace = "test-namespace-name" # Required diff --git a/docs/resources/package_repository.md b/docs/resources/package_repository.md index 0874d89b2..575c0a51c 100644 --- a/docs/resources/package_repository.md +++ b/docs/resources/package_repository.md @@ -19,7 +19,7 @@ It's a Kubernetes resource which references Package Repository Bundle.It has inf ```terraform # Create Tanzu Mission Control package repository with attached set as default value. -resource "tanzu-mission-control_package_repository" "create_cluster_pkg_repository" { +resource "tanzu-mission-control_package_repository" "cluster_pkg_repository" { name = "tf-pkg-repository-name" # Required scope { diff --git a/docs/resources/provisioner.md b/docs/resources/provisioner.md index 122d895d0..f6cfd13cd 100644 --- a/docs/resources/provisioner.md +++ b/docs/resources/provisioner.md @@ -28,7 +28,7 @@ Addition of a provisioner resource refers to creation of namespace in the manage ```terraform # Create provisioner resource -resource "tanzu-mission-control_provisioner" "create_provisioner" { +resource "tanzu-mission-control_provisioner" "provisioner" { name = "demo-test" # Required management_cluster = "eks" # Required diff --git a/docs/resources/repository_credential.md b/docs/resources/repository_credential.md index 0efc985f8..815a60c9e 100644 --- a/docs/resources/repository_credential.md +++ b/docs/resources/repository_credential.md @@ -39,7 +39,7 @@ Only one credential type per resource is allowed. ```terraform # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_group_source_secret_username_password" { +resource "tanzu-mission-control_repository_credential" "cluster_group_source_secret_username_password" { name = "tf-secret" # Required scope { @@ -70,7 +70,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_group_sou ```terraform # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_username_password" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_username_password" { name = "tf-secret" # Required scope { @@ -103,7 +103,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se ```terraform # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_group_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_group_source_secret_ssh" { name = "tf-secret" # Required scope { @@ -134,7 +134,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_group_sou ```terraform # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_ssh" { name = "tf-secret" # Required scope { diff --git a/docs/resources/workspace.md b/docs/resources/workspace.md index 105298000..fcf9785a2 100644 --- a/docs/resources/workspace.md +++ b/docs/resources/workspace.md @@ -20,7 +20,7 @@ For more information, please refer [create a Workspace.][workspace] ```terraform # Create Tanzu Mission Control workspace -resource "tanzu-mission-control_workspace" "create_workspace" { +resource "tanzu-mission-control_workspace" "workspace" { name = "tf-workspace-test" meta { diff --git a/examples/resources/cluster/resource_cluster_tkg_aws.tf b/examples/resources/cluster/resource_cluster_tkg_aws.tf index dc69172a5..cd34ba530 100644 --- a/examples/resources/cluster/resource_cluster_tkg_aws.tf +++ b/examples/resources/cluster/resource_cluster_tkg_aws.tf @@ -1,5 +1,5 @@ # Create a Tanzu Mission Control Tanzu Kubernetes Grid AWS workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_aws_cluster" { +resource "tanzu-mission-control_cluster" "tkg_aws_cluster" { management_cluster_name = "tkgm-aws-terraform" // Default: attached provisioner_name = "default" // Default: attached name = "tkgm-aws-workload" // Required diff --git a/examples/resources/cluster/resource_cluster_tkg_vsphere.tf b/examples/resources/cluster/resource_cluster_tkg_vsphere.tf index a187faa6e..c6a0ee2f3 100644 --- a/examples/resources/cluster/resource_cluster_tkg_vsphere.tf +++ b/examples/resources/cluster/resource_cluster_tkg_vsphere.tf @@ -1,5 +1,5 @@ # Create a Tanzu Kubernetes Grid Vsphere workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_vsphere_cluster" { +resource "tanzu-mission-control_cluster" "tkg_vsphere_cluster" { management_cluster_name = "tkgm-terraform" provisioner_name = "default" name = "tkgm-workload" diff --git a/examples/resources/cluster/resource_cluster_tkgs.tf b/examples/resources/cluster/resource_cluster_tkgs.tf index 9b78146b3..35a7ec18d 100644 --- a/examples/resources/cluster/resource_cluster_tkgs.tf +++ b/examples/resources/cluster/resource_cluster_tkgs.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control Tanzu Kubernetes Grid Service workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkgs_workload" { +resource "tanzu-mission-control_cluster" "tkgs_workload" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" name = "tkgs-workload" diff --git a/examples/resources/cluster_group/resource.tf b/examples/resources/cluster_group/resource.tf index 661f62d6b..4ad792161 100644 --- a/examples/resources/cluster_group/resource.tf +++ b/examples/resources/cluster_group/resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "tf-cluster-group" meta { description = "Create cluster group through terraform" @@ -11,6 +11,6 @@ resource "tanzu-mission-control_cluster_group" "create_cluster_group" { } # Create cluster group with minimal information -resource "tanzu-mission-control_cluster_group" "create_cluster_group_min_info" { +resource "tanzu-mission-control_cluster_group" "cluster_group_min_info" { name = "tf-cluster-group-min-info" } diff --git a/examples/resources/cluster_node_pool/resource.tf b/examples/resources/cluster_node_pool/resource.tf index 341e291d8..b535aaf87 100644 --- a/examples/resources/cluster_node_pool/resource.tf +++ b/examples/resources/cluster_node_pool/resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control nodepool entry -resource "tanzu-mission-control_cluster_node_pool" "create_node_pool" { +resource "tanzu-mission-control_cluster_node_pool" "node_pool" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" diff --git a/examples/resources/git_repository/resource_cluster.tf b/examples/resources/git_repository/resource_cluster.tf index 185775e6f..8f8d7e276 100644 --- a/examples/resources/git_repository/resource_cluster.tf +++ b/examples/resources/git_repository/resource_cluster.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control git repository with attached set as default value. -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required diff --git a/examples/resources/git_repository/resource_cluster_group.tf b/examples/resources/git_repository/resource_cluster_group.tf index c605ba1d5..2923f6fd8 100644 --- a/examples/resources/git_repository/resource_cluster_group.tf +++ b/examples/resources/git_repository/resource_cluster_group.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control git repository with attached set as default value. -resource "tanzu-mission-control_git_repository" "create_cluster_group_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_group_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required diff --git a/examples/resources/helmfeature/cg_resource.tf b/examples/resources/helmfeature/cg_resource.tf index 15ccf3206..6f0287540 100644 --- a/examples/resources/helmfeature/cg_resource.tf +++ b/examples/resources/helmfeature/cg_resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control cluster group scope helm feature with attached set as default value. -resource "tanzu-mission-control_helm_feature" "create_cg_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cg_helm_feature" { scope { cluster_group { name = "default" # Required diff --git a/examples/resources/helmfeature/cl_resource.tf b/examples/resources/helmfeature/cl_resource.tf index a3dab7dd7..d24520809 100644 --- a/examples/resources/helmfeature/cl_resource.tf +++ b/examples/resources/helmfeature/cl_resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control cluster scope helm feature with attached set as default value. -resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cl_helm_feature" { scope { cluster { name = "testcluster" # Required diff --git a/examples/resources/helmrelease/cg_resource.tf b/examples/resources/helmrelease/cg_resource.tf index fa23444fd..45b662e12 100644 --- a/examples/resources/helmrelease/cg_resource.tf +++ b/examples/resources/helmrelease/cg_resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control cluster group scope helm release with attached set as default value. -resource "tanzu-mission-control_helm_release" "create_cg_helm_release" { +resource "tanzu-mission-control_helm_release" "cg_helm_release" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -10,7 +10,7 @@ resource "tanzu-mission-control_helm_release" "create_cg_helm_release" { } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster_group[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster_group[0].name meta { description = "Create namespace through terraform" diff --git a/examples/resources/helmrelease/cl_resource_git_type.tf b/examples/resources/helmrelease/cl_resource_git_type.tf index 99bac3302..35e665243 100644 --- a/examples/resources/helmrelease/cl_resource_git_type.tf +++ b/examples/resources/helmrelease/cl_resource_git_type.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control cluster scope helm release with attached set as default value. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_gitrepo_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_gitrepo_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -12,7 +12,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_gitrepo_ty } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" diff --git a/examples/resources/helmrelease/cl_resource_helm_type.tf b/examples/resources/helmrelease/cl_resource_helm_type.tf index fab81cd4e..3a534d8c7 100644 --- a/examples/resources/helmrelease/cl_resource_helm_type.tf +++ b/examples/resources/helmrelease/cl_resource_helm_type.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control cluster scope helm release with attached set as default value. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_helm_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -12,7 +12,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" diff --git a/examples/resources/kubernetes_secret/cg_resource.tf b/examples/resources/kubernetes_secret/cg_resource.tf index 483b11afc..c39d3f898 100644 --- a/examples/resources/kubernetes_secret/cg_resource.tf +++ b/examples/resources/kubernetes_secret/cg_resource.tf @@ -1,6 +1,6 @@ # Create Tanzu Mission Control kubernetes secret with attached set as default value. # Example for creating the dockerconfigjson secret -resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" { +resource "tanzu-mission-control_kubernetes_secret" "dockerconfigjson_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required @@ -27,7 +27,7 @@ resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secr } # Example for creating the opaque secret -resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" { +resource "tanzu-mission-control_kubernetes_secret" "opaque_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required diff --git a/examples/resources/kubernetes_secret/resource.tf b/examples/resources/kubernetes_secret/resource.tf index 17223a3cb..7984ad4f0 100644 --- a/examples/resources/kubernetes_secret/resource.tf +++ b/examples/resources/kubernetes_secret/resource.tf @@ -1,6 +1,6 @@ # Create Tanzu Mission Control kubernetes secret with attached set as default value. # Example for creating the dockerconfigjson secret -resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" { +resource "tanzu-mission-control_kubernetes_secret" "dockerconfigjson_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required @@ -29,7 +29,7 @@ resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secr } # Example for creating the opaque secret -resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" { +resource "tanzu-mission-control_kubernetes_secret" "opaque_secret" { name = "tf-secret" # Required namespace_name = "tf-secret-namespace-name" # Required diff --git a/examples/resources/kustomization/resource_cluster.tf b/examples/resources/kustomization/resource_cluster.tf index bfc234fe9..633df4287 100644 --- a/examples/resources/kustomization/resource_cluster.tf +++ b/examples/resources/kustomization/resource_cluster.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control kustomization with attached set as default value. -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required diff --git a/examples/resources/kustomization/resource_cluster_group.tf b/examples/resources/kustomization/resource_cluster_group.tf index d071914dc..3ebaf1f3e 100644 --- a/examples/resources/kustomization/resource_cluster_group.tf +++ b/examples/resources/kustomization/resource_cluster_group.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control kustomization with attached set as default value. -resource "tanzu-mission-control_kustomization" "create_cluster_group_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_group_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required diff --git a/examples/resources/namespace/resource.tf b/examples/resources/namespace/resource.tf index f9d38b7c4..1dc40342b 100644 --- a/examples/resources/namespace/resource.tf +++ b/examples/resources/namespace/resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control namespace with attached set as default value. -resource "tanzu-mission-control_namespace" "create_namespace" { +resource "tanzu-mission-control_namespace" "namespace" { name = "tf-namespace" # Required cluster_name = "testcluster" # Required provisioner_name = "attached" # Default: attached @@ -17,7 +17,7 @@ resource "tanzu-mission-control_namespace" "create_namespace" { } # Create Tanzu Mission Control namespace with attached set as 'true' -resource "tanzu-mission-control_namespace" "create_namespace_attached" { +resource "tanzu-mission-control_namespace" "namespace_attached" { name = "tf-namespace" # Required cluster_name = "testcluster" # Required provisioner_name = "attached" # Default: attached diff --git a/examples/resources/packageinstall/resource.tf b/examples/resources/packageinstall/resource.tf index 8970a751b..cce666df9 100644 --- a/examples/resources/packageinstall/resource.tf +++ b/examples/resources/packageinstall/resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control package install with attached set as default value. -resource "tanzu-mission-control_package_install" "create_package_install" { +resource "tanzu-mission-control_package_install" "package_install" { name = "test-pakage-install-name" # Required namespace = "test-namespace-name" # Required diff --git a/examples/resources/provisioner/provisioner_resource.tf b/examples/resources/provisioner/provisioner_resource.tf index 38f0c33a5..8e7014164 100644 --- a/examples/resources/provisioner/provisioner_resource.tf +++ b/examples/resources/provisioner/provisioner_resource.tf @@ -1,5 +1,5 @@ # Create provisioner resource -resource "tanzu-mission-control_provisioner" "create_provisioner" { +resource "tanzu-mission-control_provisioner" "provisioner" { name = "demo-test" # Required management_cluster = "eks" # Required diff --git a/examples/resources/source_secret/resource_cluster_group_ssh.tf b/examples/resources/source_secret/resource_cluster_group_ssh.tf index 51d200589..88d1068fd 100644 --- a/examples/resources/source_secret/resource_cluster_group_ssh.tf +++ b/examples/resources/source_secret/resource_cluster_group_ssh.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_group_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_group_source_secret_ssh" { name = "tf-secret" # Required scope { 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 6bab03407..e5176c7fa 100644 --- a/examples/resources/source_secret/resource_cluster_group_username_password.tf +++ b/examples/resources/source_secret/resource_cluster_group_username_password.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_group_source_secret_username_password" { +resource "tanzu-mission-control_repository_credential" "cluster_group_source_secret_username_password" { name = "tf-secret" # Required scope { diff --git a/examples/resources/source_secret/resource_cluster_ssh.tf b/examples/resources/source_secret/resource_cluster_ssh.tf index 0071d24f3..18040ff27 100644 --- a/examples/resources/source_secret/resource_cluster_ssh.tf +++ b/examples/resources/source_secret/resource_cluster_ssh.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_ssh" { name = "tf-secret" # Required scope { diff --git a/examples/resources/source_secret/resource_cluster_username_password.tf b/examples/resources/source_secret/resource_cluster_username_password.tf index 47169c5a9..4a3b6f382 100644 --- a/examples/resources/source_secret/resource_cluster_username_password.tf +++ b/examples/resources/source_secret/resource_cluster_username_password.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control source secret with attached set as default value. -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_username_password" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_username_password" { name = "tf-secret" # Required scope { diff --git a/examples/resources/tanzupackagerepository/resource.tf b/examples/resources/tanzupackagerepository/resource.tf index 8f2f19ea2..e18c37dc3 100644 --- a/examples/resources/tanzupackagerepository/resource.tf +++ b/examples/resources/tanzupackagerepository/resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control package repository with attached set as default value. -resource "tanzu-mission-control_package_repository" "create_cluster_pkg_repository" { +resource "tanzu-mission-control_package_repository" "cluster_pkg_repository" { name = "tf-pkg-repository-name" # Required scope { diff --git a/examples/resources/workspace/resource.tf b/examples/resources/workspace/resource.tf index 2a3d07deb..61e2dd17b 100644 --- a/examples/resources/workspace/resource.tf +++ b/examples/resources/workspace/resource.tf @@ -1,5 +1,5 @@ # Create Tanzu Mission Control workspace -resource "tanzu-mission-control_workspace" "create_workspace" { +resource "tanzu-mission-control_workspace" "workspace" { name = "tf-workspace-test" meta { diff --git a/examples/usecases/access_policy_usecase.tf b/examples/usecases/access_policy_usecase.tf index 8261ac73d..147f352e2 100644 --- a/examples/usecases/access_policy_usecase.tf +++ b/examples/usecases/access_policy_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create workspace -resource "tanzu-mission-control_workspace" "create_workspace" { +resource "tanzu-mission-control_workspace" "workspace" { name = "demo-workspace" meta { @@ -23,7 +23,7 @@ resource "tanzu-mission-control_workspace" "create_workspace" { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -45,7 +45,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -53,7 +53,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create namespace with attached set as 'true' (need a running cluster) -resource "tanzu-mission-control_namespace" "create_namespace" { +resource "tanzu-mission-control_namespace" "namespace" { name = "demo-namespace" cluster_name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.name management_cluster_name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.management_cluster_name @@ -65,7 +65,7 @@ resource "tanzu-mission-control_namespace" "create_namespace" { } spec { - workspace_name = tanzu-mission-control_workspace.create_workspace.name // Default: default + workspace_name = tanzu-mission-control_workspace.workspace.name // Default: default attach = true } } @@ -74,10 +74,10 @@ resource "tanzu-mission-control_namespace" "create_namespace" { resource "tanzu-mission-control_iam_policy" "namespace_scoped_iam_policy" { scope { namespace { - management_cluster_name = tanzu-mission-control_namespace.create_namespace.management_cluster_name - provisioner_name = tanzu-mission-control_namespace.create_namespace.provisioner_name - cluster_name = tanzu-mission-control_namespace.create_namespace.cluster_name - name = tanzu-mission-control_namespace.create_namespace.name + management_cluster_name = tanzu-mission-control_namespace.namespace.management_cluster_name + provisioner_name = tanzu-mission-control_namespace.namespace.provisioner_name + cluster_name = tanzu-mission-control_namespace.namespace.cluster_name + name = tanzu-mission-control_namespace.namespace.name } } diff --git a/examples/usecases/auth_git_repo_usecase.tf b/examples/usecases/auth_git_repo_usecase.tf index 69d5f5880..7f6f3254b 100644 --- a/examples/usecases/auth_git_repo_usecase.tf +++ b/examples/usecases/auth_git_repo_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -33,7 +33,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -41,7 +41,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create basic Repository Credential -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_username_password" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_username_password" { name = "tf-secret" # Required scope { @@ -68,7 +68,7 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se } # Create cluster level Git Repository with basic authentication -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required @@ -88,7 +88,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" spec { url = "testGitRepositoryURL" # Required - secret_ref = tanzu-mission-control_repository_credential.create_cluster_source_secret_username_password.name + secret_ref = tanzu-mission-control_repository_credential.cluster_source_secret_username_password.name interval = "10m" # Default: 5m git_implementation = "GO_GIT" # Default: GO_GIT ref { @@ -101,7 +101,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" } # Create cluster level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required @@ -125,8 +125,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_git_repository.namespace_name # Required } } } \ No newline at end of file diff --git a/examples/usecases/cg_git_repo_usecase.tf b/examples/usecases/cg_git_repo_usecase.tf index 30fb206a8..49a944ca8 100644 --- a/examples/usecases/cg_git_repo_usecase.tf +++ b/examples/usecases/cg_git_repo_usecase.tf @@ -11,19 +11,19 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } # Create cluster group level Git Repository -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -46,14 +46,14 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" } # Create cluster group level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -68,8 +68,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_git_repository.namespace_name # Required } } } \ No newline at end of file diff --git a/examples/usecases/cg_helm_release_git_usecase.tf b/examples/usecases/cg_helm_release_git_usecase.tf index 2928f1904..8db3460c8 100644 --- a/examples/usecases/cg_helm_release_git_usecase.tf +++ b/examples/usecases/cg_helm_release_git_usecase.tf @@ -11,15 +11,15 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } # Create Tanzu Mission Control cluster group scope helm feature. -resource "tanzu-mission-control_helm_feature" "create_cg_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cg_helm_feature" { scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -30,18 +30,18 @@ resource "tanzu-mission-control_helm_feature" "create_cg_helm_feature" { } # Create Tanzu Mission Control cluster group scope helm release. -resource "tanzu-mission-control_helm_release" "create_cg_helm_release" { +resource "tanzu-mission-control_helm_release" "cg_helm_release" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster_group[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster_group[0].name meta { description = "Create namespace through terraform" diff --git a/examples/usecases/cl_helm_release_git_usecase.tf b/examples/usecases/cl_helm_release_git_usecase.tf index 0273cf89f..5a32eaf28 100644 --- a/examples/usecases/cl_helm_release_git_usecase.tf +++ b/examples/usecases/cl_helm_release_git_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -33,7 +33,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -41,7 +41,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create Tanzu Mission Control cluster scope helm feature. -resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cl_helm_feature" { scope { cluster { name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.name # Required @@ -57,7 +57,7 @@ resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { } # Create Tanzu Mission Control cluster scope helm release. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_git_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_git_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -70,7 +70,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_git_type" } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" diff --git a/examples/usecases/cl_helm_release_usecase.tf b/examples/usecases/cl_helm_release_usecase.tf index 889220f49..eb21f363b 100644 --- a/examples/usecases/cl_helm_release_usecase.tf +++ b/examples/usecases/cl_helm_release_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -33,7 +33,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -41,7 +41,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create Tanzu Mission Control cluster scope helm feature. -resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { +resource "tanzu-mission-control_helm_feature" "cl_helm_feature" { scope { cluster { name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.name # Required @@ -57,7 +57,7 @@ resource "tanzu-mission-control_helm_feature" "create_cl_helm_feature" { } # Create Tanzu Mission Control cluster scope helm release. -resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" { +resource "tanzu-mission-control_helm_release" "cl_helm_release_helm_type" { name = "test-helm-release-name" # Required namespace_name = "test-namespace-name" # Required @@ -70,7 +70,7 @@ resource "tanzu-mission-control_helm_release" "create_cl_helm_release_helm_type" } } - feature_ref = tanzu-mission-control_helm_feature.create_cg_helm_feature.scope[0].cluster[0].name + feature_ref = tanzu-mission-control_helm_feature.cg_helm_feature.scope[0].cluster[0].name meta { description = "Create namespace through terraform" diff --git a/examples/usecases/custom_policy_usecase.tf b/examples/usecases/custom_policy_usecase.tf index 077e7eba0..51a486fce 100644 --- a/examples/usecases/custom_policy_usecase.tf +++ b/examples/usecases/custom_policy_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -21,7 +21,7 @@ resource "tanzu-mission-control_custom_policy" "cluster_group_scoped_tmc-block-r scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } diff --git a/examples/usecases/custom_policy_with_custom_template_usecase.tf b/examples/usecases/custom_policy_with_custom_template_usecase.tf index 087ca7d75..1e9ddcdac 100644 --- a/examples/usecases/custom_policy_with_custom_template_usecase.tf +++ b/examples/usecases/custom_policy_with_custom_template_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group. -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "tf-demo-cluster-group" } @@ -96,7 +96,7 @@ resource "tanzu-mission-control_custom_policy" "cluster_group_scoped_custom_temp scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } diff --git a/examples/usecases/git_repo_usecase.tf b/examples/usecases/git_repo_usecase.tf index 3f70e5140..72045b360 100644 --- a/examples/usecases/git_repo_usecase.tf +++ b/examples/usecases/git_repo_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -33,7 +33,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -41,7 +41,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create cluster level Git Repository -resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required @@ -73,7 +73,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_git_repository" } # Create cluster level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required @@ -97,8 +97,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_kustomization" { interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_git_repository.namespace_name # Required } } } \ No newline at end of file diff --git a/examples/usecases/nodepool_usecase.tf b/examples/usecases/nodepool_usecase.tf index 21e5b26ec..8d8c46455 100644 --- a/examples/usecases/nodepool_usecase.tf +++ b/examples/usecases/nodepool_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create Tanzu Mission Control Tanzu Kubernetes Grid Service workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkgs_workload_cluster" { +resource "tanzu-mission-control_cluster" "tkgs_workload_cluster" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" name = "tkgs-workload" @@ -90,11 +90,11 @@ resource "tanzu-mission-control_cluster" "create_tkgs_workload_cluster" { } # Create Tanzu Mission Control nodepool entry -resource "tanzu-mission-control_cluster_node_pool" "create_node_pool" { +resource "tanzu-mission-control_cluster_node_pool" "node_pool" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" - cluster_name = tanzu-mission-control_cluster.create_tkgs_workload_cluster.name + cluster_name = tanzu-mission-control_cluster.tkgs_workload_cluster.name name = "terraform-nodepool" spec { diff --git a/examples/usecases/security_policy_usecase.tf b/examples/usecases/security_policy_usecase.tf index 31cf3da74..b7025320f 100644 --- a/examples/usecases/security_policy_usecase.tf +++ b/examples/usecases/security_policy_usecase.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -33,7 +33,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready diff --git a/examples/usecases/ssh_cg_git_repo_usecase.tf b/examples/usecases/ssh_cg_git_repo_usecase.tf index d7f07f73e..b37330c76 100644 --- a/examples/usecases/ssh_cg_git_repo_usecase.tf +++ b/examples/usecases/ssh_cg_git_repo_usecase.tf @@ -11,17 +11,17 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } # Create cluster group level SSH key type Repository Credential -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_ssh" { name = "tf-secret" # Required scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -42,14 +42,14 @@ resource "tanzu-mission-control_repository_credential" "create_cluster_source_se # Create cluster group level Git Repository with SSH key type authentication -resource "tanzu-mission-control_git_repository" "create_cluster_group_git_repository" { +resource "tanzu-mission-control_git_repository" "cluster_group_git_repository" { name = "tf-git-repository-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -60,7 +60,7 @@ resource "tanzu-mission-control_git_repository" "create_cluster_group_git_reposi spec { url = "testGitRepositoryURL" # Required - secret_ref = tanzu-mission-control_repository_credential.create_cluster_source_secret_ssh.name + secret_ref = tanzu-mission-control_repository_credential.cluster_source_secret_ssh.name interval = "10m" # Default: 5m git_implementation = "GO_GIT" # Default: GO_GIT ref { @@ -74,14 +74,14 @@ resource "tanzu-mission-control_git_repository" "create_cluster_group_git_reposi # Create cluster group level Kustomization -resource "tanzu-mission-control_kustomization" "create_cluster_group_kustomization" { +resource "tanzu-mission-control_kustomization" "cluster_group_kustomization" { name = "tf-kustomization-name" # Required namespace_name = "tf-namespace" #Required scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -96,8 +96,8 @@ resource "tanzu-mission-control_kustomization" "create_cluster_group_kustomizati interval = "10m" # Default: 5m target_namespace = "testTargetNamespace" source { - name = tanzu-mission-control_git_repository.create_cluster_group_git_repository.name # Required - namespace = tanzu-mission-control_git_repository.create_cluster_group_git_repository.namespace_name # Required + name = tanzu-mission-control_git_repository.cluster_group_git_repository.name # Required + namespace = tanzu-mission-control_git_repository.cluster_group_git_repository.namespace_name # Required } } } diff --git a/examples/usecases/ssh_repo_credential.tf b/examples/usecases/ssh_repo_credential.tf index a640f43b6..f88a48f43 100644 --- a/examples/usecases/ssh_repo_credential.tf +++ b/examples/usecases/ssh_repo_credential.tf @@ -11,7 +11,7 @@ terraform { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -33,7 +33,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -41,7 +41,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create cluster level Repository Credential -resource "tanzu-mission-control_repository_credential" "create_cluster_source_secret_ssh" { +resource "tanzu-mission-control_repository_credential" "cluster_source_secret_ssh" { name = "tf-secret" # Required scope { diff --git a/examples/usecases/usecase.tf b/examples/usecases/usecase.tf index d9467e75e..107848f86 100644 --- a/examples/usecases/usecase.tf +++ b/examples/usecases/usecase.tf @@ -12,7 +12,7 @@ terraform { } # Create workspace -resource "tanzu-mission-control_workspace" "create_workspace" { +resource "tanzu-mission-control_workspace" "workspace" { name = "demo-workspace" meta { @@ -24,7 +24,7 @@ resource "tanzu-mission-control_workspace" "create_workspace" { } # Create cluster group -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "demo-cluster-group" } @@ -46,7 +46,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } spec { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name // Default: default + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name // Default: default } ready_wait_timeout = "15m" # Default: waits until 3 min for the cluster to become ready @@ -54,7 +54,7 @@ resource "tanzu-mission-control_cluster" "attach_cluster_with_kubeconfig" { } # Create namespace with attached set as 'true' (need a running cluster) -resource "tanzu-mission-control_namespace" "create_namespace" { +resource "tanzu-mission-control_namespace" "namespace" { name = "demo-namespace" // Required cluster_name = tanzu-mission-control_cluster.attach_cluster_with_kubeconfig.name // Required provisioner_name = "attached" // Default: attached @@ -66,13 +66,13 @@ resource "tanzu-mission-control_namespace" "create_namespace" { } spec { - workspace_name = tanzu-mission-control_workspace.create_workspace.name // Default: default + workspace_name = tanzu-mission-control_workspace.workspace.name // Default: default attach = true } } # Create Tanzu Mission Control Tanzu Kubernetes Grid Service workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkgs_workload_cluster" { +resource "tanzu-mission-control_cluster" "tkgs_workload_cluster" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" name = "tkgs-workload" @@ -151,7 +151,7 @@ resource "tanzu-mission-control_cluster" "create_tkgs_workload_cluster" { } # Create a Tanzu Kubernetes Grid vSphere workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_vsphere_cluster" { +resource "tanzu-mission-control_cluster" "tkg_vsphere_cluster" { management_cluster_name = "tkgm-terraform" provisioner_name = "default" name = "tkgm-workload" @@ -234,7 +234,7 @@ resource "tanzu-mission-control_cluster" "create_tkg_vsphere_cluster" { } # Create Tanzu Mission Control Tanzu Kubernetes Grid AWS workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_aws_cluster" { +resource "tanzu-mission-control_cluster" "tkg_aws_cluster" { management_cluster_name = "tkgm-aws" // Default: attached provisioner_name = "default" // Default: attached name = "tkgm-aws-workload" // Required @@ -317,7 +317,7 @@ resource "tanzu-mission-control_cluster" "create_tkg_aws_cluster" { } # Create Tanzu Mission Control nodepool entry -resource "tanzu-mission-control_cluster_node_pool" "create_node_pool" { +resource "tanzu-mission-control_cluster_node_pool" "node_pool" { management_cluster_name = "tkgs-terraform" provisioner_name = "test-gc-e2e-demo-ns" @@ -366,7 +366,7 @@ resource "tanzu-mission-control_iam_policy" "organization_scoped_iam_policy" { resource "tanzu-mission-control_iam_policy" "cluster_group_scoped_iam_policy" { scope { cluster_group { - name = tanzu-mission-control_cluster_group.create_cluster_group.name + name = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -420,7 +420,7 @@ resource "tanzu-mission-control_iam_policy" "cluster_scoped_iam_policy" { resource "tanzu-mission-control_iam_policy" "workspace_scoped_iam_policy" { scope { workspace { - name = tanzu-mission-control_workspace.create_workspace.name + name = tanzu-mission-control_workspace.workspace.name } } @@ -437,10 +437,10 @@ resource "tanzu-mission-control_iam_policy" "workspace_scoped_iam_policy" { resource "tanzu-mission-control_iam_policy" "namespace_scoped_iam_policy" { scope { namespace { - management_cluster_name = tanzu-mission-control_namespace.create_namespace.management_cluster_name - provisioner_name = tanzu-mission-control_namespace.create_namespace.provisioner_name - cluster_name = tanzu-mission-control_namespace.create_namespace.cluster_name - name = tanzu-mission-control_namespace.create_namespace.name + management_cluster_name = tanzu-mission-control_namespace.namespace.management_cluster_name + provisioner_name = tanzu-mission-control_namespace.namespace.provisioner_name + cluster_name = tanzu-mission-control_namespace.namespace.cluster_name + name = tanzu-mission-control_namespace.namespace.name } } @@ -496,7 +496,7 @@ resource "tanzu-mission-control_security_policy" "organization_scoped_baseline_s resource "tanzu-mission-control_security_policy" "cluster_group_scoped_baseline_security_policy" { scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -715,7 +715,7 @@ resource "tanzu-mission-control_security_policy" "organization_scoped_custom_sec resource "tanzu-mission-control_security_policy" "cluster_group_scoped_custom_security_policy" { scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } @@ -1049,7 +1049,7 @@ resource "tanzu-mission-control_security_policy" "organization_scoped_strict_sec resource "tanzu-mission-control_security_policy" "cluster_group_scoped_strict_security_policy" { scope { cluster_group { - cluster_group = tanzu-mission-control_cluster_group.create_cluster_group.name + cluster_group = tanzu-mission-control_cluster_group.cluster_group.name } } diff --git a/internal/resources/helmfeature/resource_helm_feature_test.go b/internal/resources/helmfeature/resource_helm_feature_test.go index 5b3931249..cff9e75b6 100644 --- a/internal/resources/helmfeature/resource_helm_feature_test.go +++ b/internal/resources/helmfeature/resource_helm_feature_test.go @@ -156,7 +156,7 @@ func (testConfig *testAcceptanceConfig) getTestResourceBasicConfigValue(scope co %s resource "time_sleep" "wait_for_3m" { - create_duration = "50s" + duration = "50s" depends_on = [tanzu-mission-control_cluster.test_cluster] } @@ -181,7 +181,7 @@ func (testConfig *testAcceptanceConfig) getTestResourceBasicConfigValue(scope co %s resource "time_sleep" "wait_for_3m" { - create_duration = "180s" + duration = "180s" depends_on = [tanzu-mission-control_cluster_group.test_cluster_group] } diff --git a/internal/resources/helmrelease/resource_helm_release_test.go b/internal/resources/helmrelease/resource_helm_release_test.go index edd67c25d..f3ca72021 100644 --- a/internal/resources/helmrelease/resource_helm_release_test.go +++ b/internal/resources/helmrelease/resource_helm_release_test.go @@ -205,7 +205,7 @@ func (testConfig *testAcceptanceConfig) getTestResourceBasicConfigValue(scope co %s resource "time_sleep" "wait_for_3m" { - create_duration = "50s" + duration = "50s" depends_on = [tanzu-mission-control_cluster.test_cluster] } @@ -218,7 +218,7 @@ func (testConfig *testAcceptanceConfig) getTestResourceBasicConfigValue(scope co } resource "time_sleep" "wait_for_2m" { - create_duration = "300s" + duration = "300s" depends_on = [tanzu-mission-control_helm_feature.test_helm_feature] } @@ -252,7 +252,7 @@ func (testConfig *testAcceptanceConfig) getTestResourceBasicConfigValue(scope co %s resource "time_sleep" "wait_for_1m" { - create_duration = "60s" + duration = "60s" depends_on = [tanzu-mission-control_cluster_group.test_cluster_group] } @@ -280,7 +280,7 @@ func (testConfig *testAcceptanceConfig) getTestResourceBasicConfigValue(scope co } resource "time_sleep" "wait_for_2m" { - create_duration = "180s" + duration = "180s" depends_on = [tanzu-mission-control_helm_feature.test_helm_feature, tanzu-mission-control_git_repository.test_git_repo] } diff --git a/internal/resources/helmrepository/repository_data_source_test.go b/internal/resources/helmrepository/repository_data_source_test.go index 3d3ad7b06..5ee3afe95 100644 --- a/internal/resources/helmrepository/repository_data_source_test.go +++ b/internal/resources/helmrepository/repository_data_source_test.go @@ -137,7 +137,7 @@ func (testConfig *testAcceptanceConfig) getTestBasicDataSourceConfigValue() stri } resource "time_sleep" "wait_for_3m" { - create_duration = "10s" + duration = "10s" depends_on = [tanzu-mission-control_cluster.test_cluster] } @@ -164,7 +164,7 @@ func (testConfig *testAcceptanceConfig) getTestBasicDataSourceConfigValue() stri } resource "time_sleep" "wait_for_1m" { - create_duration = "180s" + duration = "180s" depends_on = [tanzu-mission-control_helm_feature.test_helm_feature] } diff --git a/internal/resources/package/data_source_package_test.go b/internal/resources/package/data_source_package_test.go index c8c62d577..5bbc9d619 100644 --- a/internal/resources/package/data_source_package_test.go +++ b/internal/resources/package/data_source_package_test.go @@ -117,7 +117,7 @@ func (testConfig *testAcceptanceConfig) getTestPackageDataSourceBasicConfigValue %s resource "time_sleep" "wait_for_3m" { - create_duration = "180s" + duration = "180s" depends_on = [tanzu-mission-control_cluster.test_cluster] } @@ -142,7 +142,7 @@ func (testConfig *testAcceptanceConfig) getTestPackageDataSourceBasicConfigValue } resource "time_sleep" "wait_for_1m" { - create_duration = "60s" + duration = "60s" depends_on = [tanzu-mission-control_package_repository.test_pkg_repository] } diff --git a/internal/resources/packages/data_source_packages_test.go b/internal/resources/packages/data_source_packages_test.go index 01a2f7650..3a98c444e 100644 --- a/internal/resources/packages/data_source_packages_test.go +++ b/internal/resources/packages/data_source_packages_test.go @@ -114,7 +114,7 @@ func (testConfig *testAcceptanceConfig) getTestPackagesDataSourceBasicConfigValu %s resource "time_sleep" "wait_for_3m" { - create_duration = "180s" + duration = "180s" depends_on = [tanzu-mission-control_cluster.test_cluster] } @@ -139,7 +139,7 @@ func (testConfig *testAcceptanceConfig) getTestPackagesDataSourceBasicConfigValu } resource "time_sleep" "wait_for_1m" { - create_duration = "60s" + duration = "60s" depends_on = [tanzu-mission-control_package_repository.test_pkg_repository] } diff --git a/internal/resources/tanzupackageinstall/package_install_resource_test.go b/internal/resources/tanzupackageinstall/package_install_resource_test.go index 5be7ad501..fd20548d1 100644 --- a/internal/resources/tanzupackageinstall/package_install_resource_test.go +++ b/internal/resources/tanzupackageinstall/package_install_resource_test.go @@ -184,7 +184,7 @@ func (testConfig *testAcceptanceConfig) getTestPackageInstallResourceBasicConfig %s resource "time_sleep" "wait_for_3m" { - create_duration = "60s" + duration = "60s" depends_on = [tanzu-mission-control_cluster.test_cluster] } @@ -209,7 +209,7 @@ func (testConfig *testAcceptanceConfig) getTestPackageInstallResourceBasicConfig } resource "time_sleep" "wait_for_2m" { - create_duration = "40s" + duration = "40s" depends_on = [tanzu-mission-control_package_repository.test_pkg_repository] } diff --git a/internal/resources/tanzupackagerepository/data_source_repository_test.go b/internal/resources/tanzupackagerepository/data_source_repository_test.go index 71d9304c0..71af098af 100644 --- a/internal/resources/tanzupackagerepository/data_source_repository_test.go +++ b/internal/resources/tanzupackagerepository/data_source_repository_test.go @@ -133,7 +133,7 @@ func (testConfig *testAcceptanceConfig) getTestPackageRepositoryDataSourceBasicC %s resource "time_sleep" "wait_for_3m" { - create_duration = "50s" + duration = "50s" depends_on = [tanzu-mission-control_cluster.test_cluster] } diff --git a/internal/resources/tanzupackagerepository/resource_package_repository_test.go b/internal/resources/tanzupackagerepository/resource_package_repository_test.go index 55ed0c5c9..f7dd00411 100644 --- a/internal/resources/tanzupackagerepository/resource_package_repository_test.go +++ b/internal/resources/tanzupackagerepository/resource_package_repository_test.go @@ -150,7 +150,7 @@ func (testConfig *testAcceptanceConfig) getTestPackageRepositoryResourceBasicCon %s resource "time_sleep" "wait_for_3m" { - create_duration = "50s" + duration = "50s" depends_on = [tanzu-mission-control_cluster.test_cluster] } diff --git a/internal/resources/testing/test_helper.go b/internal/resources/testing/test_helper.go index d377a7537..ebb1f2c73 100644 --- a/internal/resources/testing/test_helper.go +++ b/internal/resources/testing/test_helper.go @@ -32,8 +32,8 @@ const ( // EKS Constants. EksClusterResource = "tanzu-mission-control_ekscluster" EksClusterGroup = "tanzu-mission-control_cluster_group" - EksClusterResourceVar = "test_create_eks_cluster" - EksClusterGroupVar = "test_create_eks_cluster_group" + EksClusterResourceVar = "test_eks_cluster" + EksClusterGroupVar = "test_eks_cluster_group" ) var ( diff --git a/resource_templates/cluster_group.tf b/resource_templates/cluster_group.tf index ee2914017..29a184812 100644 --- a/resource_templates/cluster_group.tf +++ b/resource_templates/cluster_group.tf @@ -2,7 +2,7 @@ // Operations supported : Create, Read, Update and Delete // Create Tanzu Mission Control cluster group entry -resource "tanzu-mission-control_cluster_group" "create_cluster_group" { +resource "tanzu-mission-control_cluster_group" "cluster_group" { name = "" // Required meta { // Optional @@ -12,7 +12,7 @@ resource "tanzu-mission-control_cluster_group" "create_cluster_group" { } // Create Tanzu Mission Control cluster group entry with minimal information -resource "tanzu-mission-control_cluster_group" "cluster_group_create_min_info" { +resource "tanzu-mission-control_cluster_group" "cluster_group_min_info" { name = "" // Required } diff --git a/resource_templates/cluster_node_pool.tf b/resource_templates/cluster_node_pool.tf index 96d84c6c5..1f681e77c 100644 --- a/resource_templates/cluster_node_pool.tf +++ b/resource_templates/cluster_node_pool.tf @@ -10,7 +10,7 @@ data "tanzu-mission-control_cluster_node_pool" "read_node_pool" { } # Create Tanzu Mission Control cluster nodepool entry -resource "tanzu-mission-control_cluster_node_pool" "create_node_pool" { +resource "tanzu-mission-control_cluster_node_pool" "node_pool" { management_cluster_name = "" // Default: attached provisioner_name = "" // Default: attached diff --git a/resource_templates/cluster_tkg_aws.tf b/resource_templates/cluster_tkg_aws.tf index a28bfe665..af2bffb45 100644 --- a/resource_templates/cluster_tkg_aws.tf +++ b/resource_templates/cluster_tkg_aws.tf @@ -9,7 +9,7 @@ data "tanzu-mission-control_cluster" "ready_only_cluster_view" { } // Create Tanzu Mission Control Tanzu Kubernetes Grid AWS workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_aws_cluster" { +resource "tanzu-mission-control_cluster" "tkg_aws_cluster" { management_cluster_name = "" // Default: attached provisioner_name = "" // Default: attached name = "" // Required diff --git a/resource_templates/cluster_tkg_vsphere.tf b/resource_templates/cluster_tkg_vsphere.tf index a194cb0ff..1afc8ade2 100644 --- a/resource_templates/cluster_tkg_vsphere.tf +++ b/resource_templates/cluster_tkg_vsphere.tf @@ -9,7 +9,7 @@ data "tanzu-mission-control_cluster" "ready_only_cluster_view" { } // Create Tanzu Mission Control Tanzu Kubernetes Grid vSphere workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkg_vsphere_cluster" { +resource "tanzu-mission-control_cluster" "tkg_vsphere_cluster" { management_cluster_name = "" // Default: attached provisioner_name = "" // Default: attached name = "" // Required diff --git a/resource_templates/cluster_tkgs.tf b/resource_templates/cluster_tkgs.tf index dd3a24560..bc4be4f95 100644 --- a/resource_templates/cluster_tkgs.tf +++ b/resource_templates/cluster_tkgs.tf @@ -9,7 +9,7 @@ data "tanzu-mission-control_cluster" "ready_only_cluster_view" { } # Create Tanzu Mission Control Tanzu Kubernetes Grid Service workload cluster entry -resource "tanzu-mission-control_cluster" "create_tkgs_workload" { +resource "tanzu-mission-control_cluster" "tkgs_workload" { management_cluster_name = "" provisioner_name = "" name = "" diff --git a/resource_templates/namespace.tf b/resource_templates/namespace.tf index e5d428a40..fa65d9207 100644 --- a/resource_templates/namespace.tf +++ b/resource_templates/namespace.tf @@ -10,7 +10,7 @@ data "tanzu-mission-control_namespace" "read_namespace" { } // Create Tanzu Mission Control namespace entry -resource "tanzu-mission-control_namespace" "create_namespace" { +resource "tanzu-mission-control_namespace" "namespace" { name = "" // Required cluster_name = "" // Required provisioner_name = "" // Default: attached @@ -28,7 +28,7 @@ resource "tanzu-mission-control_namespace" "create_namespace" { } // Create Tanzu Mission Control namespace entry with minimal information -resource "tanzu-mission-control_namespace" "create_namespace_min_info" { +resource "tanzu-mission-control_namespace" "namespace_min_info" { name = "" // Required cluster_name = "" // Required } \ No newline at end of file diff --git a/resource_templates/workspace.tf b/resource_templates/workspace.tf index 7796b1c94..a5eaed47d 100644 --- a/resource_templates/workspace.tf +++ b/resource_templates/workspace.tf @@ -2,7 +2,7 @@ // Operations supported : Read, Create, Update & Delete // Create Tanzu Mission Control workspace entry -resource "tanzu-mission-control_workspace" "create_workspace" { +resource "tanzu-mission-control_workspace" "workspace" { name = "" // Required meta { // Optional description = "description of the workspace" @@ -11,7 +11,7 @@ resource "tanzu-mission-control_workspace" "create_workspace" { } // Create Tanzu Mission Control workspace entry with minimal information -resource "tanzu-mission-control_workspace" "create_workspace_min_info" { +resource "tanzu-mission-control_workspace" "workspace_min_info" { name = "" // Required }