Commit Graph

2293 Commits

Author SHA1 Message Date
Mitchell Hashimoto 5e127a62c1 Merge pull request #6597 from hashicorp/f-state-mv
command/state mv
2016-05-11 12:58:23 -07:00
qivers 9cc21d62f2 Correcting arn output to id (#6586)
Using `arn` as an output doesn't work, `id` does.
2016-05-10 22:32:07 +01:00
Mitchell Hashimoto 9ddf73ad81
website: update docs 2016-05-10 13:25:43 -07:00
Mitchell Hashimoto 04598baa25
website: document state mv 2016-05-10 13:25:42 -07:00
Mitchell Hashimoto 473a58a672 Add `terraform state list` command
This introduces the terraform state list command to list the resources
within a state. This is the first of many state management commands to
come into 0.7.

This is the first command of many to come that is considered a
"plumbing" command within Terraform (see "plumbing vs porcelain":
http://git.661346.n2.nabble.com/what-are-plumbing-and-porcelain-td2190639.html).
As such, this PR also introduces a bunch of groundwork to support
plumbing commands.

The main changes:

- Main command output is changed to split "common" and "uncommon"
  commands.

- mitchellh/cli is updated to support nested subcommands, since
  terraform state list is a nested subcommand.

- terraform.StateFilter is introduced as a way in core to filter/search
  the state files. This is very basic currently but I expect to make it
  more advanced as time goes on.

- terraform state list command is introduced to list resources in a
  state. This can take a series of arguments to filter this down.

Known issues, or things that aren't done in this PR on purpose:

- Unit tests for terraform state list are on the way. Unit tests for the
  core changes are all there.
2016-05-10 14:49:14 -04:00
Chris Bednarski 3c774af9c2 Warn when an internal plugin is overridden
Also added documentation explaining what happened and how to fix it
2016-05-10 14:49:13 -04:00
James Nugent e57a399d71 core: Use native HIL maps instead of flatmaps
This changes the representation of maps in the interpolator from the
dotted flatmap form of a string variable named "var.variablename.key"
per map element to use native HIL maps instead.

This involves porting some of the interpolation functions in order to
keep the tests green, and adding support for map outputs.

There is one backwards incompatibility: as a result of an implementation
detail of maps, one could access an indexed map variable using the
syntax "${var.variablename.key}".

This is no longer possible - instead HIL native syntax -
"${var.variablename["key"]}" must be used. This was previously
documented, (though not heavily used) so it must be noted as a backward
compatibility issue for Terraform 0.7.
2016-05-10 14:49:13 -04:00
Chris Bednarski 6360e6c8b6 Implemented internal plugin calls; which allows us to compile plugins into the main terraform binary 2016-05-10 14:40:11 -04:00
Mitchell Hashimoto e133452663 command/state: pattern => address 2016-05-10 14:14:48 -04:00
Mitchell Hashimoto 5737c0a13b website: update docs for state show 2016-05-10 14:14:48 -04:00
Mitchell Hashimoto d1b46e99bd Add `terraform state list` command
This introduces the terraform state list command to list the resources
within a state. This is the first of many state management commands to
come into 0.7.

This is the first command of many to come that is considered a
"plumbing" command within Terraform (see "plumbing vs porcelain":
http://git.661346.n2.nabble.com/what-are-plumbing-and-porcelain-td2190639.html).
As such, this PR also introduces a bunch of groundwork to support
plumbing commands.

The main changes:

- Main command output is changed to split "common" and "uncommon"
  commands.

- mitchellh/cli is updated to support nested subcommands, since
  terraform state list is a nested subcommand.

- terraform.StateFilter is introduced as a way in core to filter/search
  the state files. This is very basic currently but I expect to make it
  more advanced as time goes on.

- terraform state list command is introduced to list resources in a
  state. This can take a series of arguments to filter this down.

Known issues, or things that aren't done in this PR on purpose:

- Unit tests for terraform state list are on the way. Unit tests for the
  core changes are all there.
2016-05-10 14:14:47 -04:00
Albert Choi 94a7c69153 [clc] additional server types + docs 2016-05-10 10:36:52 -07:00
Albert Choi 8ab63c2d52 [clc] add packages to server at create 2016-05-10 10:36:52 -07:00
James Nugent 6e586c8939
v0.6.16 2016-05-09 20:31:07 +00:00
James Nugent b62f6af158 core: Add support for marking outputs as sensitive (#6559)
* core: Add support for marking outputs as sensitive

This commit allows an output to be marked "sensitive", in which case the
value is redacted in the post-refresh and post-apply list of outputs.

For example, the configuration:

```
variable "input" {
    default = "Hello world"
}

output "notsensitive" {
    value = "${var.input}"
}

output "sensitive" {
    sensitive = true
    value = "${var.input}"
}
```

Would result in the output:

```
terraform apply

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

  notsensitive = Hello world
  sensitive    = <sensitive>
```

The `terraform output` command continues to display the value as before.

Limitations: Note that sensitivity is not tracked internally, so if the
output is interpolated in another module into a resource, the value will
be displayed. The value is still present in the state.
2016-05-09 15:46:07 -04:00
Kevin DeJong 0cec1c19d7 Add support for the Base URL endpoint so the GitHub provider can support GitHub Enterprise (#6434) 2016-05-09 19:22:53 +01:00
Clint 3eee40cd98 provider/fastly: Add support for Conditions for Fastly Services (#6481)
* provider/fastly: Add support for Conditions for Fastly Services

Docs here:

- https://docs.fastly.com/guides/conditions/

Also Bump go-fastly version for domain support in S3 Logging
2016-05-09 14:08:13 -04:00
Antoine Rouaze a105de19c0 [azurerm] Add os_type and image_uri in azurerm_virtual_machine (#6553)
Fix #6372

Partial fix of #6526
2016-05-09 18:51:19 +01:00
Paul Stack af29a61748 provider/aws: Change `aws_elastic_ip_association` to have computed parameters (#6552)
* New top level AWS resource aws_eip_association

* Add documentation for aws_eip_association

* Add tests for aws_eip_association

* provider/aws: Change `aws_elastic_ip_association` to have computed
parameters

The AWS API was send ing more parameters than we had set. Therefore,
Terraform was showing constant changes when plans were being formed
2016-05-09 18:40:45 +01:00
James Nugent 2d19957d8b Merge pull request #6558 from hashicorp/b-aws-db-option-group-name
provider/aws: Update paramter for DB Option Group
2016-05-09 13:33:25 -04:00
clint shryock f8d59b9e97 provider/aws: Update paramter for DB Option Group 2016-05-09 12:16:26 -05:00
Paul Stack d3939db0a1 provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine` (#6556)
provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine`
2016-05-09 18:14:02 +01:00
Felivel Camilo 156d2916d8 Adding private ip address reference to azurerm network interface (#6538)
* Adding private ip address reference

* adding private ip address reference
* Updating the docs.

* Removing optional attrib from private_ip_address

Removing optional attribute from private_ip_address, this element is only being used in the read.

* Selecting the first element instead of using a loop for now.
Change this to a loop when https://github.com/Azure/azure-sdk-for-go/issues/259 is fixed
2016-05-09 15:21:15 +01:00
James Nugent affd2b3f3b Merge pull request #6505 from hashicorp/b-cloudfront-cookies
provider/aws: Require cookies for Cloudfront Distributions
2016-05-08 19:45:37 -04:00
Chris Marchesi 84cd31cece provider/aws: Add CloudFront hosted_zone_id attribute (#6530)
Added the hosted_zone_id attribute, which aliases to the Route 53
zone ID that can be used to route Alias Resource Record Sets to.

This fixes hashicorp/terraform#6489.
2016-05-09 00:40:30 +01:00
James Nugent 3900c3f086 docs: Clarify wording of which variables prompt 2016-05-08 19:38:35 -04:00
James Nugent 28a84e3f4e Merge pull request #6534 from arsdehnel/patch-1
Document change in CLI behavior
2016-05-08 19:37:05 -04:00
James Nugent 5366fabad1 Merge pull request #4401 from stack72/aws-rds-option-groups
provider/aws: aws_db_option_group
2016-05-08 19:34:15 -04:00
James Nugent 6ca0e0064a Merge pull request #6541 from hashicorp/fix-azurerm-vm-ssh-key
provider/azurerm: Fix an issue with `azurerm_virtual_machine` ssh_keys
2016-05-08 19:20:44 -04:00
stack72 fdb9293635 provider:azurerm: Add documentation for `azurerm_virtual_machine`
adminPassword

Reports from issues showed the following errors:

```
{
    "error": {
            "code": "InvalidParameter",
                    "target": "adminPassword",
                            "message": "The supplied password must be
                            between 6-72 characters long and must
                            satisfy at least 3 of password complexity
                            requirements from the following: \r\n1)
                            Contains an uppercase character\r\n2)
                            Contains a lowercase character\r\n3)
                            Contains a numeric digit\r\n4) Contains a
                            special character."

    }

}
```

This commit adds some documentation for the adminPassword complexity
requirements
2016-05-08 23:07:04 +01:00
stack72 712fc83a20 provider/azurerm: Fix an issue with `azurerm_virtual_machine` ssh_keys
ssh_keys were throwing an error similar to this:

```
* azurerm_virtual_machine.test: [DEBUG] Error setting Virtual Machine
* Storage OS Profile Linux Configuration: &errors.errorString{s:"Invalid
* address to set: []string{\"os_profile_linux_config\", \"0\",
* \"ssh_keys\"}"}
```

This was because of nesting of Set within a Set in the schema. By
changing this to a List within a Set, the schema works as expected. This
means we can now set SSH Keys on VMs. This has been tested using a
remote-exec and a connection block with the ssh key

```
azurerm_virtual_machine.test: Still creating... (2m10s elapsed)
azurerm_virtual_machine.test (remote-exec): Connected!
azurerm_virtual_machine.test (remote-exec): CONNECTED!
```
2016-05-08 22:51:51 +01:00
stack72 8dc123fd94 Scaffold the AWS DB Option Group resource
Change the AWS DB Instance to now include the DB Option Group param. Adds a test to prove that it works

Add acceptance tests for the AWS DB Option Group work. This ensures that Options can be added and updated

Documentation for the AWS DB Option resource
2016-05-08 20:18:53 +01:00
Paul Stack dc30bd29fc provider/aws: Redshift Cluster not allowing 0 for (#6537)
automated_snapshot_retention_period

The default value for `automated_snapshot_retention_period` is 1.
Therefore, it can be included in the `CreateClusterInput` without
needing to check that it is set.

This was actually stopping people from setting the value to 0 (disabling
the snapshots) as there is an issue in `d.GetOk()` evaluating 0 for int
2016-05-08 19:29:36 +01:00
Jason Wieringa 57a1001ac0 Fix documentation on autoscaling group (#6532)
As of sha d3697fa50b, enabled_metrics
is an optional setting.
2016-05-08 18:03:24 +01:00
arsdehnel 61c7cf9457 Change in CLI behavior
Just wanted to call out that the CLI prompts for values for unset variables instead of an error.  Guessing that was an enhancement somewhere along the line and just didn't get updated in the docs.
2016-05-07 20:52:06 -05:00
Clint 99e0aec769 provider/aws: Fix issue changing EIP Association (#6521)
provider/aws: Update EIP to use new associate_with_private_ip instead of private_ip
2016-05-06 15:38:39 -05:00
John Engelman 14f6f90621 Support standard AWS config in the S3 remote backend. (#5270) 2016-05-06 17:52:18 +01:00
Justin Clark 380ada1019 provider/aws: Add agent_version argument to AWS_OPSWORKS_STACK 2016-05-05 22:56:44 +01:00
clint shryock 8129c0589c provider/aws: Require cookies for Cloudfront Distributions 2016-05-05 15:44:35 -05:00
Greg Thole ebfc701265 provider/aws: AWS API Gateway request parameters json (#6501)
* Update docs with new parameters

* Add request parameters as JSON

* Update function name and error statements
2016-05-05 21:14:51 +01:00
Radek Simko d23fac3a28 aws: Update docs after #6385 (account ID via sts) 2016-05-05 17:51:44 +01:00
Kraig Amador 1f80ec48d0 Added RDS event subscriptions (#6367) 2016-05-05 11:14:25 +01:00
James Nugent a7817c0710 Merge pull request #6469 from hashicorp/jt-ie-bnr
website: add a height to svg in bnr to fix IE bug
2016-05-04 14:10:01 -05:00
Josh Taylor 983da213af provider/aws: add response parameters support to api gateway (#6344)
* provider/aws: Add support for response parameters aws_api_gateway_integration_response and aws_api_gateway_method response.

* fix spacing

* fix spacing

* gofmt

* add update test; add docs; add reimplement TODO; add field read

* resolve conflict

* fix expandAPIGatewayMethodResponse error handling
2016-05-04 11:56:18 +01:00
captainill 5ed03602d7 add a height to svg in bnr to fix IE bug 2016-05-03 18:37:47 -07:00
danielcbright 8921e10d71 Added softlayer virtual guest and ssh keys functionality:
Here is an example that will setup the following:
+ An SSH key resource.
+ A virtual server resource that uses an existing SSH key.
+ A virtual server resource using an existing SSH key and a Terraform managed SSH key (created as "test_key_1" in the example below).

(create this as sl.tf and run terraform commands from this directory):
```hcl
provider "softlayer" {
    username = ""
    api_key = ""
}

resource "softlayer_ssh_key" "test_key_1" {
    name = "test_key_1"
    public_key = "${file(\"~/.ssh/id_rsa_test_key_1.pub\")}"
    # Windows Example:
    # public_key = "${file(\"C:\ssh\keys\path\id_rsa_test_key_1.pub\")}"
}

resource "softlayer_virtual_guest" "my_server_1" {
    name = "my_server_1"
    domain = "example.com"
    ssh_keys = ["123456"]
    image = "DEBIAN_7_64"
    region = "ams01"
    public_network_speed = 10
    cpu = 1
    ram = 1024
}

resource "softlayer_virtual_guest" "my_server_2" {
    name = "my_server_2"
    domain = "example.com"
    ssh_keys = ["123456", "${softlayer_ssh_key.test_key_1.id}"]
    image = "CENTOS_6_64"
    region = "ams01"
    public_network_speed = 10
    cpu = 1
    ram = 1024
}
```

You'll need to provide your SoftLayer username and API key,
so that Terraform can connect. If you don't want to put
credentials in your configuration file, you can leave them
out:

```
provider "softlayer" {}
```

...and instead set these environment variables:

- **SOFTLAYER_USERNAME**: Your SoftLayer username
- **SOFTLAYER_API_KEY**: Your API key
2016-05-03 15:58:58 -05:00
Paul Stack 501c05d0f7 provider/vsphere: IPv6 support. (#6457)
IPv6 support added.

We support 1 IPv6 address per interface. It seems like the vSphere SDK supports more than one, since it's provided as a list.
I can change it to support more than one address. I decided to stick with one for now since that's how the configuration parameters
had been set up by other developers.

The global gateway configuration option has been removed. Instead the user should specify a gateway on NIC level (ipv4_gateway and ipv6_gateway).

For now, the global gateway will be used as a fallback for every NICs ipv4_gateway.
The global gateway configuration option has been marked as deprecated.
2016-05-03 18:27:24 +02:00
Cameron Stokes b005709ed1 Recommend bucket versioning for S3 remote state. (#6456) 2016-05-03 17:54:53 +02:00
Joe Topjian 8f2b6e8127 Merge pull request #6410 from cristicalin/neutron_security_groups_v1
provider/openstack: implement neutron security groups and rules
2016-05-03 08:18:41 -06:00
Cristian Calin 6fe82696d2 provider/openstack: Neutron security group resources
this implements two new resource types:
* openstack_networking_secgroup_v2 - create a neutron security group
* openstack_networking_secgroup_rule_v2 - create a newutron security
  group rule
Unlike their nova counterparts the neutron security groups allow a user
to specify the target tenant_id allowing a cloud admin to create per
tenant resources.
2016-05-03 09:18:48 +00:00