clean-dentist-2515
11/14/2020, 11:10 PMid
is str
type:
https://www.pulumi.com/docs/reference/pkg/digitalocean/droplet/#id_python
but the droplet_id
input for the volume attachment is `int`:
https://www.pulumi.com/docs/reference/pkg/digitalocean/volumeattachment/#droplet_id_python
pulumi up
fails with:
VolumeAttachment resource 'pgb-dokku-db-vol-attachment' has a problem: Attribute must be a whole number, got 216866671
if I try to cast the output id as int(droplet.id)
(in python) I get:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'Output'
is there a workaround?clean-dentist-2515
11/14/2020, 11:12 PMbroad-dog-22463
11/14/2020, 11:12 PMclean-dentist-2515
11/14/2020, 11:13 PMclean-dentist-2515
11/14/2020, 11:13 PMbroad-dog-22463
11/14/2020, 11:14 PMbroad-dog-22463
11/14/2020, 11:14 PMclean-dentist-2515
11/14/2020, 11:16 PMelegant-window-55250
11/14/2020, 11:21 PMchilly-hairdresser-56259
11/14/2020, 11:56 PMwonderful-manchester-62734
11/15/2020, 8:41 AMwonderful-manchester-62734
11/15/2020, 8:41 AMbored-intern-60856
11/15/2020, 3:35 PMbored-intern-60856
11/15/2020, 3:36 PMbored-intern-60856
11/15/2020, 3:38 PMelegant-dress-88912
11/16/2020, 12:39 PMis already being used by
message.able-crayon-21563
11/16/2020, 5:17 PMUser is not a member of Pulumi organization’s backing identity provider.The user appears in the list, I click +, get above message. Any ideas? Thanks.
fast-dinner-32080
11/16/2020, 5:44 PMbroad-dog-22463
11/16/2020, 5:44 PMbroad-dog-22463
11/16/2020, 5:44 PMfast-dinner-32080
11/16/2020, 5:45 PMelegant-carpet-8859
11/16/2020, 7:45 PMpulumi up
pulumi wants to replace this secret because the contents have changed. The confounding thing is that the strings are exactly the same when I go look in the details of the run. I'm guessing something is happening with string encoding here maybe? I gotta figure this out because the minimum that happens when this reruns is our gateway is unavailable for a couple of seconds, and the worst that happens is all the TLS certs go bad.
I can't find a way to make Pulumi ignore changes in this specific resource being made by a helm chart, since it's not a prop I'm passing in. Any help appreciated!quiet-wolf-18467
11/16/2020, 9:55 PMhttps://youtu.be/GbLMQslgtGY▾
wonderful-manchester-62734
11/16/2020, 10:56 PMwonderful-manchester-62734
11/16/2020, 10:56 PMdef deploy_api(self, api, root_apigateway, service, bucket, package_s3_key, package_s3):
#'api': {'name': 'get_dm_node', 'handler': 'lambda_get_dm_node', 'method': 'POST', 'path':'dmnode/get'}
api_name = f'{service["name"]}-{api["name"]}'
print(f'Deploying {api_name}')
__api_resource, __last_api_resource = None, None
path_suffix = ""
for i, path_part in enumerate(api["path"].split('/')):
path_suffix = path_suffix + "-" + path_part
__api_resource = self.RESOURCES.get(path_suffix, None)
if i == 0:
parent_id = root_apigateway.root_resource_id
else:
parent_id = __last_api_resource.id
#print(i, path_suffix, __last_api_resource)
if __api_resource is None:
#Create a new resource.
__api_resource = apigateway.Resource(path_suffix,
rest_api=root_apigateway,
parent_id=parent_id,
path_part=path_part)
self.RESOURCES[path_suffix] = __api_resource
__last_api_resource = __api_resource
print(f'Resoruce {__api_resource.id} created')
__vpc_config = lambda_.FunctionVpcConfigArgs(
security_group_ids=self.LAMBDA_SECURITY_GROUP_IDS,
subnet_ids=self.LAMBDA_SUBNET_IDS)
__fn = lambda_.Function(
api_name,
s3_bucket=bucket.id,
s3_key=package_s3_key,
handler=api["handler"],
runtime="python3.7",
role=iam.lambda_role.arn,
timeout=self.LAMBDA_DEFAULT_TIMEOUT,
vpc_config=__vpc_config,
__opts__=ResourceOptions(depends_on=[package_s3])
)
print(f'Function {__fn.id} created')
__proxy_root_met = apigateway.Method(
api_name,
rest_api=root_apigateway,
resource_id=__api_resource.id,
http_method='ANY',
authorization='NONE',
__opts__=ResourceOptions(depends_on=[__api_resource])
)
print(f'Method {__proxy_root_met.id} created')
__root_int = apigateway.Integration(
api_name,
rest_api=root_apigateway,
resource_id=__proxy_root_met.resource_id,
http_method=__proxy_root_met.http_method,
integration_http_method='POST',
type='AWS_PROXY',
uri=__fn.invoke_arn,
__opts__=ResourceOptions(depends_on=[__proxy_root_met, __fn])
)
print(f'Integration {__root_int.id} created')
__dep = apigateway.Deployment(
f'{api_name}-deploy',
rest_api=root_apigateway,
stage_name="mlhere-dev",
__opts__=ResourceOptions(depends_on=[__root_int])
)
print(f'Deployment {__dep.id} created')
__perm = lambda_.Permission(
api_name,
statement_id="AllowAPIGatewayInvoke",
action="lambda:InvokeFunction",
function=__fn,
principal="<http://apigateway.amazonaws.com|apigateway.amazonaws.com>",
source_arn=__dep.execution_arn.apply(lambda x:f"{x}/*/*")
)
many-spring-73557
11/17/2020, 12:56 AMbackend: url:
setting from Pulumi.yaml
figuring I could override it on a per-stack level. But that doesn’t quite map with my mental of pulumi, which is that you pulumi login <gs://my-state-bucket>
and that’s where it stores the state. So to keep things separate, I would need to pulumi login
to the corresponding GS bucket before running any other commands - is that correct?little-cartoon-10569
11/17/2020, 3:28 AMrhythmic-napkin-82334
11/17/2020, 7:57 AMlimited-rainbow-51650
11/17/2020, 9:35 AMrhythmic-napkin-82334
11/17/2020, 10:00 AMpulumi destroy
via CI/CD (GitLab CI/CD in particular)?rhythmic-napkin-82334
11/17/2020, 10:00 AMpulumi destroy
via CI/CD (GitLab CI/CD in particular)?clever-sunset-76585
11/23/2020, 4:47 PM