little-river-49422
03/04/2019, 8:40 PMincalculable-sundown-82514
03/04/2019, 8:40 PMlittle-river-49422
03/05/2019, 2:09 PMlittle-river-49422
03/05/2019, 2:43 PMlemon-wall-81522
03/07/2019, 11:49 PM➜ cat __main__.py
from pulumi_aws import ec2, s3
vpc = ec2.Vpc('new-vpc', cidr_block = '10.0.0.0/16'),
bucket = s3.Bucket('new-bucket',
tags = {'Name': 'infra bucket (front-back-multi-az)', 'Creator': 'timc'})
lemon-wall-81522
03/07/2019, 11:49 PM➜ pulumi up -y
[. . .]
Updating (dev):
Type Name Status Info
+ pulumi:pulumi:Stack possible-bug_s3_bucket-name-dev created
+ ├─ aws:ec2:Vpc new-vpc created
+ └─ aws:s3:Bucket new-bucket **creating failed** 1 error
Diagnostics:
aws:s3:Bucket (new-bucket):
error: Plan apply failed: 1 error occurred:
* creating urn:pulumi:dev::possible-bug_s3_bucket-name::aws:s3/bucket:Bucket::new-bucket: "new-bucket-c0ce544": InvalidTag: The TagValue you have provided is invalid
status code: 400, request id: FE884245AFE0DA9D, host id: 0kjicYJx4hqgZNeKyM62RTJ1PrlKL1SGiYkC9eSF09SWa40+r2ExFgm30OIsRm4wqbtyyVS5gkQ=
lemon-wall-81522
03/07/2019, 11:49 PM➜ pulumi up -y
[. . .]
Updating (dev):
Type Name Status
pulumi:pulumi:Stack possible-bug_s3_bucket-name-dev
~ └─ aws:s3:Bucket new-bucket updated
Resources:
~ 1 updated
2 unchanged
lemon-wall-81522
03/08/2019, 5:05 PMName
tag are invalid, at least in some contexts. They’re allowed on EC2 tag names, for example.
Still odd that Pulumi marks the bucket as updated. It also doesn’t add the tag.
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.htmlgentle-diamond-70147
03/08/2019, 5:19 PM(front-back-multi-az)
?proud-artist-4864
03/10/2019, 4:16 AMproud-artist-4864
03/10/2019, 10:42 AMproud-artist-4864
03/10/2019, 10:43 AMlittle-river-49422
03/10/2019, 12:26 PMlemon-wall-81522
03/13/2019, 4:41 PMasg
configuration, create the launch template separately, then go back and run the whole thing.
➜ cat __main__.py
import pulumi
from pulumi_aws import autoscaling, ec2
lt = ec2.LaunchTemplate('launch-template',
image_id = 'ami-032509850cf9ee54e',
instance_type = 't2.micro',
)
asg = autoscaling.Group('autoscaling-group',
launch_template = {'name': lt.id},
min_size = 1,
max_size = 4,
)
pulumi.export('launch-template', lt.id),
pulumi.export('autoscaling group', asg.id),
After creating it separately, the launch template is available
➜ pulumi stack output launch-template
lt-01a8e3b45e7100203
But not to the autoscaling group apparently
➜ pulumi up -y
[...]
Updating (dev):
Type Name Status Info
pulumi:pulumi:Stack possible-bug_asg_launch-template-does-not-exist-dev
+ └─ aws:autoscaling:Group autoscaling-group **creating failed** 1 error
Diagnostics:
aws:autoscaling:Group (autoscaling-group):
error: Plan apply failed: Error creating AutoScaling Group: ValidationError: The specified launch template, with template name lt-01a8e3b45e7100203, does not exist.
status code: 400, request id: cd425ae2-45ac-11e9-bd93-5791f9b27b8e
alert-monitor-28534
03/14/2019, 9:31 AMlittle-river-49422
03/14/2019, 10:07 AMlittle-river-49422
03/14/2019, 10:07 AMproud-artist-4864
03/15/2019, 3:42 AMlittle-river-49422
03/15/2019, 1:53 PMasync def get_aks_credentials():
result = await get_kubernetes_cluster(name=gen_name('aks'),
resource_group_name=gen_name('rg')
)
return result.kube_config_raw
and I just call get_aks_credentials() as an input to the resource, or in another resource I use apply function to create a string, that string gets passed to a dictionary and that dictionary gets passed to the resourceproud-artist-4864
03/16/2019, 6:35 AMproud-artist-4864
03/16/2019, 6:38 AMlittle-river-49422
03/16/2019, 6:43 AMproud-artist-4864
03/16/2019, 6:47 AMproud-artist-4864
03/16/2019, 6:48 AMproud-artist-4864
03/16/2019, 6:48 AMproud-artist-4864
03/16/2019, 6:49 AMproud-artist-4864
03/16/2019, 6:55 AMproud-artist-4864
03/16/2019, 6:58 AMproud-artist-4864
03/16/2019, 7:06 AMlittle-river-49422
03/16/2019, 7:38 AMlittle-river-49422
03/16/2019, 7:38 AM