Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS provider can't create an EKS cluster #436

Closed
cesarpball opened this issue Nov 19, 2020 · 4 comments
Closed

AWS provider can't create an EKS cluster #436

cesarpball opened this issue Nov 19, 2020 · 4 comments
Labels
bug Something isn't working cdktf

Comments

@cesarpball
Copy link

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

cdktf & Language Versions

{
  "language": "python",
  "app": "pipenv run python main.py",
  "terraformProviders": ["aws@~> 2.0"],
  "codeMakerOutput": "imports"
}

cdktf --version 0.0.18-pre.134

Affected Resource(s)

https://gist.github.com/cesarpball/5180bfadd8e1fb16116b810cb97b4530

Expected Behavior

EKS created successfully

Actual Behavior

  File "main.py", line 51, in __init__
    "subnet_ids": mylist
  File "/Users/test/.local/share/virtualenvs/aws-eks-infra-9UoNTo0O/lib/python3.7/site-packages/jsii/_runtime.py", line 69, in __call__
    inst = super().__call__(*args, **kwargs)
⠸ synthesizing ...
non-zero exit code 1

Steps to Reproduce

cdktf diff

Important Factoids

subnet_ids is a valid input for Terraform on the EKS cluster creation. This value is receiving a list of subnets-ids: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster

References

None

@cesarpball cesarpball added the bug Something isn't working label Nov 19, 2020
@skorfmann
Copy link
Contributor

well, that looks like a bug. We'll look into that

@jsteinich
Copy link
Collaborator

jsteinich commented Nov 19, 2020

In EksCluster, need to use role_arn rather than role.

There are a couple bugs as well, but they can be worked around.
First, you'll need to wrap the vpc config in a list due to #258.
Second, you'll need to use the Typescript casing for the keys in the vpc config, i.e. subnetIds. I don't think there is an issue for that.

        EksCluster(self, "eks-cluster",
            name = cluster_name,
            role_arn = eksRole.arn,
            vpc_config = [{
                "endpointPublicAccess": True,
                "subnetIds": mylist
            }]

        )

@cesarpball
Copy link
Author

In EksCluster, need to use role_arn rather than role.

There are a couple bugs as well, but they can be worked around.
First, you'll need to wrap the vpc config in a list due to #258.
Second, you'll need to use the Typescript casing for the keys in the vpc config, i.e. subnetIds. I don't think there is an issue for that.

        EksCluster(self, "eks-cluster",
            name = cluster_name,
            role_arn = eksRole.arn,
            vpc_config = [{
                "endpointPublicAccess": True,
                "subnetIds": mylist
            }]

        )

This is working with this approach. Thanks for the clarification about the Typescript casing.

Regards

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2022

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working cdktf
Projects
None yet
Development

No branches or pull requests

3 participants