Skip to content

Commit

Permalink
use minimum versions for provider pinning (#51)
Browse files Browse the repository at this point in the history
* use minimum versions for provider pinning #33

* Update main.tf

* Update versions.tf

* Update main.tf

* Updated README.md

* bucket region

* Updated README.md

Co-authored-by: actions-bot <[email protected]>
  • Loading branch information
woz5999 and actions-bot authored Sep 16, 2020
1 parent 9362e4a commit 36439eb
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ Available targets:
| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| aws | >= 2.0 |
| local | ~> 1.2 |
| null | ~> 2.0 |
| aws | >= 3.0 |
| local | >= 1.2 |
| null | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.0 |
| aws | >= 3.0 |

## Inputs

Expand Down Expand Up @@ -203,6 +203,7 @@ Available targets:
| bucket\_arn | Bucket ARN |
| bucket\_domain\_name | FQDN of bucket |
| bucket\_id | Bucket Name (aka ID) |
| bucket\_region | Bucket region |
| bucket\_regional\_domain\_name | The bucket region-specific domain name |
| enabled | Is module enabled |
| secret\_access\_key | The secret access key. This will be written to the state file in plain-text |
Expand Down
9 changes: 5 additions & 4 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| aws | >= 2.0 |
| local | ~> 1.2 |
| null | ~> 2.0 |
| aws | >= 3.0 |
| local | >= 1.2 |
| null | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.0 |
| aws | >= 3.0 |

## Inputs

Expand Down Expand Up @@ -62,6 +62,7 @@
| bucket\_arn | Bucket ARN |
| bucket\_domain\_name | FQDN of bucket |
| bucket\_id | Bucket Name (aka ID) |
| bucket\_region | Bucket region |
| bucket\_regional\_domain\_name | The bucket region-specific domain name |
| enabled | Is module enabled |
| secret\_access\_key | The secret access key. This will be written to the state file in plain-text |
Expand Down
1 change: 0 additions & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module "s3_bucket" {

enabled = true
user_enabled = true
region = var.region
namespace = var.namespace
stage = var.stage
name = var.name
Expand Down
5 changes: 5 additions & 0 deletions examples/complete/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ output "bucket_arn" {
description = "Bucket ARN"
}

output "bucket_region" {
value = module.s3_bucket.bucket_region
description = "Bucket region"
}

output "user_name" {
value = module.s3_bucket.user_name
description = "Normalized IAM user name"
Expand Down
3 changes: 1 addition & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ resource "aws_s3_bucket" "default" {
count = var.enabled ? 1 : 0
bucket = module.label.id
acl = try(length(var.grants), 0) == 0 ? var.acl : null
region = var.region
force_destroy = var.force_destroy
policy = var.policy
tags = module.label.tags
Expand Down Expand Up @@ -102,7 +101,7 @@ resource "aws_s3_bucket" "default" {
}

module "s3_user" {
source = "git::https://github.com/cloudposse/terraform-aws-iam-s3-user.git?ref=tags/0.9.0"
source = "git::https://github.com/cloudposse/terraform-aws-iam-s3-user.git?ref=tags/0.10.1"
namespace = var.namespace
stage = var.stage
environment = var.environment
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ output "bucket_arn" {
description = "Bucket ARN"
}

output "bucket_region" {
value = var.enabled ? join("", aws_s3_bucket.default.*.region) : ""
description = "Bucket region"
}

output "enabled" {
value = var.enabled
description = "Is module enabled"
Expand Down
6 changes: 3 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ terraform {
required_version = ">= 0.12.0"

required_providers {
aws = ">= 2.0"
local = "~> 1.2"
null = "~> 2.0"
aws = ">= 3.0"
local = ">= 1.2"
null = ">= 2.0"
}
}

0 comments on commit 36439eb

Please sign in to comment.