broad-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
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)?miniature-leather-70472
11/17/2020, 11:21 AMagreeable-ram-97887
11/17/2020, 11:43 AMpulumi preview
without actually comparing against the current stack? I am trying to test if the pulumi code compiles without error in a CICD script, and at this point don't actually care about the changes it may or may not causeagreeable-ram-97887
11/17/2020, 12:19 PMhigh-morning-17948
11/17/2020, 2:38 PMrhythmic-napkin-82334
11/17/2020, 4:07 PMpulumi up
to the merge request overview on GitLab.
The ressource changes from the pulumi preview
show up properly (see image) but no output from pulumi up
is added afterwards..
It would be good to get the output, since there are cases in which pulumi up
throws some errors that are important to be notified of...
Does anyone know a trick?hundreds-musician-51496
11/17/2020, 4:53 PMfierce-engine-31599
11/17/2020, 4:57 PMfuture-nail-59564
11/17/2020, 5:27 PMagreeable-ram-97887
11/17/2020, 6:22 PMwooden-account-17701
11/17/2020, 6:34 PMhundreds-musician-51496
11/18/2020, 1:16 AMpulumi state delete
to remove a resource that is "pending delete". However, the URN refers to two resources. When I run pulumi state delete
I get the following prompt:
Multiple resources with the given URN exist, please select the one to edit: [Use arrows to move, enter to select, type to filter]
> "handle-request-ap-1782-resources-resources-ci-901d9e4"
"handle-request-ap-1782-resources-resources-ci-b67bf05" (Pending Deletion)
Is there any way to select the second one non-interactively? I want to do this on my CI server.wet-soccer-72485
11/18/2020, 5:31 PMorgName
so that I can use the shorthand for referring to a stack? So instead of having to write pulumi stack select myorg/mystack
I can just define myorg
as the default, and just do pulumi stack select mystack
?faint-australia-78690
11/18/2020, 6:15 PMwonderful-manchester-62734
11/19/2020, 6:51 AMrhythmic-napkin-82334
11/19/2020, 7:24 AMpulumi destroy
via GitLab CI?
Is it even possible?
Cheers
Robinbrash-psychiatrist-86349
11/19/2020, 8:53 AMtest-api-c0163d9
test-lambda-6e02bf9
How this hash is generated and how can I choose a string to replace it?dazzling-sundown-39670
11/19/2020, 2:30 PMsteep-angle-29984
11/19/2020, 3:05 PMDuplicate resource URN
error, but URN is unique. The URN is very long(->307), can that be the cause of the error?dazzling-sundown-39670
11/19/2020, 4:00 PMError: Missing required configuration variable 'project:domain'
running in NodeJS