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

[Enhancement]: Support Timestream for InfluxDB #36398

Open
sentros opened this issue Mar 15, 2024 · 4 comments · May be fixed by #37963
Open

[Enhancement]: Support Timestream for InfluxDB #36398

sentros opened this issue Mar 15, 2024 · 4 comments · May be fixed by #37963
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. new-service Introduces a new service. service/timestreamwrite Issues and PRs that pertain to the timestreamwrite service.

Comments

@sentros
Copy link

sentros commented Mar 15, 2024

Description

It's now possible to select a different engine for a Timestream database in the aws console. The previous engine is now called LiveAnalytics and a new engine was added called InfluxDB. Terraform has no support for the InfluxDB engine or for its configuration options.

If you plan to add the new engine as an option to the pre existing aws_timestreamwrite_database you could just add new parameters for it as shown in the example. At least the parameter group needs its own new resource.

Not much is shared between the engines so maybe a whole new resource for InfluxDB type Timestream would be better. For example the RDS resource handles engine types all in the same resource but RDS engine types at least share some configuration options between them as opposed to Timestream for LiveAnalytics vs InfluxDB.

Affected Resource(s) and/or Data Source(s)

  • aws_timestreamwrite_database

Potential Terraform Configuration

resource "aws_timestreamwrite_database" "example" {
  database_name = "database-example"
  engine        = "influxdb"

  db_name           = "db-name-example"
  username          = "example-username"
  password          = "example-password"
  organization_name = "example-org"
  bucket_name       = "example-bucket"

  instance_class    = "db.influx.medium"
  storage_type      = "included-3000"
  allocated_storage = 200
  multi_az          = true

  db_subnet_group_name   = aws_db_subnet_group.example.name
  vpc_security_group_ids = [aws_security_group.example.id]
  publicly_accessible    = false

  parameter_group_name = aws_timestreamwrite_parametergroup.example.name
  s3_logs_location     = aws_s3_bucket.example.id

  tags = {
    Name = "value"
  }
}

resource "aws_timestreamwrite_parametergroup" "example" {
  name        = "example-name"
  description = "example-description"

  parameter {
    name  = "flux-log-enabled"
    value = "TRUE"
  }

  parameter {
    name  = "log-level"
    value = "error"
  }

  tags = {
    Name = "value"
  }

}

References

Would you like to implement a fix?

None

@sentros sentros added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 15, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/timestreamwrite Issues and PRs that pertain to the timestreamwrite service. label Mar 15, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 15, 2024
@ewbankkit ewbankkit added new-resource Introduces a new resource. new-service Introduces a new service. and removed needs-triage Waiting for first response or review from a maintainer. service/timestreamwrite Issues and PRs that pertain to the timestreamwrite service. labels Mar 15, 2024
@ewbankkit
Copy link
Contributor

At the API level Timestream for InfluxDB is a distinct service.
Following our naming guidelines the first resource should be:

resource "aws_timestreaminfluxdb_db_instance" "example" {
  name = "..."
}

@github-actions github-actions bot added the service/timestreamwrite Issues and PRs that pertain to the timestreamwrite service. label Mar 18, 2024
@trevorbonas
Copy link
Contributor

I would like to work on this issue.

trevorbonas added a commit to Bit-Quill/terraform-provider-aws that referenced this issue May 16, 2024
<!---
See what makes a good Pull Request at: https://hashicorp.github.io/terraform-provider-aws/raising-a-pull-request/
--->
### Description
<!---
Please provide a helpful description of what change this pull request will introduce.
--->
- The `timestreaminfluxdb` service client has been added.


### Relations
<!---
If your pull request fully resolves and should automatically close the linked issue, use Closes. Otherwise, use Relates.

For Example:

Relates #0000
or 
Closes #0000
--->

Relates hashicorp#36398

### References
<!---
Optionally, provide any helpful references that may help the reviewer(s).
--->

- [Amazon Timestream for InfluxDB docs](https://docs.aws.amazon.com/timestream/latest/developerguide/timestream-for-influxdb.html).
- [AWS SDK Go V2 TimestreamInfluxDB documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb).

### Output from Acceptance Testing
<!--
Replace TestAccXXX with a pattern that matches the tests affected by this PR.

Replace ec2 with the service package corresponding to your tests.

For more information on the `-run` flag, see the `go test` documentation at https://tip.golang.org/cmd/go/#hdr-Testing_flags.
-->

N/A
@trevorbonas
Copy link
Contributor

I am working on the aws_timestreaminfluxdb_db_instance resource and will provide updates in the coming weeks.

So far, my implementation differs in a few ways from the proposed implementation.

  • I will not be creating an aws_timestreaminfluxdb_provider_group resource.

    • Provider groups cannot currently be deleted. To avoid swamping users with unnecessary errors, a provider group ID can be used as an argument for an aws_timestreaminfluxdb_db_instance resource; users will have to create this provider group themselves, without Terraform.
  • S3 log buckets will follow the format defined by AWS SDK Go V2. Instead of providing an S3 bucket ID for logging, users will provide the following:

    log_delivery_configuration {
        s3_configuration {
            bucket_name = aws_s3_bucket.example.bucket
            enabled = true
        }
    } 
    

trevorbonas added a commit to Bit-Quill/terraform-provider-aws that referenced this issue Jun 4, 2024
<!---
See what makes a good Pull Request at: https://hashicorp.github.io/terraform-provider-aws/raising-a-pull-request/
--->
<!---
Please provide a helpful description of what change this pull request will introduce.
--->
- The `timestreaminfluxdb` service client has been added.

<!---
If your pull request fully resolves and should automatically close the linked issue, use Closes. Otherwise, use Relates.

For Example:

Relates #0000
or
Closes #0000
--->

Relates hashicorp#36398

<!---
Optionally, provide any helpful references that may help the reviewer(s).
--->

- [Amazon Timestream for InfluxDB docs](https://docs.aws.amazon.com/timestream/latest/developerguide/timestream-for-influxdb.html).
- [AWS SDK Go V2 TimestreamInfluxDB documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb).

<!--
Replace TestAccXXX with a pattern that matches the tests affected by this PR.

Replace ec2 with the service package corresponding to your tests.

For more information on the `-run` flag, see the `go test` documentation at https://tip.golang.org/cmd/go/#hdr-Testing_flags.
-->

N/A
trevorbonas added a commit to Bit-Quill/terraform-provider-aws that referenced this issue Jun 4, 2024
<!---
See what makes a good Pull Request at: https://hashicorp.github.io/terraform-provider-aws/raising-a-pull-request/
--->
<!---
Please provide a helpful description of what change this pull request will introduce.
--->
- The `timestreaminfluxdb` service client has been added.

<!---
If your pull request fully resolves and should automatically close the linked issue, use Closes. Otherwise, use Relates.

For Example:

Relates #0000
or
Closes #0000
--->

Relates hashicorp#36398

<!---
Optionally, provide any helpful references that may help the reviewer(s).
--->

- [Amazon Timestream for InfluxDB docs](https://docs.aws.amazon.com/timestream/latest/developerguide/timestream-for-influxdb.html).
- [AWS SDK Go V2 TimestreamInfluxDB documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb).

<!--
Replace TestAccXXX with a pattern that matches the tests affected by this PR.

Replace ec2 with the service package corresponding to your tests.

For more information on the `-run` flag, see the `go test` documentation at https://tip.golang.org/cmd/go/#hdr-Testing_flags.
-->

N/A
trevorbonas added a commit to Bit-Quill/terraform-provider-aws that referenced this issue Jun 4, 2024
<!---
See what makes a good Pull Request at: https://hashicorp.github.io/terraform-provider-aws/raising-a-pull-request/
--->
<!---
Please provide a helpful description of what change this pull request will introduce.
--->
- The `timestreaminfluxdb` service client has been added.

<!---
If your pull request fully resolves and should automatically close the linked issue, use Closes. Otherwise, use Relates.

For Example:

Relates #0000
or
Closes #0000
--->

Relates hashicorp#36398

<!---
Optionally, provide any helpful references that may help the reviewer(s).
--->

- [Amazon Timestream for InfluxDB docs](https://docs.aws.amazon.com/timestream/latest/developerguide/timestream-for-influxdb.html).
- [AWS SDK Go V2 TimestreamInfluxDB documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb).

<!--
Replace TestAccXXX with a pattern that matches the tests affected by this PR.

Replace ec2 with the service package corresponding to your tests.

For more information on the `-run` flag, see the `go test` documentation at https://tip.golang.org/cmd/go/#hdr-Testing_flags.
-->

N/A
trevorbonas added a commit to Bit-Quill/terraform-provider-aws that referenced this issue Jun 4, 2024
<!---
See what makes a good Pull Request at: https://hashicorp.github.io/terraform-provider-aws/raising-a-pull-request/
--->
<!---
Please provide a helpful description of what change this pull request will introduce.
--->
- The `timestreaminfluxdb` service client has been added.

<!---
If your pull request fully resolves and should automatically close the linked issue, use Closes. Otherwise, use Relates.

For Example:

Relates #0000
or
Closes #0000
--->

Relates hashicorp#36398

<!---
Optionally, provide any helpful references that may help the reviewer(s).
--->

- [Amazon Timestream for InfluxDB docs](https://docs.aws.amazon.com/timestream/latest/developerguide/timestream-for-influxdb.html).
- [AWS SDK Go V2 TimestreamInfluxDB documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb).

<!--
Replace TestAccXXX with a pattern that matches the tests affected by this PR.

Replace ec2 with the service package corresponding to your tests.

For more information on the `-run` flag, see the `go test` documentation at https://tip.golang.org/cmd/go/#hdr-Testing_flags.
-->

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. new-service Introduces a new service. service/timestreamwrite Issues and PRs that pertain to the timestreamwrite service.
Projects
None yet
3 participants