breezy-queen-71785
07/11/2022, 8:37 AMdazzling-oxygen-84405
07/11/2022, 9:47 AMCommand
module, if my instance is deleted, Pulumi tries to execute the delete
part of the command, which is no longer possible. So I want to tell it to just give up on cleaning up any commands that were run on a deleted instance. Is something like this possible? Right now, I have to manually edit my state to clean them up.jolly-plumber-1488
07/11/2022, 11:07 AMMessage_: "Security group(s) [sg-0cb56162e90f5f571] are not in the same VPC as the subnets. Please specify a security group that is associated with the VPC: vpc-0b6bc0745054144c7."
This the python code to create cluster:
cluster = eks.Cluster(
cluster_name,
version="1.22",
skip_default_node_group=True,
vpc_id=vpc.id,
public_subnet_ids=vpc.public_subnet_ids,
node_associate_public_ip_address=False,
private_subnet_ids=vpc.private_subnet_ids,
cluster_security_group=cluster_sg,
service_role=cluster_role,
instance_roles=[node_role],
create_oidc_provider=True,
cluster_tags=common_tags
)
I know EKS will create a separate security group for cluster service, but seems it’s using my default VPC instead of the vpc.id
that I passed.flat-umbrella-41594
07/11/2022, 12:53 PMrapid-football-44318
07/11/2022, 2:28 PMpulumi preview --target 'urn:pulumi:qa::gqt::azure-native:web:WebApp::######-func-gqtproperty-qa-ne' --diff
Got following response
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.75
'dotnet build -nologo .' completed successfully
pulumi:pulumi:Stack: (same)
[urn=urn:pulumi:qa::gqt::pulumi:pulumi:Stack::gqt-qa]
--outputs:--
+ Readme: output<string>
~ azure-native:web:WebApp: (update)
[id=/subscriptions/#####/resourceGroups/#####-rg-gqt-qa-ne/providers/Microsoft.Web/sites/#####-func-gqtproperty-qa-ne]
[urn=urn:pulumi:qa::gqt::azure-native:web:WebApp::#####-func-gqtproperty-qa-ne]
[provider: urn:pulumi:qa::gqt::pulumi:providers:azure-native::default_1_64_1::2ed5c319-5430-469d-9031-83ac95dd6fc9 => urn:pulumi:qa::gqt::pulumi:providers:azure-native::default_1_66_0::f2b4d03f-0b4d-4628-8f22-da8abd55a375]
~ tags : {
~ Purpose: "Contain Bedroom Genie Resources" => "Contains Groups Quoting Tool (GQT) Resources"
}
~ virtualNetworkSubnetId: "/subscriptions/#####/resourceGroups/#####-rg-network-qa-Ne/providers/Microsoft.Network/virtualNetworks/#####-vnet-intrt-qa-Ne/subnets/#####-snet-intrt-qa-Ne-002" => "/subscriptions/#####/resourcegroups/#####-rg-network-qa-ne/providers/microsoft.network/virtualnetworks/#####-vnet-intrt-qa-ne/subnets/#####-snet-intrt-qa-ne-002"
Resources:
~ 1 to update
124 unchanged
My WebApp code looks like
var webAppArgs = new WebAppArgs
{
Name = funcAppName,
Kind = "functionapp,linux",
ResourceGroupName = args.ResourceGroupName,
ServerFarmId = args.ServerFarmId,
HttpsOnly = true,
SiteConfig = new SiteConfigArgs
{
Cors = new CorsSettingsArgs() { AllowedOrigins = "*" },
AlwaysOn = true,
AppSettings = new[]
{
new NameValuePairArgs
{
Name = "AzureWebJobsStorage",
Value = AsfPulumiHelper.GetConnectionString(args.ResourceGroupName,
args.FuncStorageAccountName),
},
new NameValuePairArgs
{
Name = "FUNCTIONS_WORKER_RUNTIME",
Value = "dotnet",
},
new NameValuePairArgs
{
Name = "FUNCTIONS_EXTENSION_VERSION",
Value = "~4"
},
new NameValuePairArgs
{
Name = "APPLICATIONINSIGHTS_CONNECTION_STRING",
Value = Output.Format($"InstrumentationKey={args.AppInsightsInstrumentKey}"),
},
new NameValuePairArgs
{
Name = "APPINSIGHTS_INSTRUMENTATIONKEY",
Value = args.AppInsightsInstrumentKey
},
}
},
Identity = new Pulumi.AzureNative.Web.Inputs.ManagedServiceIdentityArgs
{
Type = ManagedServiceIdentityType.SystemAssigned,
},
Tags = args.Tags
};
if (!string.IsNullOrEmpty(args.VnetSubNetId))
{
webAppArgs.VirtualNetworkSubnetId = args.VnetSubNetId;
}
steep-island-39848
07/11/2022, 3:46 PMpulumi stack rm
?
stack.Destroy()
only removes resources, but keeps the stack itself.crooked-laptop-67565
07/11/2022, 10:28 PMpulumi up
. Re-running without changes usually works
error: could not read plugin [/Users/craigglennie/.pulumi/plugins/resource-aws-v5.9.2/pulumi-resource-aws] stdout: EOF
high-cricket-61841
07/11/2022, 10:37 PMfuture-refrigerator-88869
07/11/2022, 10:42 PMcrooked-laptop-67565
07/12/2022, 3:21 AMpulumi new
with an AWS template it asks for the AWS region. How do I change the region later? I don't see it anywhere in the project filesnice-plastic-94318
07/12/2022, 8:34 AMsteep-island-39848
07/12/2022, 9:14 AMambitious-agent-35343
07/12/2022, 1:38 PMaverage-tiger-58107
07/12/2022, 2:09 PMlocalPath
and path
static, but ensure that the resource is updated each time the file contents change. Reading this document, it suggests this would be the default behavior. Am I misunderstanding something?ambitious-lifeguard-6753
07/12/2022, 2:35 PMpulumi up
. I know sometimes it has to do with some default values in a field that need to be provided but in this case, I'm not too sure which field I'm missing.
Here is the example codecold-toothbrush-60276
07/12/2022, 3:00 PMfancy-spoon-7206
07/12/2022, 3:16 PM➜ vpc-builder (main) ✔ pulumi stack rm p-it-ny6j4r57fl-aep-base-i-1768dd0e
error: failed to decrypt: incorrect passphrase, please set PULUMI_CONFIG_PASSPHRASE to the correct passphrase or set PULUMI_CONFIG_PASSPHRASE_FILE to a file containing the passphrase
magnificent-sugar-26362
07/12/2022, 5:32 PMmany-spring-73557
07/12/2022, 6:15 PMaws.getCallerIdentity({})
to get the accountId and compare it, but that’s not possible:
const accountId = await aws.getCallerIdentity({}).then(current => current.accountId);
if((pulumi.getStack() == "prod" && accountId != "512302493601") || (pulumi.getStack() != "prod" && accountId != "497659568814")) {
process.exit(1);
}
(await
can only be used against an async function).
I also tried await aws.getCallerIdentity({})
and got the same result.
Any suggestions? I want to add a little safeguard so we don’t inadvertently run stack commands against the wrong account.microscopic-postman-4756
07/12/2022, 6:27 PMindex.ts
of Pulumi is actually a function and I can trigger it from all the usual lambda sources?acoustic-tiger-77630
07/12/2022, 6:57 PMwooden-hydrogen-21594
07/12/2022, 8:43 PMswift-intern-18856
07/12/2022, 9:03 PM[spec.source: Invalid value: "string": spec.source in body must be of type object: "string", <nil>: Invalid value: "": "spec.source" must validate one and only one schema (oneOf). Found 2 valid alternatives]
indicating that a nil or empty value is actually being passed to k8s and failing validation server side. Since the diff is correct and shows the populated value, I have no idea how to debug. Any ideas?
EDIT: Figured this out, the type was generated as any
and I was improperly supplying the wrong value due to type inference missing.crooked-laptop-67565
07/12/2022, 10:01 PMpulumi refresh
and it's giving an error about not finding an expected Twingate resource (because it's been deleted via the Twingate UI). IMO this should update the current state by removing the resource, rather than failing with an error. Does that seem right?crooked-laptop-67565
07/12/2022, 10:02 PMpulumi export
and removing the deleted resource from the JSONcrooked-laptop-67565
07/12/2022, 10:04 PMrefresh
is failing because of this error, it's just not failing to update the one missing resourcewonderful-midnight-15751
07/12/2022, 10:40 PMimport * as gcp from "@pulumi/google-native";
const customProvider = new gcp.Provider("default",{
project: "12312312"
})
const agent = new gcp.dialogflow.v3.Agent("Test", {
defaultLanguageCode: "DE",
displayName: "Pulumi-Demo",
timeZone: "Europe/Berlin",
location: "global",
}, {
provider: customProvider
})
const page = new gcp.dialogflow.v3.Page("basicPage", {
agentId: agent.id,
displayName: "BasicPage",
flowId: agent.startFlow,
location: "global",
}, {
provider: customProvider
})
Poorly I am getting the following error message:
error: error sending request: googleapi: Error 400: com.google.apps.framework.request.BadRequestException: Page name should not be specified as it will be automatically generated by Dialogflow upon creation.: "<https://dialogflow.googleapis.com/v3/projects/.../locations/global/agents/v3%2Fprojects%2Flocations%2Fglobal%2Fagents%2Fc6e7342e-3385-4846-af64-cbf6918c2b39/flows/projects%2FFlocations%2Fglobal%2Fagents%2Fc6e7342e-3385-4846-af64-cbf6918c2b39%2Fflows%2F00000000-0000-0000-0000-000000000000/pages>" map[__autonamed:true agentId:v3/projects/.../locations/global/agents/c6e7342e-3385-4846-af64-cbf6918c2b39 displayName:Hallo flowId:projects/.../locations/global/agents/c6e7342e-3385-4846-af64-cbf6918c2b39/flows/00000000-0000-0000-0000-000000000000 location:global name:projects/.../locations/global/agents/v3/projects/.../locations/global/agents/c6e7342e-3385-4846-af64-cbf6918c2b39/flows/projects/.../locations/global/agents/c6e7342e-3385-4846-af64-cbf6918c2b39/flows/00000000-0000-0000-0000-000000000000/pages/5757dc8e-e2ce-4d51-a257-675cd7c00e01-5bc9156 project:...]
It seams Pulumi wants to set the name / id of the page. But google does not allow it. Someone who tried this earlier?
Thanks for helping!able-engineer-79880
07/13/2022, 3:16 AMexport class subNet {
constructor(name: string) {
const data = new azure.network.Subnet("data", {
addressPrefixes: [config.require('datasubnetrange')],
enforcePrivateLinkEndpointNetworkPolicies: true,
name: "data",
resourceGroupName: "dpc-spi-networking-"+config.require('envid')+"-rg-aue-"+config.require('index'),
serviceEndpoints: [
//"Microsoft.KeyVault",
//"Microsoft.AzureActiveDirectory",
//"Microsoft.Storage",
//"Microsoft.Sql",
config.require('serviceEndpoints')
],
virtualNetworkName: "dpc-vnet-spi-"+config.require('envid')+"-aue-"+config.require('index'),
}, {
protect: true,
});
}
}
My stack yaml will look something like
env:serviceEndpoints:
- Microsoft.KeyVault
- Microsoft.AzureActiveDirectory
- Microsoft.Storage
- Microsoft.Sql
I've tried everything I can think of. Any help would be greatly appreciated.helpful-account-44059
07/13/2022, 7:27 AMpulumi refresh
, i got these errors, i'm sure i have the correct aws profile config
aws:ec2:SecurityGroup (relation-nodeSecurityGroup):
error: Preview failed: 1 error occurred:
* error configuring Terraform AWS Provider: AWS account ID not previously found and failed retrieving via all available methods. See <https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id> for workaround and implications. Errors: 3 errors occurred:
* failed getting account information via iam:GetUser: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
status code: 403, request id: 34fa5f6b-9d3a-420a-a840-3c5a1c0a1cc2
* error calling sts:GetCallerIdentity: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
status code: 403, request id: 64751105-14bb-40e7-b12d-2b94e75a9280
* failed getting account information via iam:ListRoles: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
status code: 403, request id: 70da462e-b97e-42f2-a389-62147dd6c695
jolly-church-88521
07/13/2022, 10:25 AMstate.json
file from S3 bucket and now I’m trying to do something like this:
➜ sandbox git:(main) ✗ pulumi stack import --file state.json
error: this command requires a stack, but there are none
➜ sandbox git:(main) ✗ pulumi stack import --stack eba --file state.json
error: no stack named 'eba' found
Am I missing something? I don’t see any other options for import
argument. And I see eba
name in the state.json file:
➜ sandbox git:(main) ✗
{
"version": 3,
"checkpoint": {
"stack": "eba", (...)
jolly-church-88521
07/13/2022, 10:25 AMstate.json
file from S3 bucket and now I’m trying to do something like this:
➜ sandbox git:(main) ✗ pulumi stack import --file state.json
error: this command requires a stack, but there are none
➜ sandbox git:(main) ✗ pulumi stack import --stack eba --file state.json
error: no stack named 'eba' found
Am I missing something? I don’t see any other options for import
argument. And I see eba
name in the state.json file:
➜ sandbox git:(main) ✗
{
"version": 3,
"checkpoint": {
"stack": "eba", (...)
echoing-dinner-19531
07/13/2022, 10:31 AMstack init
to create a new stack first.jolly-church-88521
07/13/2022, 10:37 AM➜ sandbox git:(main) ✗ pulumi stack import --stack eba --file eba.json
error: could not deserialize deployment: unexpected end of JSON input
echoing-dinner-19531
07/13/2022, 10:42 AMjolly-church-88521
07/13/2022, 10:42 AMpulumi login file:///...
cp state.json state/.pulumi/stacks/eba.json
echoing-dinner-19531
07/13/2022, 10:44 AMjolly-church-88521
07/13/2022, 10:45 AM