From b6990696753e50ae2218781a5ba249aad8dab76e Mon Sep 17 00:00:00 2001 From: Brandon Pollack Date: Tue, 15 Oct 2024 06:53:01 +0900 Subject: [PATCH] Add HasPulumiProviderName check for use in terraform converter. --- pkg/tf2pulumi/il/plugin_info.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/tf2pulumi/il/plugin_info.go b/pkg/tf2pulumi/il/plugin_info.go index fc9795bcd..21bcc6eaf 100644 --- a/pkg/tf2pulumi/il/plugin_info.go +++ b/pkg/tf2pulumi/il/plugin_info.go @@ -158,6 +158,12 @@ var pulumiNames = map[string]string{ "template": "terraform-template", } +// HasPulumiProviderName returns true if the given Terraform provider has a corresponding Pulumi provider name. +func HasPulumiProviderName(terraformProviderName string) bool { + _, hasPulumiName := pulumiNames[terraformProviderName] + return hasPulumiName +} + // GetPulumiProviderName returns the Pulumi name for the given Terraform provider. In most cases the two names will be // identical. func GetPulumiProviderName(terraformProviderName string) string {