full-king-49894
04/14/2022, 8:57 PMbrash-room-69051
04/15/2022, 3:02 AMNode.js
app instead, just a simple web server written in Express.js
. Once, I ran pulumi up
and wait until everything finished, I got an error as picture below. Here is my code.
aws:ecs:Service (app-svc):
error: 1 error occurred:
* creating urn:pulumi:dev::pulumi-nodejs-fargate::awsx:x:ecs:FargateService$aws:ecs/service:Service::app-svc: 1 error occurred:
* error waiting for ECS service (arn:aws:ecs:ap-southeast-1:982138089702:service/cluster-37bf9a3/app-svc-358fe7b) to become ready: ResourceNotReady: exceeded wait attempts
bitter-army-70832
04/15/2022, 3:53 PMpulumi login
?bitter-army-70832
04/15/2022, 3:53 PMpulumi login <https://app.pulumi.com/georgeportillo> ──(Fri,Apr15)─┘
Manage your Pulumi stacks by logging in.
Run `pulumi login --help` for alternative login options.
Enter your access token:
error: problem logging in: getting user info from <https://app.pulumi.com/georgeportillo>: unmarshalling response object: invalid character '<' looking for beginning of value
bitter-army-70832
04/15/2022, 3:54 PMfull-king-49894
04/15/2022, 7:29 PMconst originAccessIdentity = new aws.cloudfront.OriginAccessIdentity("oai", {
comment: "Some comment",
});
But now I need to dereference the newly created ETag/Id to use in
...
origins: [
{
domainName: bucketV2.bucketRegionalDomainName,
originId: s3OriginId,
s3OriginConfig: {
originAccessIdentity: `origin-access-identity/cloudfront/${originAccessIdentity.id}` <=== Does not work
},
},
],
...
It does not seem possible to simply use originAccessIdentity.id
as the returned value is an object wrapped in pulumi sugar. I have tried all sorts of ways to try and get properties from the returned object including:
originAccessIdentity.id
originAccessIdentity.get()
originAccessIdentity.get("id")
originAccessIdentity.id.apply(id=>id)
I am following along on https://www.pulumi.com/docs/intro/concepts/inputs-outputs/ as well as using step-through debugging via VSCode to inspect the returned object.strong-intern-84363
04/17/2022, 4:02 PMrhythmic-branch-12845
04/18/2022, 2:46 AMbrash-room-69051
04/18/2022, 12:56 PMpulumi up
again but got different error
aws:ecs:TaskDefinition (app-svc):
error: 1 error occurred:
* failed creating ECS Task Definition (app-svc-e621f050): ClientException: Log driver awslogs requires options: awslogs-region
I haven’t seen logConfiguration
in example repo or document. How to config it?brainy-church-78120
04/19/2022, 7:32 PMstrong-intern-84363
04/19/2022, 11:03 PMkind-translator-33451
04/21/2022, 3:37 PMwitty-vegetable-61961
04/21/2022, 10:34 PMbright-horse-50102
04/22/2022, 3:44 AMconst labels = { appClass: 'app' };
export const appSvc = new k8s.core.v1.Service('app-svc', {
metadata: {
labels,
name: 'app-svc',
},
spec: {
type: 'ClusterIP',
clusterIP: 'None',
selector: labels,
},
}, {
provider,
});
export const interactionsApp = new k8s.apps.v1.StatefulSet('app', {
metadata: {
labels,
},
spec: {
serviceName: 'app-svc',
replicas: 3,
selector: {
matchLabels: labels,
},
template: {
metadata: {
labels,
},
spec: {
imagePullSecrets: [
{ name: registryCredentials.metadata.name },
],
containers: [
{ /* ... */ },
],
},
},
},
}, {
provider,
dependsOn: [
registryCredentials,
databaseUser,
redisInstance,
],
});
I hardcode the service's metadata.name
to 'app-svc'
and the statefulset's spec.serviceName
to 'app-svc'
as well. While this works, it feels wrong because now the resource name is not managed by pulumi.
If I don't specify metadata.name
in the service definition, and pass appSvc.metadata.name
to the statefulset spec.serviceName
, the statefulset is never created.. it waits for the appSvc
to become ready, but the appSvc
will never become ready because the statefulset hasn't been made yet:
kubernetes:core/v1:Service (app-svc):
error: 2 errors occurred:
* resource default/app-svc-4kc42v1c was successfully created, but the Kubernetes API server reported that it failed to fully initialize or become live: 'app-svc-4kc42v1c' timed out waiting to be Ready
* Service does not target any Pods. Selected Pods may not be ready, or field '.spec.selector' may not match labels on any Pods
how do I solve this issue? Is hardcoding the service name a good idea?gray-state-1017
04/22/2022, 11:56 AMable-bird-91336
04/23/2022, 6:54 AMOutput<string>
from a n00b. :)
I have tried reading the q/a given in this Slack, the doc and other blogs but still can't really wrap my head around it. I don't get how to apply (pun) this to my situation.
The solution I have today works, but feels wrong. Could somebody give some pointers on how to do this "for real"?
The problem:
I'm creating a Kubernetes Service "LoadBalancer" and need to get hold of the created IP-adr.
I then need to use this IP-adr when creating a ConfigMap using it as data to create a file of it used by a Deployment.
(please see code below for what I'm trying to do)
The code (simplified, a lot more going on but it is the gist of it):
// TypeScript & Azure
myService.status.loadBalancer.ingress[0].ip.apply(hostname => {
const yamlConfigGroup = new kubernetes.yaml.ConfigGroup(
"deploymentconfigmap-yml",
{
yaml: `
apiVersion: v1
kind: ConfigMap
metadata:
name: deployment-config
namespace: kube-system
labels:
k8s-app: theapp
data:
thedata.yml: |-
thesettings.monitors:
- type: mydata
hosts: ["${hostname}"]
`
}
);
});
This works but "feels" wrong because it doesn't show the creation in Preview.incalculable-thailand-44404
04/25/2022, 12:43 AMicy-controller-6092
04/25/2022, 12:56 AM-y
symlink-preserving functionality?wet-carpenter-14925
04/25/2022, 10:28 PMicy-controller-6092
04/26/2022, 5:58 AMmodern-branch-92818
04/26/2022, 11:18 PMimport * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const config = new pulumi.Config();
const location = config.require("location");
const storageAccountName = config.require("storageAccountName");
const storageContainerName = config.require("storageContainerName");
const resourceGroupName = config.require("resourceGroupName");
const storage = azure.core.getResourceGroup({
name: resourceGroupName,
location: location,
});
const container = new azure.storage.Container("container", {
name: storageContainerName,
storageAccountName: storageAccountName,
containerAccessType: "private",
});
export const containerId = container.id;
export const containerResourceId = container.resourceManagerId;
This typescript code snippet was generated using tf2pulumi and I"m confuse about two things:
• How do I add provider configuration to this to tell Pulumi which subscription I want to deploy the resource to?
• How do I add backend configuraiton to this to tell Pulumi which backend I want to store my state file in (which in this case should be an Azure storage account)
I've read through the documentation and can't seem to find the answer to these questions, any assistance would be greatly appreciatedicy-controller-6092
04/27/2022, 12:04 AMnew aws.resource.Thing()
but don’t use it anywhere else, does it still get created? I’m wondering if I need to comment out the new
call, or if I can just comment out the place where it’s used (lambda layer)icy-controller-6092
04/27/2022, 4:29 AMaws.s3.Bucket
and I want to be able to call PutObject
from a aws.lambda.Function
- is there some kind of helper function where I can pass that in and get back a aws.iam.Policy
?ancient-nightfall-54764
04/27/2022, 7:48 AMcrooked-spring-277
04/27/2022, 4:03 PMwonderful-twilight-70958
04/27/2022, 8:54 PMpulumi login --local
, how do I re-log back into pulumi hosted cloud? Running pulumi login
just says "logged into local" again 😕bright-horse-50102
04/28/2022, 7:28 AMripe-pillow-18164
04/28/2022, 6:51 PMgreat-arm-54759
04/29/2022, 5:21 PMfunc CreateHandler(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Content-Type", "application/json")
var createReq CreatePolicyReq
err := json.NewDecoder(req.Body).Decode(&createReq)
if err != nil {
w.WriteHeader(400)
fmt.Fprintf(w, "failed to parse create request")
return
}
ctx := context.Background()
stackName := createReq.Name
program := services.CreateStack("gaia-test-policy", "gaia-test-role")
opts := []auto.LocalWorkspaceOption{
auto.Project(workspace.Project{
Name: tokens.PackageName(stackName),
Runtime: workspace.NewProjectRuntimeInfo("go", nil),
Backend: &workspace.ProjectBackend{
URL: "<http://0.0.0.0:4566/project-gaia>",
},
}),
}
Error Message:late-night-88915
05/02/2022, 2:21 AM