diff --git a/.github/workflows/tests_terraform_examples.yml b/.github/workflows/tests_terraform_examples.yml index be5fb23bb..56e8f4daf 100644 --- a/.github/workflows/tests_terraform_examples.yml +++ b/.github/workflows/tests_terraform_examples.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - service: ["acm", "cloudfront", "route53"] + service: ["acm", "cloudfront", "elb", "route53"] steps: - uses: actions/checkout@v4 diff --git a/moto/elbv2/models.py b/moto/elbv2/models.py index 2a68f0bb8..49b1dcc13 100644 --- a/moto/elbv2/models.py +++ b/moto/elbv2/models.py @@ -581,6 +581,7 @@ class FakeLoadBalancer(CloudFormationModel): "connection_logs.s3.enabled", "connection_logs.s3.prefix", "deletion_protection.enabled", + "dns_record.client_routing_policy", "idle_timeout.timeout_seconds", "ipv6.deny_all_igw_traffic", "load_balancing.cross_zone.enabled", diff --git a/other_langs/terraform/elb/load_balancer.tf b/other_langs/terraform/elb/load_balancer.tf new file mode 100644 index 000000000..81199efa2 --- /dev/null +++ b/other_langs/terraform/elb/load_balancer.tf @@ -0,0 +1,18 @@ +data "aws_vpc" "default" { + default = true +} + +data "aws_subnets" "all" { + filter { + name = "vpc-id" + values = [data.aws_vpc.default.id] + } +} + +resource "aws_lb" "this" { + name = "nlb-test" + internal = true + load_balancer_type = "network" + subnets = data.aws_subnets.all.ids + enable_deletion_protection = false +} \ No newline at end of file diff --git a/other_langs/terraform/elb/provider.tf b/other_langs/terraform/elb/provider.tf new file mode 100644 index 000000000..1a21998a1 --- /dev/null +++ b/other_langs/terraform/elb/provider.tf @@ -0,0 +1,24 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + # version = "5.22.0" # 5.22.0 is the last version that works + } + } +} + +provider "aws" { + region = "us-east-1" + s3_use_path_style = true + skip_credentials_validation = true + skip_metadata_api_check = true + skip_requesting_account_id = true + + endpoints { + ec2 = "http://localhost:5000" + elbv2 = "http://localhost:5000" + } + + access_key = "my-access-key" + secret_key = "my-secret-key" +} \ No newline at end of file