hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.48k stars 4.56k forks source link

cdktf doesnt generate key_vault_secrets_provider #16461

Open hs-rittmeier opened 2 years ago

hs-rittmeier commented 2 years ago

Is there an existing issue for this?

Community Note

Terraform Version

1.1.8

AzureRM Provider Version

3.2.0

Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster

Terraform Configuration Files

{
    "language": "csharp",
    "app": "dotnet run -p Project.csproj",
    "terraformProviders": [
        "hashicorp/azurerm@~> 3.2.0"
    ],
    "terraformModules": [],
    "context": {
        "excludeStackIdFromLogicalIds": "true",
        "allowSepCharsInLogicalIds": "true"
    },
    "projectId": "xxxxx"
}

        public MyApp(Construct scope, string id) : base(scope, id)
        {
            new AzurermProvider(this, "AzureRm", new AzurermProviderConfig
            {
                Features = new AzurermProviderFeatures(),
                SubscriptionId = "sdfg"
            });

            // define resources here
            var rg = new ResourceGroup(this, "rg", new ResourceGroupConfig() { Location = "westeurope", Name = "rg" });
            new KubernetesCluster(this, "afdsf", new KubernetesClusterConfig()
            {
                ResourceGroupName =rg.Name,
                DefaultNodePool = new KubernetesClusterDefaultNodePool()
                {
                    Name = "dng2n",
                    VmSize = "Standard_D2_v4"
                },
                Location = rg.Location,
                Name = "cluster",
                KeyVaultSecretsProvider = new KubernetesClusterKeyVaultSecretsProvider()
                {
                    SecretRotationEnabled = true,
                    SecretRotationInterval = "2m"
                }
            });
        }

Debug Output/Panic Output

Not related to the issue itself. This output is caused due to the deletion (which is the real issue) of the key_vault_secrets_provider.

Expected Behaviour

CDKTF should create a cluster with enabled key vault addon

Actual Behaviour

CDKTF creates cluster with no key vault addon

Steps to Reproduce

cdktf synth -> cdk.tf.json key_vault_secrets_provider block at cluster is missing at cdk.tf.json

Important Factoids

No response

References

No response

hs-rittmeier commented 2 years ago

Hello, I tested it with 3.0.2 same behavior :(

hs-rittmeier commented 2 years ago

Hi, just tested with 3.3 image Still broken :( image