aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.42k stars 256 forks source link

VPC FlowLogs can't be generated #1408

Closed akesser closed 2 years ago

akesser commented 2 years ago

Describe the bug VPC FlowLogs exist in the aws sdk for go https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.CreateFlowLogs, but do not exist in the ec2 generator-config.yaml, therefore we cannot activate them for creation

Steps to reproduce

Expected outcome We should be able to generate the code for FlowLogs

Environment

a-hilaly commented 2 years ago

Hey @akesser, did you try to bump aws-sdk-go version in ec2-controller go.mod file? this might solve your issue

haarchri commented 2 years ago

we trying to implement this in crossplane but it looks like it is not possible - because this resource is not in ignore_list https://github.com/crossplane-contrib/provider-aws/blob/master/apis/ec2/generator-config.yaml#L2 and the resource is not implemented

a-hilaly commented 2 years ago

I just tried with our ec2-controller repository and i am not able to generate the FlowLog crd - this might be a bug in our code-generator. Investigating the root cause very soon

haarchri commented 2 years ago

Thanks

xoanmi commented 2 years ago

Related slack 🧵: https://crossplane.slack.com/archives/C01718T2476/p1659004740260759

a-hilaly commented 2 years ago

The code-generator considers CreateFlowLogs a CreateBatch operation. Adding the following block to the generator configuration file should solve the issue:

operations:
  CreateFlowLogs:
    operation_type:
    - Create
    resource_name: FlowLogs