This message was deleted.
# aws
s
This message was deleted.
f
I know I can use boto3 to add tags but that sems to defeat the purpose of pulumi.
Copy code
s3_client = boto3.client('s3')

s3_client.put_bucket_tagging(
    Bucket=ds_well_comm_base_name
    , Tagging={
        'TagSet': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
)
b
I think you just need to set the
Key
and
Value
the same as boto
Copy code
aws_tags = [
    { 'Key': function, 'Value': cfg.get('function') }],
f
Unfortunately that is one of the formulations I have tried.
Copy code
ds_s3_resource_bucket = aws_native.s3.Bucket(resource_name= ds_well_comm_base_name
                                            , bucket_name= ds_well_comm_base_name
                                            , access_control = 'Private'
                                            , tags= [
                                                    {
                                                        'Key': 'string',
                                                        'Value': 'string'
                                                    },
                                                ]
                                            )
Gives this error
Copy code
aws-native:s3:Bucket (ds-well-comm-base-dev):
    error: aws-native:s3:Bucket resource 'ds-well-comm-base-dev': property tags[0].Key value {<nil>} has a problem: unknown property tags[0].Key
    error: aws-native:s3:Bucket resource 'ds-well-comm-base-dev': property tags[0].Value value {<nil>} has a problem: unknown property tags[0].Value
b
hmm, could you open an issue?
1
f
@billowy-army-68599 out of curiosity I tried to get a result as seen in the error. Using namedtuples I was able to get something akin to the error displayed but the namedtuple object still creates an error during build. The local py check is the image where
my_tags[0].Value
has a value The error received from pulumi was an unhandled execption
ValueError: unexpected input of type Tag