Problème Impossible de créer des règles de groupe de sécurité dans aws à l'aide de CDKTF
Code
import cdktf_cdktf_provider_aws.security_group as SecurityGroup_
self.security_group_ = SecurityGroup_.SecurityGroup(self.scope_object, id_=self.id, name=self.name, vpc_id=self.vpc_id, ingress=[{"from_port":"3306","to_port":"3306"}])
Erreur
29: "ingress": [
30: {
31: "cidr_blocks": null,
32: "description": "smartstack_dependency",
33: "from_port": null,
34: "ipv6_cidr_blocks": null,
35: "prefix_list_ids": null,
36: "protocol": "tcp",
37: "security_groups": null,
38: "self": null,
39: "to_port": null
40: }
41: ],
The argument "ingress.0.to_port" is required, but no definition was found.
J'ai essayé le code suivant
import cdktf_cdktf_provider_aws.security_group as SecurityGroup_
self.security_group_ = SecurityGroup_.SecurityGroup(self.scope_object, id_=self.id, name=self.name, vpc_id=self.vpc_id, ingress=[{"from_port":"3306","to_port":"3306"}])