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

New Resource: AWS IoT Fleet Provisioning Template #12107

Closed
oleg-codaio opened this issue Feb 20, 2020 · 5 comments · Fixed by #12108
Closed

New Resource: AWS IoT Fleet Provisioning Template #12107

oleg-codaio opened this issue Feb 20, 2020 · 5 comments · Fixed by #12108
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. service/iot Issues and PRs that pertain to the iot service.
Milestone

Comments

@oleg-codaio
Copy link
Contributor

oleg-codaio commented Feb 20, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS recently launched a beta for fleet provisioning, which allows IoT to generate certificates and private keys for devices as they connect to IoT with a provisioning template.

New or Affected Resource(s)

  • aws_iot_provisioning_template

Potential Terraform Configuration

data "aws_iam_policy_document" "iot_assume_role_policy" {
  statement {
    actions = ["sts:AssumeRole"]

    principals {
      type        = "Service"
      identifiers = ["iot.amazonaws.com"]
    }
  }
}

resource "aws_iam_role" "iot_fleet_provisioning" {
  name = "IoTProvisioningServiceRole"
  path = "/service-role/"
  assume_role_policy = data.aws_iam_policy_document.iot_assume_role_policy.json
}

resource "aws_iam_role_policy_attachment" "iot_fleet_provisioning_registration" {
  role       = aws_iam_role.iot_fleet_provisioning.name
  policy_arn = "arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration"
}

resource "aws_iot_provisioning_template" "fleet" {
  template_name         = "FleetProvisioningTemplate"
  description           = "My fleet provisioning template"
  provisioning_role_arn = aws_iam_role.iot_fleet_provisioning

  template_body = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "iot:*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
EOF
}

Optional: provide a data source to allow cleaner generation of template bodies.

References

None

@oleg-codaio oleg-codaio added the enhancement Requests to existing resources that expand the functionality or scope. label Feb 20, 2020
@ghost ghost added service/iam Issues and PRs that pertain to the iam service. service/iot Issues and PRs that pertain to the iot service. labels Feb 20, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 20, 2020
@oleg-codaio
Copy link
Contributor Author

I'm taking a stab at this.

@DrFaust92 DrFaust92 added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. service/iam Issues and PRs that pertain to the iam service. labels Nov 12, 2020
@AdminTurnedDevOps
Copy link

Hi there,

Any update on this and when the resource will be available for consumer use to create Fleets?

@p0fi
Copy link

p0fi commented Mar 8, 2022

Almost one year later,... do we know more when this might be merged?

@ewbankkit ewbankkit self-assigned this Apr 1, 2022
@github-actions github-actions bot added this to the v4.9.0 milestone Apr 2, 2022
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

This functionality has been released in v4.9.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented May 8, 2022

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 May 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. service/iot Issues and PRs that pertain to the iot service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants