Git Product home page Git Product logo

terraform-modules's Issues

Guardduty auto_enable is deprecated

Describe the bug

For guardduty usage with organizations, auto_enable is deprecated in favor of auto_enable_organization_members

Warning: Argument is deprecated
with module.guardduty.aws_guardduty_organization_configuration.this
on .terraform/modules/guardduty/modules/aws/guardduty/organization/main.tf line 34, in resource "aws_guardduty_organization_configuration" "this":
  auto_enable = var.auto_enable
Use auto_enable_organization_members instead

To Reproduce

Steps to reproduce the behavior:
Version = v2.11.0

module "guardduty" {
  source = "github.com/zachreborn/terraform-modules//modules/aws/guardduty/organization?ref=v2.11.0"
  providers = {
    aws.organization_management_account = aws.organization_management_account
    aws.organization_security_account   = aws.organization_security_account
  }
  admin_account_id = module.octo_security.id
}

Expected behavior

No errors during planning

Problems

Deprecate auto_enable and transition to auto_enable_organization_members

Solution

Confirmation

Github Actions upgrades for Node.js 20

Describe the feature

Update all github actions to the latest release train for Node.js 20

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: hashicorp/setup-terraform@v2, actions/checkout@v3.

Transfer family race condition

Describe the bug

The SSH key and the aws_transfer_user enter a race condition. Need to set dependency on theaws_transfer_user

Error: importing ssh public key: ResourceNotFoundException: Unknown user { RespMetadata: { StatusCode: 400, RequestID: "1094818e-bfec-4a40-830a-ac1dbb8221f6" }, Message_: "Unknown user", Resource: "username", ResourceType: "User" }
with module.vendor_sftp.aws_transfer_ssh_key.this["username"]
on .terraform/modules/vendor_sftp/modules/aws/transfer_family/main.tf line 175, in resource "aws_transfer_ssh_key" "this":
resource "aws_transfer_ssh_key" "this" {

IAM Role - for_each policy issue

Describe the bug

When using IAM Role module and passing in roles which are being created, the plan fails due to for_each unknown condition.

var.policy_arns is set of string with 1 element
The "for_each" set includes values derived from resource attributes that cannot be determined until apply, and so Terraform cannot determine the full set of keys that will identify the instances of this resource.

When working with unknown values in for_each, it's better to use a map value where the keys are defined statically in your configuration and where only the values contain apply-time results.

Alternatively, you could use the -target planning option to first apply only the resources that the for_each value depends on, and then apply a second time to fully converge.

Route53 - Record length split

Describe the feature

Currently, you must manually split the record length for records >255 characters long. This comes into play with SPF records and DKIM records in particular. Allowing a way to input any length of record and split it appropriately within the module configuration would simplify longer records.

IAM Policy Attachment - Lookups for built-in policies

Describe the feature

Add the ability to lookup a built-in policy based on the name of the policy and automatically fetch the ARN to add to the IAM user or group.

Examples

module "example_user_policy" {
  source = "github.com/zachreborn/terraform-modules//modules/aws/iam/user_policy_attachment"

  policy_name = "AWSApplicationDiscoveryAgentAccess"
  user       = module.migration_evaluator_collector.user_name
}

tfe_workspace execution_mode deprecated

Describe the bug

execution_mode is deprecated for terraform workspaces in tfe_workspace

Warning: Argument is deprecated
with module.octo_prod_infrastructure.tfe_workspace.this
on .terraform/modules/octo_prod_infrastructure/modules/terraform/workspace/main.tf line 21, in resource "tfe_workspace" "this":
  execution_mode                = var.execution_mode
Use resource tfe_workspace_settings to modify the workspace execution settings. This attribute will be removed in a future release of the provider.

To Reproduce

v2.14.2

module "octo_prod_infrastructure" {
  source                = "github.com/zachreborn/terraform-modules//modules/terraform/workspace?ref=v2.14.2"
  assessments_enabled   = false
  enable_dynamic_auth   = true
  dynamic_auth_role_arn = "arn:aws:iam::1111111111:role/terraform_cloud"
  identifier            = "zachreborn/octo_prod_infrastructure"
  name                  = "octo_prod_infrastructure"
  oauth_token_id        = var.octo_github_oauth_token_id
  organization          = var.octo_organization
  permission_map        = var.octo_admin_only_workspace_permissions_mapping
  terraform_version     = var.terraform_version
}

Fix code scanning alert - S3 Access block should restrict public bucket to limit access

AWS Guardduty Organization - auto_enable depreciated

Describe the bug

Warning: Argument is deprecated
with module.guardduty.aws_guardduty_organization_configuration.this
on .terraform/modules/guardduty/modules/aws/guardduty/organization/main.tf line 34, in resource "aws_guardduty_organization_configuration" "this":
auto_enable = var.auto_enable
Use auto_enable_organization_members instead

To Reproduce

v2.11.0 of terraform-modules

Expected behavior

No depreciated error

Problems

Warning: Argument is deprecated
with module.guardduty.aws_guardduty_organization_configuration.this
on .terraform/modules/guardduty/modules/aws/guardduty/organization/main.tf line 34, in resource "aws_guardduty_organization_configuration" "this":
auto_enable = var.auto_enable
Use auto_enable_organization_members instead

Solution

Move to auto_enable_organization_members argument

Confirmation

Run terraform plan and receive no message

Next Steps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.