Skip to content

Commit

Permalink
add caller identity data source (#39)
Browse files Browse the repository at this point in the history
* add caller identity data source
* Update to go v1.20
* Set OS_ARCH from golang settings
* update docs
* update test matrix

---------

Co-authored-by: Nuru <Nuru@users.noreply.github.com>
  • Loading branch information
mcalhoun and Nuru authored May 2, 2023
1 parent ffe99d0 commit 977fcdc
Show file tree
Hide file tree
Showing 21 changed files with 654 additions and 407 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: "1.20"

- name: Import GPG key
id: import_gpg
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: "1.20"
id: go

- name: Check out code into the Go module directory
Expand Down Expand Up @@ -48,11 +48,14 @@ jobs:
- "0.15.1"
- "1.0.0"
- "1.1.0"
- "1.2.0"
- "1.3.0"
- "1.4.0"
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: "1.20"
id: go

- name: Check out code into the Go module directory
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ terraform-provider-awsutils

docs/targets.md
docs/terraform.md

# nix files
.envrc
.direnv/
1 change: 1 addition & 0 deletions .go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.20
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NAMESPACE=cloudposse
NAME=awsutils
BINARY=terraform-provider-${NAME}
VERSION=9999.99.99
OS_ARCH=darwin_amd64
export OS_ARCH ?= $(shell go env GOOS)_$(shell go env GOARCH)
SHELL := /bin/bash

# List of targets the `readme` target should call before generating the readme
Expand All @@ -25,7 +25,7 @@ tfdocs:

install: build
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
cp ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}/

# Lint terraform code
lint:
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
-->

Terraform provider for performing various tasks that cannot be performed with the official
[AWS Terraform Provider](https://github.com/hashicorp/terraform-provider-aws) from Hashicorp.
Terraform provider for performing various tasks that cannot be performed with the official
[AWS Terraform Provider](https://github.com/hashicorp/terraform-provider-aws) from Hashicorp.

This provider is derived in large parts from the official HashiCorp AWS provider. We copied all the boilerplate
functionality so that it follows the `terraform-provider-aws` conventions, but then removed all the standard
resources and added in our own. This module is intended to be used as an escape hatch to accomplish all the hard
things that will never be supported by the official provider due to strong (and valid) opinions of how providers
should manage the lifecycle of a resource. Unfortunately, in the real-world we have to make tradeoffs to get stuff
done. That's this provider in a nutshell.
This provider is derived in large parts from the official HashiCorp AWS provider. We copied all the boilerplate
functionality so that it follows the `terraform-provider-aws` conventions, but then removed all the standard resources
and added in our own. This module is intended to be used as an escape hatch to accomplish all the hard things that
will never be supported by the official provider due to strong (and valid) opinions of how providers should manage the
lifecycle of a resource. Unfortunately, in the real-world we have to make tradeoffs to get stuff done. That's this
provider in a nutshell.

---

Expand Down Expand Up @@ -210,7 +210,7 @@ Are you using this project or any of our other projects? Consider [leaving a tes

Check out these related projects.

- [Cloud Posse Terraform Utils Provider](https://github.com/cloudposse/terraform-provider-awsutils) - Terraform provider for various utilities (deep merging, stack configuration management), and to add additional
- [Cloud Posse Terraform Utils Provider](https://github.com/cloudposse/terraform-provider-awsutils) - Terraform provider for various utilities (deep merging, stack configuration management), and to add additional
missing functionality to Terraform


Expand Down Expand Up @@ -293,7 +293,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

## Copyrights

Copyright © 2021-2022 [Cloud Posse, LLC](https://cloudposse.com)
Copyright © 2021-2023 [Cloud Posse, LLC](https://cloudposse.com)



Expand Down Expand Up @@ -339,7 +339,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply

[![README Footer][readme_footer_img]][readme_footer_link]
[![Beacon][beacon]][website]

<!-- markdownlint-disable -->
[logo]: https://cloudposse.com/logo-300x69.svg
[docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-provider-awsutils&utm_content=docs
[website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-provider-awsutils&utm_content=website
Expand Down Expand Up @@ -370,3 +370,4 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-provider-awsutils
[share_email]: mailto:?subject=terraform-provider-awsutils&body=https://github.com/cloudposse/terraform-provider-awsutils
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-provider-awsutils?pixel&cs=github&cm=readme&an=terraform-provider-awsutils
<!-- markdownlint-restore -->
20 changes: 10 additions & 10 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ badges:
related:
- name: "Cloud Posse Terraform Utils Provider"
description: |-
Terraform provider for various utilities (deep merging, stack configuration management), and to add additional
Terraform provider for various utilities (deep merging, stack configuration management), and to add additional
missing functionality to Terraform
url: "https://github.com/cloudposse/terraform-provider-awsutils"

Expand All @@ -51,15 +51,15 @@ references:

# Short description of this project
description: |-
Terraform provider for performing various tasks that cannot be performed with the official
[AWS Terraform Provider](https://github.com/hashicorp/terraform-provider-aws) from Hashicorp.
This provider is derived in large parts from the official HashiCorp AWS provider. We copied all the boilerplate
functionality so that it follows the `terraform-provider-aws` conventions, but then removed all the standard
resources and added in our own. This module is intended to be used as an escape hatch to accomplish all the hard
things that will never be supported by the official provider due to strong (and valid) opinions of how providers
should manage the lifecycle of a resource. Unfortunately, in the real-world we have to make tradeoffs to get stuff
done. That's this provider in a nutshell.
Terraform provider for performing various tasks that cannot be performed with the official
[AWS Terraform Provider](https://github.com/hashicorp/terraform-provider-aws) from Hashicorp.
This provider is derived in large parts from the official HashiCorp AWS provider. We copied all the boilerplate
functionality so that it follows the `terraform-provider-aws` conventions, but then removed all the standard resources
and added in our own. This module is intended to be used as an escape hatch to accomplish all the hard things that
will never be supported by the official provider due to strong (and valid) opinions of how providers should manage the
lifecycle of a resource. Unfortunately, in the real-world we have to make tradeoffs to get stuff done. That's this
provider in a nutshell.
#introduction: |-
# This is an introduction.
Expand Down
31 changes: 31 additions & 0 deletions docs/data-sources/aws_arn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aws_arn Data Source - terraform-provider-awsutils"
subcategory: ""
description: |-
---

# aws_arn (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `arn` (String)

### Read-Only

- `account` (String)
- `id` (String) The ID of this resource.
- `partition` (String)
- `region` (String)
- `resource` (String)
- `service` (String)


31 changes: 31 additions & 0 deletions docs/data-sources/caller_identity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awsutils_caller_identity Data Source - terraform-provider-awsutils"
subcategory: ""
description: |-
Use this data source to get the access to the effective
Account ID, User ID, ARN and EKS Role ARN in which Terraform is authorized.
---

# awsutils_caller_identity (Data Source)

Use this data source to get the access to the effective
Account ID, User ID, ARN and EKS Role ARN in which Terraform is authorized.



<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `account_id` (String) AWS Account ID number of the account that owns or contains the calling entity.
- `arn` (String) The AWS ARN associated with the calling entity.
- `eks_role_arn` (String) If the calling identity is an assumed role, this is the transformation of that assumed role ARN
into something suitable for use in configuring EKS access. See
[Add IAM principals to your Amazon EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html#aws-auth-users).
Otherwise, `null`.
- `id` (String) AWS Account ID number of the account that owns or contains the calling entity.
- `user_id` (String) Unique identifier of the calling entity.


8 changes: 4 additions & 4 deletions docs/data-sources/ec2_client_vpn_export_client_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: |-
Passthru for configuring and executing aws ec2 export-client-vpn-client-configuration
---

# Data Source `awsutils_ec2_client_vpn_export_client_config`
# awsutils_ec2_client_vpn_export_client_config (Data Source)

Passthru for configuring and executing `aws ec2 export-client-vpn-client-configuration`

Expand All @@ -17,10 +17,10 @@ Passthru for configuring and executing `aws ec2 export-client-vpn-client-configu

### Required

- **id** (String) The ID of the VPN endpoint to export the config for.
- `id` (String) The ID of the VPN endpoint to export the config for.

### Read-only
### Read-Only

- **client_configuration** (String) Output from 'export-client-vpn-client-configuration' call
- `client_configuration` (String) Output from 'export-client-vpn-client-configuration' call


Loading

0 comments on commit 977fcdc

Please sign in to comment.