creamy-insurance-88801
06/16/2024, 9:40 AMException: invoke of aws:msk/getBootstrapBrokers:getBootstrapBrokers failed: invocation of aws:msk/getBootstrapBrokers:getBootstrapBrokers returned an error: invoking aws:msk/getBootstrapBrokers:getBootstrapBrokers: 1 error occurred:
reading MSK Cluster (arn:aws:kafka:us-east-1:11111111111:cluster/qa-msk-cluster/7971b812-1c13-40a0-95a7-77dc6c5deaf1-22) bootstrap brokers: operation error Kafka: GetBootstrapBrokers, https response error StatusCode: 403, RequestID: 2c958b31-8fc2-4c65-8e9a-933a0caf7fee, api error AccessDeniedException: User: arn:aws:sts::222222222222:assumed-role/pulumi-controller-role/i-123123123123 is not authorized to perform: kafka:GetBootstrapBrokers on resource: arn:aws:kafka:us-east-1:1111111111:cluster/qa-msk-cluster/7971b812-1c13-40a0-95a7-77dc6c5deaf1-22
It almost looks like pulumi is not using that cross acount role when its calling the GetBootstrapBrokers API call, its using the local IAM profile permissions hence it doesn’t have the access. It should be using the cross account role in that other account.
Funny thing is, I created a brand new project/stack with the same pulumi code with only the MSK resource for test, and everything works as expected on the same server.
Has anybody else seen a similar issue? What do you guys suggest?creamy-insurance-88801
06/16/2024, 11:12 PMbootstrap_brokers = aws.msk.get_bootstrap_brokers_output(cluster_arn=arn)
should have been:
bootstrap_brokers = aws.msk.get_bootstrap_brokers_output(cluster_arn=arn, opts=pulumi.InvokeOptions(provider=selected_provider))
is there a way to specify/change the default provider at the beginning of the program once, so that I don’t have to specify ResourceOptions or InvokeOptions for hundreds of resources?lively-crayon-44649
06/17/2024, 9:46 AMPulumi.yaml
(or in the case of automation, by specifying that configuration before you run the stack in code). If you want to continue using explicit providers, there is nothing that quite does what you want yet, though it is being looked at/worked on very shortly I believe.salmon-gold-74709
06/23/2024, 4:45 PM