https://pulumi.com logo
#general
Title
# general
l

little-energy-64187

08/19/2019, 4:46 PM
Continuing my import experiments
Copy code
const serviceAccount = new gcp.serviceAccount.Account("example", {
    displayName: "example",
    accountId: "example-service-account",
    project: "project"
}, { import: "projects/project/serviceAccounts/example-service-account@project.iam.gserviceaccount.com" })

const roles = new gcp.projects.IAMCustomRole("example", {
    roleId: "example",
    title: "example",
    description: "example roles",
    permissions: [
        'compute.addresses.list',
        'compute.instances.addAccessConfig',
        'compute.instances.deleteAccessConfig',
        'compute.instances.get',
        'compute.instances.list',
        'compute.projects.get',
        'container.clusters.get',
        'container.clusters.list',
        'resourcemanager.projects.get',
        'compute.networks.useExternalIp',
        'compute.subnetworks.useExternalIp',
        'compute.addresses.use',
    ]
}, { import: "projects/project/roles/example" })

const examplePolicyBinding = new gcp.serviceAccount.IAMBinding("example", {
    serviceAccountId: serviceAccount.accountId,
    members: ["serviceAccount:example-service-account@project.iam.gserviceaccount.com"],
    role: "projects/project/roles/example"
}, { import: "<mailto:example-service-account@project.iam.gserviceaccount.com|example-service-account@project.iam.gserviceaccount.com>" })
policy binding fails with
Wrong number of parts to Binding id [example-service-account@project.iam.gserviceaccount.com]; expected 'resource_name role'.
I am still looking for ideas on this, anyone?
2 Views