Hi, trying to import a workload in Kubernetes into...
# general
p
Hi, trying to import a workload in Kubernetes into pulumi. What’s the id for a workload in Kubernetes?
s
What's the name of the Kubernetes resource?
That is, do you mean a ReplicaSet?
p
serviceaccount
Copy code
awsEbsCsiDriversa, err := corev1.NewServiceAccount(ctx, fmt.Sprintf("%s", _AwsEbsCsiDriverSaName), &corev1.ServiceAccountArgs{
			Metadata: &metav1.ObjectMetaArgs{
				ClusterName: eksCluster.Core.Cluster().Name(),
				Name:        pulumi.String(_AwsEbsCsiDriverSaName),
				Namespace:   pulumi.String(_KubeSystemNameSpaceName),
			},
		},
			pulumi.Provider(k8sProviderEnabledServerSideApply),
			pulumi.DependsOn([]pulumi.Resource{iamRole4AwsEbsCsiDriver}),
			pulumi.Import(pulumi.ID(fmt.Sprintf("%s/%s", _KubeSystemNameSpaceName, _AwsEbsCsiDriverSaName))),
			pulumi.Protect(true),
			pulumi.IgnoreChanges([]string{"metadata.labels.*", "metadata.annotations.*"}))
		if err != nil {
			return fmt.Errorf("error creating service account: %v", err)
		}
import like this