sparse-intern-71089
03/11/2019, 6:33 PMcreamy-potato-29402
03/11/2019, 7:23 PMcreamy-potato-29402
03/11/2019, 7:23 PMimportant-leather-28796
03/11/2019, 7:24 PMimportant-leather-28796
03/11/2019, 7:24 PMkubectl create clusterrolebinding cluster-admin-binding \
--clusterrole cluster-admin --user [USER_ACCOUNT]
important-leather-28796
03/11/2019, 7:25 PMcreamy-potato-29402
03/11/2019, 7:26 PMcluster-admin
role grant you in your cluster?creamy-potato-29402
03/11/2019, 7:26 PMbusy-pizza-73563
03/11/2019, 7:26 PMcluster-admin
capabilities.important-leather-28796
03/11/2019, 7:27 PMimportant-leather-28796
03/11/2019, 7:27 PMcreamy-potato-29402
03/11/2019, 7:28 PMcreamy-potato-29402
03/11/2019, 7:28 PMimportant-leather-28796
03/11/2019, 7:28 PMcreamy-potato-29402
03/11/2019, 7:28 PMimportant-leather-28796
03/11/2019, 7:29 PMcreamy-potato-29402
03/11/2019, 7:29 PMcreamy-potato-29402
03/11/2019, 7:29 PMimportant-leather-28796
03/11/2019, 7:29 PMcreamy-potato-29402
03/11/2019, 7:30 PMcreamy-potato-29402
03/11/2019, 7:30 PMimportant-leather-28796
03/11/2019, 7:31 PMimportant-leather-28796
03/11/2019, 7:31 PMimportant-leather-28796
03/11/2019, 7:31 PMimportant-leather-28796
03/11/2019, 7:31 PMcreamy-potato-29402
03/11/2019, 7:32 PMcreamy-potato-29402
03/11/2019, 7:32 PMcreamy-potato-29402
03/11/2019, 7:33 PMimportant-leather-28796
03/11/2019, 7:33 PMresources
stack which is below our app
stackimportant-leather-28796
03/11/2019, 7:33 PMimportant-leather-28796
03/11/2019, 7:33 PMimportant-leather-28796
03/11/2019, 7:33 PMimportant-leather-28796
03/11/2019, 7:34 PMimportant-leather-28796
03/11/2019, 7:44 PM<http://clusterrolebindings.rbac.authorization.k8s.io|clusterrolebindings.rbac.authorization.k8s.io> is forbidden: User "<mailto:ci-infrastructure@xxx.iam.gserviceaccount.com|ci-infrastructure@xxx.iam.gserviceaccount.com>" cannot create resource "clusterrolebindings" in API group "<http://rbac.authorization.k8s.io|rbac.authorization.k8s.io>" at the cluster scope
. Updated gist https://gist.github.com/rosskevin/e80dabe6347fa34c179b3885e4f4a3a0important-leather-28796
03/11/2019, 7:44 PMcreamy-potato-29402
03/11/2019, 7:47 PMimportant-leather-28796
03/11/2019, 7:48 PMroles/container.clusterAdmin
and roles/container.developer
creamy-potato-29402
03/11/2019, 7:48 PMpulumi refresh
?important-leather-28796
03/11/2019, 7:49 PMclusterrolebindings
is in https://cloud.google.com/iam/docs/understanding-roles#kubernetes-engine-rolescreamy-potato-29402
03/11/2019, 7:49 PMcreamy-potato-29402
03/11/2019, 7:50 PMcreamy-potato-29402
03/11/2019, 7:50 PMRoleBinding
object.creamy-potato-29402
03/11/2019, 7:50 PMimportant-leather-28796
03/11/2019, 7:50 PMcreamy-potato-29402
03/11/2019, 7:51 PMRoleBinding
?creamy-potato-29402
03/11/2019, 7:51 PMimportant-leather-28796
03/11/2019, 7:52 PMnew
a ClusterRoleBinding
in pulumi to mimic kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole cluster-admin --user [sa email]
creamy-potato-29402
03/11/2019, 7:52 PMcreamy-potato-29402
03/11/2019, 7:52 PMcreamy-potato-29402
03/11/2019, 7:52 PMimportant-leather-28796
03/11/2019, 7:52 PMimportant-leather-28796
03/11/2019, 7:53 PMnew
one and see where that goes, on the ci-inf saimportant-leather-28796
03/11/2019, 7:53 PMcreamy-potato-29402
03/11/2019, 7:53 PMimportant-leather-28796
03/11/2019, 8:04 PMinfrastructure
stack post-cluster creationimportant-leather-28796
03/11/2019, 8:39 PMciInf
service account from identity
. I want to import it and get the email. Do I need to parse the json from it if I don’t export the string email?
e.g.
stack.identity.getOutput('ciInf').apply(json => JSON.parse(json).email)
creamy-potato-29402
03/11/2019, 8:40 PMcreamy-potato-29402
03/11/2019, 8:40 PMcreamy-potato-29402
03/11/2019, 8:40 PMimportant-leather-28796
03/11/2019, 8:40 PMcreamy-potato-29402
03/11/2019, 8:40 PMcreamy-potato-29402
03/11/2019, 8:40 PMimportant-leather-28796
03/11/2019, 8:41 PMimportant-leather-28796
03/11/2019, 8:41 PMcreamy-potato-29402
03/11/2019, 8:42 PMimportant-leather-28796
03/11/2019, 8:44 PMcreamy-potato-29402
03/11/2019, 8:44 PMcreamy-potato-29402
03/11/2019, 8:44 PMimportant-leather-28796
03/11/2019, 8:44 PMSyntaxError: Unexpected token o in JSON at position 1
important-leather-28796
03/11/2019, 8:46 PMexport const foo = stack.identity.getOutput('ciInfrastructure')
yields
Outputs:
foo : {
accountId : "ci-infrastructure"
displayName: "CI infrastructure account"
email : "<mailto:ci-infrastructure@xxx.iam.gserviceaccount.com|ci-infrastructure@xxx.iam.gserviceaccount.com>"
id : "projects/advisorintake/serviceAccounts/ci-infrastructure@xxx.iam.gserviceaccount.com"
name : "projects/advisorintake/serviceAccounts/ci-infrastructure@xxx.iam.gserviceaccount.com"
project : "xxx"
uniqueId : "117964030702708620539"
urn : "urn:pulumi:development::xxx-identity::gcp:serviceAccount/account:Account::ciInfrastructure"
}
creamy-potato-29402
03/11/2019, 8:47 PMgetOutput
show?creamy-potato-29402
03/11/2019, 8:47 PMcreamy-potato-29402
03/11/2019, 8:47 PMimportant-leather-28796
03/11/2019, 8:48 PMcreamy-potato-29402
03/11/2019, 8:48 PMcreamy-potato-29402
03/11/2019, 8:48 PMcreamy-potato-29402
03/11/2019, 8:48 PMimportant-leather-28796
03/11/2019, 8:48 PMimportant-leather-28796
03/11/2019, 8:49 PMfoo is: OutputImpl {
__pulumiOutput: true,
isKnown: Promise { <pending> },
resources: [Function],
promise: [Function],
toString: [Function],
toJSON: [Function],
apply: [Function],
get: [Function] }
important-leather-28796
03/11/2019, 8:49 PMoutput
it perhapsimportant-leather-28796
03/11/2019, 8:53 PMcreamy-potato-29402
03/11/2019, 8:54 PMimportant-leather-28796
03/11/2019, 8:54 PMcreamy-potato-29402
03/11/2019, 8:54 PMexport
of CustomResource
. cc @microscopic-florist-22719 Instead you should just export the email.important-leather-28796
03/11/2019, 8:54 PMmicroscopic-florist-22719
microscopic-florist-22719
const foo = stack.identity.getOutput('ciInfrastructure')
, you can do foo.apply(foo => foo.email)
creamy-potato-29402
03/11/2019, 8:58 PMimportant-leather-28796
03/11/2019, 8:58 PMimportant-leather-28796
03/11/2019, 8:58 PMcreamy-potato-29402
03/11/2019, 8:58 PMimportant-leather-28796
03/11/2019, 8:58 PM