Can I get a pointer to a doc showing how to `get` ...
# general
e
Can I get a pointer to a doc showing how to
get
an existing resource in AWS? E.g. someone created an IAM role and I'd like to create some `aws.iam.RolePolicy`s for it
I've done it once before but totally forgot how
m
aws.iam.Role.get("theRole", theRoleArn)
should work
e
Thanks!
hmmm... not working
const publicCIRunnerRole = aws.iam.Role.get("public-runner-role", "arn:aws:iam::009348887430:role/public-sandbox-uw2-gitlab-login-role");
Copy code
Diagnostics:
  aws:iam:Role (public-runner-role):
    error: Preview failed: refreshing urn:pulumi:mustang-aws-iam-sandbox::mustang-aws-iam::aws:iam/role:Role::public-runner-role: Error reading IAM Role arn:aws:iam::009348887430:role/public-sandbox-uw2-gitlab-login-role: ValidationError: The specified value for roleName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-
        status code: 400, request id: 7bde57a0-fe5e-11e8-9fb7-b35a28b1dffe

error: an error occurred while advancing the preview
m
oh, weird
I wonder if it's just the role name rather than the full ARN
e
good catch, that's what it was
Any idea about this error?
Copy code
Do you want to perform this update? yes
Updating (tableau/online-sandbox-3-vpc-0d18addcc5815ae23):

     Type                                  Name                                                Status                  Info
     pulumi:pulumi:Stack                   eks-cluster-online-sandbox-3-vpc-0d18addcc5815ae23                          2 messages
     └─ eks:index:Cluster                  online-sandbox-3-eks-cluster
 +      └─ pulumi-nodejs:dynamic:Resource  online-sandbox-3-eks-cluster-vpc-cni                **creating failed**     1 error

Diagnostics:
  pulumi:pulumi:Stack (eks-cluster-online-sandbox-3-vpc-0d18addcc5815ae23):
    error: error validating "/tmp/tmp-98776nCltLBu2Z5h9.tmp": error validating data: ValidationError(CustomResourceDefinition.spec.names): unknown field "scope" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames; if you choose to ignore these errors, turn validation off with --validate=false

    output : {"clusterAccessRoleArn":"arn:aws:iam::009348887430:role/mustang-sandbox-k8s-cluster-role-30d65f2","clusterAutomationAccessRoleArn":"arn:aws:iam::009348887430:role/mustang-sandbox-automation-role-f39b756"}

  pulumi-nodejs:dynamic:Resource (online-sandbox-3-eks-cluster-vpc-cni):
    error: Plan apply failed: Command failed: kubectl apply -f /tmp/tmp-98776nCltLBu2Z5h9.tmp
    error: error validating "/tmp/tmp-98776nCltLBu2Z5h9.tmp": error validating data: ValidationError(CustomResourceDefinition.spec.names): unknown field "scope" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames; if you choose to ignore these errors, turn validation off with --validate=false

Resources:
    25 unchanged
m
cc @creamy-potato-29402
c
I can't look at this until much later tonight. Ping tomorrow if still a problem.
(kube Con busy-ness)
e
Looks like EKS cluster creation is blocked by this with the latest CLI and
@pulumi
packages
rather... cluster is up, but the CNI resource is failing
@white-balloon-205 FYI
I've tried destroy+update a few times with no luck
w
Looks like there are, or have been, bugs in the AWS CNI YAML: • https://github.com/aws/amazon-vpc-cni-k8s/issues/198https://github.com/aws/amazon-vpc-cni-k8s/issues/183 Looking into whether the version we packaged up still has these bugs and if so what will be needed to workaround them.
I have a PR out for a fix here: https://github.com/pulumi/pulumi-eks/pull/37
👍 1
e
Is there a dev build version I can use?
w
Yes - latest
dev
build should now have this change. Working on publishing a patch release with the fix as well.
e
that works, thanks
w
This is also now available as part of `0.16.4`: https://www.npmjs.com/package/@pulumi/eks/v/0.16.4