akamai / terraform-provider-akamai

Terraform Akamai provider

Home Page:https://www.terraform.io/docs/providers/akamai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stream_id output missing from datastream

chrisminton opened this issue · comments

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
Terraform v1.4.0

provider version 5.1.0

Affected Resource(s)

Please list the resources as a list, for example:

  • datastream

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

terraform {
  required_version = ">= 1.0, < 2.0"

  required_providers {
    akamai = {
      source  = "akamai/akamai"
      version = ">= 5.0.0"
    }
  }
}

resource "akamai_datastream" "this" {
  active = false
  delivery_configuration {
    field_delimiter = "SPACE"
    format          = "STRUCTURED"
    frequency {
      interval_in_secs = 30
    }
    upload_file_prefix = "prefix"
    upload_file_suffix = "suffix"
  }
  contract_id = "C-0N7RAC7"
  dataset_fields = [
    1000
  ]
  group_id = 12345
  properties = [
    12345, 98765
  ]
  stream_name = "Datastream_Example1"
  gcs_connector {
    bucket               = "my_bucket"
    display_name         = "my_connector_name"
    path                 = "akamai/logs"
    private_key          = "-----BEGIN PRIVATE KEY-----\nprivate_key\n-----END PRIVATE KEY-----\n"
    project_id           = "my_project_id"
    service_account_name = "my_service_account_name"
  }
  notification_emails = [
    "example1@example.com",
    "example2@example.com",
  ]
  collect_midgress = true
}

output "datastream_stream_id" {
  description = "ID for the datastream"
  value       = akamai_datastream.this.stream_id
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

What should have happened?
The stream ID is output (as is specified in the documentation)

Actual Behavior

What actually happened?

 > terraform validate 
 Error: Unsupported attribute

   on test.tf line 49, in output "datastream_stream_id":
   49:   value       = akamai_datastream.this.stream_id

 This object has no argument, nested block, or exported attribute named "stream_id".

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform validate

Hi @chrisminton, thanks for letting us know.

I verified that it is an inconsistency in the documentation. akamai_datastream resource does not expose stream_id. ID of the created resource is represented by the id attribute.

We'll fix the documentation. In the meantime please let me know if changing your config to the following helps:

output "datastream_stream_id" {
  description = "ID for the datastream"
  value       = akamai_datastream.this.id
}

Yes it does @dstopka, thanks!