bland-pharmacist-96854
01/09/2023, 6:34 PMjolly-fall-57688
01/09/2023, 7:35 PMdns_provider = aws.Provider(
'dns',
region = 'us-east-1',
profile = 'my_local_aws_profile_for dev account',
assume_role = aws.ProviderAssumeRoleArgs(
role_arn = "my_arn_where_route53_record_resides"
)
)
record = aws.route53.Record(
"data-viz",
zone_id = aws.route53.get_zone(name = "my_domain.com."),
name = "<http://myrecord.my_domain.com|myrecord.my_domain.com>",
type = "CNAME",
aliases = [aws.route53.RecordAliasArgs(
name = alb.load_balancer.dns_name,
zone_id = alb.load_balancer.zone_id,
evaluate_target_health = True
)],
opts=pulumi.ResourceOptions(provider = dns_provider)
)
thankful-stone-34269
01/09/2023, 8:47 PMModuleNotFoundError
when running pulumi up
on built in libraries like import pulumi_eks
thankful-stone-34269
01/09/2023, 10:02 PMeager-keyboard-30823
01/10/2023, 3:02 PMpulumi.config.ConfigMissingError
when running unit tests on infra that has require
on some config options. Any tips for how to avoid that?bland-pharmacist-96854
01/10/2023, 4:39 PMdry-shampoo-85098
01/11/2023, 5:29 PMwarning: unable to detect a global setting for GCP Project;
despite having run pulumi config set gcp:project project_name
any thoughts on how I can track down and resolve these warnings?white-author-39785
01/13/2023, 3:32 PMcreate
method, I start get a logger with logger = logging.getLogger()
. each of these loggers gets its own configuration with an individual file. However, only one file is created and everything is written there (as if only the last of the logging.getLogger()
instances is really created. This is extremely confusing.
• When using an AuthorizationManagementClient
from azure.mgmt.authorization
, I get really confusing 409 Conflict
responses that make me suspect that a similar thing like with the logger happens here as well.
Could anyone with more experience with dynamic providers give me some insights?limited-continent-1382
01/16/2023, 10:53 AMambitious-sundown-4188
01/16/2023, 8:29 PMsparse-intern-71089
01/17/2023, 12:25 PMbland-pharmacist-96854
01/17/2023, 3:00 PMsparse-intern-71089
01/17/2023, 6:04 PMdamp-fall-39416
01/18/2023, 9:42 PMshy-gold-87158
01/19/2023, 7:58 PMflat-sunset-64442
01/20/2023, 7:45 AMazure-native
package. https://www.pulumi.com/registry/packages/azure-native/api-docs/keyvault/vault/
What I can't understand is if the package should implicitly understand that I have set the tenantId
in the config file, or if I need to read it out in the python code and pass it along? And if so, how do I get that config value in code? No matter what I do, it's trying to read from a section prefixed by my application name...
This is (part of) what I have in `Pulumi.stack-name.yaml`:
config:
azure-native:tenantId: 123-123-123-123
bland-pharmacist-96854
01/20/2023, 3:50 PMpulumi.output.json_dumps
?flat-byte-25499
01/20/2023, 4:21 PMcreate_account
that returns an Output object (aws.organizations.Account).
I'm then trying to pass the account id to another function because I need to render its value in json templates for IAM policies. Here is how I'm currently doing it:
config = pulumi.Config()
region = config.require('region')
name = config.require('name')
account = create_account(region=region, name=name)
account.id.apply(lambda account_id: create_iam_roles(account_id=account_id))
This is working perfectly but if I understood right, this is not a good practice to create resources in the apply. I saw in the doc that I should be able to pass this argument like below but it throws an error when I try to manipulate it as a string:
create_iam_roles(account_id=account.id.apply(lambda account_id: f"{account.id}))
Here is the manipulation I need to do with this string in the create_iam_roles
function. Is there anything I miss?
#opening policy file
template_policy = file.read()
policy = json.loads(template_policy)
policy['Statement'][0]['Principal']['AWS'] = f"arn:aws:iam::{account_id}:root"
role = awsnative.iam.Role(
assume_role_policy_document=policy,
....
)
Thank you!bland-pharmacist-96854
01/24/2023, 12:35 PMbland-pharmacist-96854
01/24/2023, 12:36 PMbland-pharmacist-96854
01/24/2023, 12:36 PMbland-pharmacist-96854
01/24/2023, 12:38 PMpulumi.Output.concat()
or pulumi.Output.format()
for a keybland-pharmacist-96854
01/24/2023, 12:38 PMearly-cat-34152
01/26/2023, 9:35 AMpulumi_command.local.Command
? For some reason, after altering the command and adding an asset_paths
argument, creating (and updating) this Resource fails all the time. When I run the command outside of Pulumi it works fine and has a zero exit status. I want to find out which exit status is returned then, and if it's a Pulumi-internal error (I suspect so), I want to know which one.kind-jelly-61624
01/26/2023, 9:05 PMstrong-helmet-83704
01/27/2023, 2:41 AMgreat-sunset-355
01/31/2023, 12:33 PMdef conditional_role_not_exists():
try:
result = aws.iam.get_role("conditional_role_not_exists")
if result.id:
return
except:
pass
# create if it does not exist
aws.iam.Role("conditional_role_not_exists", args=aws.iam.RoleArgs(assume_role_policy="{}"))
conditional_role_not_exists()
quaint-hydrogen-7228
01/31/2023, 2:13 PMbland-pharmacist-96854
01/31/2023, 3:26 PMbland-pharmacist-96854
01/31/2023, 3:26 PM