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

an input for additional stages #94

Closed
flavono123 opened this issue Sep 12, 2023 · 6 comments
Closed

an input for additional stages #94

flavono123 opened this issue Sep 12, 2023 · 6 comments
Labels

Comments

@flavono123
Copy link

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

  • No 🛑: please wait to file a request until the functionality is avaialble in the AWS provider
  • Yes ✅: please list the AWS provider version which introduced this functionality

5.16.2

Is your request related to a problem? Please describe.

cannot add more stage by module inputs

Describe the solution you'd like.

an input like:

additional_stages = [
  "dev",
  "prod"
]

Describe alternatives you've considered.

maybe have to use resource 😩

module "aws_apigateway_v2" { ... }

resource "aws_apigatewayv2_stage" "example" {
  api_id = module.aws_apigatewayv2_api.this.id
  name   = "dev"
}

resource "aws_apigatewayv2_stage" "example" {
  api_id = module.aws_apigatewayv2_api.this.id
  name   = "dev"
}

Additional context

@bryantbiggs
Copy link
Member

I'm not sure how applicable this is in a module. you typically deploy to dev first and later promote to prod, which means that dev stage does not always equal prod. therefore, I think its better to have to module definitions, one for dev and one for prod and you can control them independently to promote changes as needed. but I am open to hear thoughts, feedback

@flavono123
Copy link
Author

image
i can add some stages when i create new one in the web console, following a workshop. that makes me suggest like this.
i've got what you mean but isn't it make sense?

@flavono123
Copy link
Author

back to my "real" problem, what i want to do with the module, is solved by resources like:

## API Gateway

### API
resource "aws_apigatewayv2_api" "delivery_api" {
  name          = local.apigateway.api_name
  protocol_type = "HTTP"
}


### Deploy/Stages
resource "aws_apigatewayv2_stage" "default" {
  api_id      = aws_apigatewayv2_api.delivery_api.id
  name        = "$default"
  auto_deploy = true
}
resource "aws_apigatewayv2_stage" "dev" {
  api_id      = aws_apigatewayv2_api.delivery_api.id
  name        = local.apigateway.stage_name
  auto_deploy = true
}

I'm not sure how applicable this is in a module.

is it hard to set args(or fix the module configs) for creating above resources only?
or it is not the purpose of this module?

@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Oct 14, 2023
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
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 Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants