Incorrect type for FieldIndexPolicies in CloudWatch Logs
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start at the troposphere.logs.LogGroup definition and inspect the declared type for FieldIndexPolicies. Compare it with the AWS CloudFormation example in the issue, then verify that passing a list containing a Fields entry no longer raises the reported type error.
Written by the indexing model from the issue text.
Description
LogGroup defines FieldIndexPolicies as an optional Tags, this is incorrect. The CloudFormation documentation contains the correct type:
"TestFieldIndexingLogGroup": {
"Type": "AWS::Logs::LogGroup",
"Properties": {
"LogGroupName": "my-log-group",
"FieldIndexPolicies": [{
"Fields": [
"RequestId",
"TransactionId"
]
}]
}
}
However, attempting to create a LogGroup in troposphere of the expected type results in an error:
log_group = t.add_resource(
LogGroup(
"OrganisationCloudTrailLogGroup",
RetentionInDays=365,
FieldIndexPolicies=[{
"Fields": [
"readOnly"
]
}]
)
)
TypeError: <class 'troposphere.logs.LogGroup'>: OrganisationCloudTrailLogGroup.FieldIndexPolicies is <class 'list'>, expected <class 'troposphere.Tags'>
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 1.4k
- Avg merge
- 10d 1h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudtools/troposphere
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
cloudtools/troposphere#2372 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
cloudtools/troposphere#2294 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
cloudtools/troposphere#2205 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
cloudtools/troposphere#2186 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
cloudtools/troposphere#2152 · 1 comment ·
All issues in cloudtools/troposphere
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistenciesPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
admission-deferred priority: medium status: ready work-class: scoped
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melodic-software/claude-code-plugins#10887 · 4 comments ·
Maintainers usually reply within 1 day
-
backend bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
PoCInnovation/Distribox#255 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/langextract#598 ·
Maintainers usually reply within 1 day