Comments (4)
Thanks for reporting this @armaneous , I'm sorry this does not work as expected. Our team will be taking a look subject to time availability.
from pulumi-aws.
I can confirm that we are seeing this as well with a function that ignores a specific tag. In our use case this is a tag that is updated at deploy time by our CI system to a version for our observability tools to read.
import * as pulumi from '@pulumi/pulumi';
import * as aws from '@pulumi/aws';
const tags = {tag1: 'value1', tag2:'value2'};
function stubNodeArchive(handler: string): pulumi.asset.AssetArchive {
const parts = handler.split('.');
if (parts.length !== 2) {
throw new Error(`handler must be like "module.function"`);
}
const fileName = parts[0] + '.js';
const functionName = parts[1];
const contents: pulumi.asset.AssetMap = {};
contents[fileName] = new pulumi.asset.StringAsset(`
exports.${functionName} = async function(event, context) {
console.log("EVENT: \n" + JSON.stringify(event, null, 2))
return context.logStreamName
};
`);
return new pulumi.asset.AssetArchive(contents);
}
const lambdaRole = new aws.iam.Role(
`lambda-role`,
{
assumeRolePolicy: pulumi.jsonStringify({
Version: '2012-10-17',
Statement: [
{
Action: 'sts:AssumeRole',
Effect: 'Allow',
Principal: {
Service: 'lambda.amazonaws.com',
},
},
],
}),
tags: {...tags},
}
);
const _lambdaPolicyRoleAttachement = new aws.iam.RolePolicyAttachment(
`basic-lpra`,
{
policyArn: 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole', // The default lambda policy for cloudwatch,etc.
role: lambdaRole.name,
}
);
const lambda = new aws.lambda.Function(
`repro-lambda`,
{
name: `repro-lambda`,
code: stubNodeArchive(handler), // This is ignored after first provision because CI updates this using the aws cli, but basically just uploads a zip with a hello world for initial provisioning. You ca
handler: 'index.handler',
role: lambdaRole.arn,
runtime: 'nodejs18.x',
memorySize: 256,
layers: [],
timeout: 10,
tags: {...tags}, // This is just any object of tags, just change one outside of pulumi and refresh.
},
{ ignoreChanges: ['code', 'tags.version', 'tags_all.version', 'tagsAll.version']}
);
This accurately ignores all the tags and code updates however it also says the lambda has a 0 change update every time its run because state still sees the version tag.
from pulumi-aws.
@t0yv0 Is this another issue of diff calculation in the bridge? Should we link it to the epic then?
from pulumi-aws.
CC @mjeffryes I'm not sure which epic - I've been labelling these as bug/diff for the moment. On the surface it looks very much like one of those issues.
@armaneous if you have a chance to add a source program that reproduces this this could help us out a lot to make it easier to resolve. Thank you!
from pulumi-aws.
Related Issues (20)
- Workflow failure: master HOT 2
- Improper partition used when generating SNS Topic ARN HOT 1
- lambda.Function `role` param is typed as optional but is required (Python) HOT 2
- Upgrade bridge to v3.82.0 HOT 3
- Workflow failure: master HOT 3
- TestRegress3196 Flake
- Inconsistent generated code HOT 1
- Workflow failure: cron HOT 1
- Upgrade terraform-provider-aws to v5.50.0 HOT 1
- Python type annotations don't match non-deprecated types HOT 1
- Pulumi destroy not working due to ENI attachment of deleted lambda HOT 2
- `error: internal error: Error: Missing newline after argument` on import of RouteTableAssociation with parent HOT 2
- PATCH 0054-Revert-r-aws_db_proxy-Change-auth-from-TypeList-to-T.patch
- PATCH 0046-Revert-rds-engine_version-Fix-bugs-with-default-only.patch HOT 1
- AWS_SKIP_CREDENTIALS_VALIDATION doesn't work HOT 2
- Epic: Lambda Builders HOT 1
- Upgrade terraform-provider-aws to v5.51.0
- Importing aws:ec2/routeTable:RouteTable produces resource with ipv6Cidr resource with empty string resulting in invalid CIDR address error HOT 3
- Upgrade terraform-provider-aws to v5.51.1
- Workflow failure: cron
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulumi-aws.