Skip to content

Commit

Permalink
fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romg67 committed Oct 31, 2024
1 parent f1d3c0b commit 461c561
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 33 deletions.
22 changes: 12 additions & 10 deletions examples/vpc/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ name = "sftp"

availability_zones = ["us-east-2a", "us-east-2b"]

cidr_block = "10.0.0.0/16"
ipv4_primary_cidr_block = "10.0.0.0/16"

sftp_users = {
"brad" = {
user_name = "brad",
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCziM50ppY+lb95xwkfPmz9i9fjcZ+jxut1hwhGJrnLUED26/tmlgSS4OaTi9jDHLeHaRcSRvKJObwsfR3tYH45YDGF4kwjv+OyMnsepPXrBX9cI0Bq0aH39BBBdRICbEEyoJdNhLH8MRGddtJ6G2uXZV9AvVqr01NokayLVO1WvCUi8bSvAHe8+KDE/odVsoOTRnKVK6Ov2LtJuff5OF9LmsY+vAtPkGZF9hfoB6k8irUqG8f8hx7ZooKUFZv9k9F4gvEXen9e/DdJ2VZHaL1LGUtNGNsrwgvgaQlbgqyuiIL91JYDrCR6ZwuI42CPQfqWwUfeO0W9roE0E7v/04+76TSVmHA1arqAETDmpAqvQNGP4uxml3u7ZqUD82At9u0yAgTX+xS4qnrg383e3ZXoTTa6q3ms/z75NHlttSRaN4Yf260RmTHDlyg4i+8qJasnhOcMLgMwuS7iywUZrIkmmpr6FQk3XwvUGbKpwdxepF4OFz5aMAouF17ZOajv1vxSDhTRQZzHbT18HFDNHDbHm61XwEeuurFxxO6TiQw8rSRrcUBmN8Mk9mVvC2FMRLJt3SonTyDpzcvQlcES6eSvXM6C/qy4xYB4wA3vZLgSswy8dGK2PlwszsqeT4WtA/6kC6i+0w30i2xxBCjKwSTNQzPUz/aVE+QDsN32f1i/Q== [email protected]"
sftp_users = [
{
user_name = "brad",
public_keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCziM50ppY+lb95xwkfPmz9i9fjcZ+jxut1hwhGJrnLUED26/tmlgSS4OaTi9jDHLeHaRcSRvKJObwsfR3tYH45YDGF4kwjv+OyMnsepPXrBX9cI0Bq0aH39BBBdRICbEEyoJdNhLH8MRGddtJ6G2uXZV9AvVqr01NokayLVO1WvCUi8bSvAHe8+KDE/odVsoOTRnKVK6Ov2LtJuff5OF9LmsY+vAtPkGZF9hfoB6k8irUqG8f8hx7ZooKUFZv9k9F4gvEXen9e/DdJ2VZHaL1LGUtNGNsrwgvgaQlbgqyuiIL91JYDrCR6ZwuI42CPQfqWwUfeO0W9roE0E7v/04+76TSVmHA1arqAETDmpAqvQNGP4uxml3u7ZqUD82At9u0yAgTX+xS4qnrg383e3ZXoTTa6q3ms/z75NHlttSRaN4Yf260RmTHDlyg4i+8qJasnhOcMLgMwuS7iywUZrIkmmpr6FQk3XwvUGbKpwdxepF4OFz5aMAouF17ZOajv1vxSDhTRQZzHbT18HFDNHDbHm61XwEeuurFxxO6TiQw8rSRrcUBmN8Mk9mVvC2FMRLJt3SonTyDpzcvQlcES6eSvXM6C/qy4xYB4wA3vZLgSswy8dGK2PlwszsqeT4WtA/6kC6i+0w30i2xxBCjKwSTNQzPUz/aVE+QDsN32f1i/Q== [email protected]"],
s3_bucket_name = "eg-ue2-test-sftp-cmobdn-home"
},
"kenny" = {
user_name = "kenny",
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCYN8IRq10gKJj5/y2IHYFFRXHctJ+VblcsOnwvsbUIB+PKMLLWd5ySpW30s8OFVcxpMu2VXzXVKRGGbOUbZEN7MqH9xkW8eV6tSfXsZK2osLdIQ3QG3eSyoN4gPFlDBkZSzmkb2oaaclGPGRezbzDnp+oz8IiC5ZE8aprq3Xk850fifIEEOhJtVsrL84uwgx4LGZMMQmLdf6xm2SMSMx53zDPtSnlSeMlC2qUz6LBC41gwObQDoh0j3svsENf8FS8iIkdX50Na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fTwXBwLlHTEuCvuh/Y/TpjJqqxCnbY/6R4TcabHVGsA4b1kVajRbvVPZPGVcWs+XvycO4Y8KR/hZZGGxK16SVFGbrnhX1D2Q== [email protected]", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCziM50ppY+lb95xwkfPmz9i9fjcZ+jxut1hwhGJrnLUED26/tmlgSS4OaTi9jDHLeHaRcSRvKJObwsfR3tYH45YDGF4kwjv+OyMnsepPXrBX9cI0Bq0aH39BBBdRICbEEyoJdNhLH8MRGddtJ6G2uXZV9AvVqr01NokayLVO1WvCUi8bSvAHe8+KDE/odVsoOTRnKVK6Ov2LtJuff5OF9LmsY+vAtPkGZF9hfoB6k8irUqG8f8hx7ZooKUFZv9k9F4gvEXen9e/DdJ2VZHaL1LGUtNGNsrwgvgaQlbgqyuiIL91JYDrCR6ZwuI42CPQfqWwUfeO0W9roE0E7v/04+76TSVmHA1arqAETDmpAqvQNGP4uxml3u7ZqUD82At9u0yAgTX+xS4qnrg383e3ZXoTTa6q3ms/z75NHlttSRaN4Yf260RmTHDlyg4i+8qJasnhOcMLgMwuS7iywUZrIkmmpr6FQk3XwvUGbKpwdxepF4OFz5aMAouF17ZOajv1vxSDhTRQZzHbT18HFDNHDbHm61XwEeuurFxxO6TiQw8rSRrcUBmN8Mk9mVvC2FMRLJt3SonTyDpzcvQlcES6eSvXM6C/qy4xYB4wA3vZLgSswy8dGK2PlwszsqeT4WtA/6kC6i+0w30i2xxBCjKwSTNQzPUz/aVE+QDsN32f1i/Q== [email protected]"],
s3_bucket_name = "eg-ue2-test-sftp-cmobdn-home"
}
}
]

4 changes: 2 additions & 2 deletions examples/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ provider "awsutils" {

module "vpc" {
source = "cloudposse/vpc/aws"
version = "1.1.0"
version = "2.1.1"

cidr_block = var.cidr_block
ipv4_primary_cidr_block = var.ipv4_primary_cidr_block

context = module.this.context
}
Expand Down
17 changes: 10 additions & 7 deletions examples/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ variable "availability_zones" {
description = "List of availability zones"
}

variable "cidr_block" {
variable "ipv4_primary_cidr_block" {
type = string
description = "CIDR for the VPC"
}

variable "sftp_users" {
type = map(object({
user_name = string,
public_key = string
}))
description = "The value which will be passed to the example module"
}
type = list(
object({
user_name = string
public_keys = list(string)
s3_bucket_name = optional(string)
})
)
description = "List of SFTP usernames and public keys. The keys `user_name` and `public_keys` are required. The key `s3_bucket_name` is optional."
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ resource "aws_transfer_server" "default" {
subnet_ids = var.subnet_ids
security_group_ids = var.vpc_security_group_ids
vpc_id = var.vpc_id
address_allocation_ids = var.eip_enabled ? aws_eip.sftp.*.id : var.address_allocation_ids
address_allocation_ids = var.eip_enabled ? aws_eip.sftp[*].id : var.address_allocation_ids
}
}

Expand Down
4 changes: 2 additions & 2 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ output "id" {

output "transfer_endpoint" {
description = "The endpoint of the Transfer Server"
value = module.this.enabled ? join("", aws_transfer_server.default.*.endpoint) : null
value = module.this.enabled ? join("", aws_transfer_server.default[*].endpoint) : null
}

output "elastic_ips" {
description = "Provisioned Elastic IPs"
value = module.this.enabled && var.eip_enabled ? aws_eip.sftp.*.id : null
value = module.this.enabled && var.eip_enabled ? aws_eip.sftp[*].id : null
}

output "s3_access_role_arns" {
Expand Down
16 changes: 5 additions & 11 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ variable "domain" {

variable "sftp_users" {
type = list(
object({
user_name = string
public_keys = list(string)
s3_bucket_name = optional(string)
})
object({
user_name = string
public_keys = list(string)
s3_bucket_name = optional(string)
})
)
default = []
description = "List of SFTP usernames and public keys. The keys `user_name` and `public_keys` are required. The key `s3_bucket_name` is optional."
Expand Down Expand Up @@ -58,12 +58,6 @@ variable "subnet_ids" {
default = []
}

variable "vpc_endpoint_id" {
type = string
description = "The ID of the VPC endpoint. This property can only be used when endpoint_type is set to VPC_ENDPOINT"
default = null
}

variable "security_policy_name" {
type = string
description = "Specifies the name of the security policy that is attached to the server. Possible values are TransferSecurityPolicy-2018-11, TransferSecurityPolicy-2020-06, and TransferSecurityPolicy-FIPS-2020-06. Default value is: TransferSecurityPolicy-2018-11."
Expand Down

0 comments on commit 461c561

Please sign in to comment.