Skip to content

Add boolean attribute to opt-out of usage_telemetry instead of relying on observability_tag #470

@SebastianRehfeldt

Description

@SebastianRehfeldt

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

What is the outcome that you are trying to reach?

Hey, We are using the EKS blueprint addons module in our cdktf codebase. We now want to upgrade the terraform module to the latest version but ran into issues with the usage_telemetry resource and cannot opt-out.

Versions:

> cdktf --version
0.21.0

> terraform version
Terraform v1.13.1
on darwin_arm64

{
      "name": "eks_blueprints_addons",
      "source": "aws-ia/eks-blueprints-addons/aws",
      "version": "~> 1.22.0"
}

From a users' perspective, we would expect the following python code to set the observability_tag to null which should correctly opt-out of the resource creation:

EksBlueprintsAddons(
            self,
            ...
            observability_tag=None,
        )

Instead of correctly propagating None as null, the addons module will fallback to the default value qs-1ubotj5kl. (We might be doing something wrong on the python side or it might also be a cdktf issue.)

However, would it be cleaner and more consistent with other resources to introduce a boolean flag, e.g. enable_usage_telemetry, which toggles the creation of the resource?

Describe the solution you would like

Make it possible to opt-out to from the usage_telemetry resource via boolean flag

Describe alternatives you have considered

We tried to simply create the resource but it fails as the composed cloudformation stack name is invalid:

Value 'our_cluster_name_contains_underscores-79b1' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]*

A stack name can contain only alphanumeric characters (case-sensitive) and hyphens
-- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-create-stack.html

We tried setting environment variables or passing them via cli arguments. We tried using cdktf.Token.null_value() but could not get this too work either

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions