Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain name and certificate ARN #92

Closed
1 task done
syaldram opened this issue Aug 29, 2023 · 5 comments
Closed
1 task done

Domain name and certificate ARN #92

syaldram opened this issue Aug 29, 2023 · 5 comments

Comments

@syaldram
Copy link

Domain name and certificate ARN

The module readme file states most or all inputs are "optional" but the terraform module has a required argument "domain_name" and "certificate_arn". Is there a default domain that can be used which is generated by AWS by default?

If your request is for a new feature, please use the Feature request template.

  • ✋ I have searched the open/closed issues and my issue is not listed.

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

  • Module version [Required]:

  • Terraform version:
    Terraform v1.4.6

  • Provider version(s):
    version = "> 4.0"

Reproduction Code [Required]

module "apigateway-v2" {
source = "terraform-aws-modules/apigateway-v2/aws"
version = "2.2.2"
name = "get_views_api"
description = "REST API with lambda integration to get dynamoDB data for web application."
protocol_type = "HTTP"

cors_configuration = {
allow_headers = ["content-type", "x-amz-date", "authorization", "x-api-key", "x-amz-security-token", "x-amz-user-agent"]
allow_methods = [""]
allow_origins = ["
"]
}

Routes and integrations

integrations = {
"POST /" = {
lambda_arn = module.get_viewer_count.lambda_function_arn
payload_format_version = "2.0"
timeout_milliseconds = 12000
credentials_arn = aws_iam_role.apigw_invoke_lambda_role.arn
}

"GET /some-route-with-authorizer" = {
  integration_type       = "HTTP_PROXY"
  integration_uri        = module.get_viewer_count.lambda_function_invoke_arn
  credentials_arn        = aws_iam_role.apigw_invoke_lambda_role.arn
}

}

default_stage_access_log_destination_arn = aws_cloudwatch_log_group.apigw_log_group.arn
default_stage_access_log_format = "$context.identity.sourceIp $context.requestId"

}

Steps to reproduce the behavior:

Expected behavior

Terraform successful

Actual behavior

Error: Missing required argument
Error: Missing required argument

@alohamonius
Copy link

You can use
create_api_domain_name = false

@flavono123
Copy link

+1 for this since we can create only with an API name in the web console, even though this is not a bug.
i think this module should create the random domain and attach the ACM to it by default.

@flavono123
Copy link

You can use create_api_domain_name = false

oh got this lately. working with it 👍

@flavono123
Copy link

flavono123 commented Sep 15, 2023

@syaldram @bryantbiggs
guess solved by #92 (comment). would be close?

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants