Skip to content

Commit c4fc208

Browse files
authored
Merge pull request #3 from pingidentity/PDI-2053a-level-set
Align pingidentity repository with development changes
2 parents 119602b + 3d171e6 commit c4fc208

File tree

7 files changed

+231
-60
lines changed

7 files changed

+231
-60
lines changed

README.md

Lines changed: 184 additions & 52 deletions
Large diffs are not rendered by default.

img/githubissuerequest.png

62.8 KB
Loading

img/githubissuerequestapp.png

-82.4 KB
Binary file not shown.

scripts/local_feature_deploy.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ usage ()
1212
{
1313
cat <<END_USAGE
1414
Usage:
15-
This script is used to run terraform apply for your local feature branch only.
15+
This script defaults to running \`terraform apply\` for your local feature branch only.
1616
This script should be run from the root of the repository.
17-
Terraform Secrets (\`localsecrets\` file) should be sourced and exported in the evironment
17+
Terraform secrets (\`localsecrets\` file) should be sourced and exported in the environment
1818
1919
{options}
2020
where {options} include:
2121
-d, --destroy
2222
Run terraform destroy instead of apply
23+
--dry-run
24+
Show what Terraform will do without applying changes (terraform plan)
2325
-g, --generate
2426
Generate terraform resources from import blocks
2527
END_USAGE
@@ -37,6 +39,8 @@ while ! test -z ${1} ; do
3739
case "${1}" in
3840
-d|--destroy)
3941
_command="destroy" ;;
42+
--dry-run)
43+
_command="plan" ;; # Switch to terraform plan for dry-run
4044
-g|--generate)
4145
_command="plan -generate-config-out=generated-platform.tf" ;;
4246
-v|--verbose)
@@ -79,11 +83,10 @@ terraform -chdir="${TFDIR}" init -migrate-state \
7983
-backend-config="region=${_region}" \
8084
-backend-config="key=${_key}"
8185

82-
## terraform apply
86+
## run terraform with the required parameters
8387

84-
echo "Running terraform apply for branch: ${_branch}, You will be prompted to enter the required variables."
88+
echo "Running terraform ${_command} for branch: ${_branch}, You will be prompted to enter the required variables."
8589

8690
export TF_VAR_pingone_environment_name="${_branch}"
8791

8892
terraform -chdir="${TFDIR}" ${_command}
89-

secretstemplate

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
##########################################
2+
# The following fields are from the platform secrets
3+
# used to deploy the environments. Specifically, from
4+
# the PingOne Administrator Worker Application
5+
##########################################
6+
export TF_VAR_pingone_client_id=''
7+
export TF_VAR_pingone_client_secret=''
8+
export TF_VAR_pingone_client_environment_id=''
9+
# The following is one of: "AP | AU | CA | EU | NA"
10+
export TF_VAR_pingone_client_region_code=''
11+
12+
##########################################
13+
# The following fields are the Davinci Admin
14+
# environment and credentials from platform secrets
15+
##########################################
16+
export TF_VAR_pingone_davinci_admin_username=''
17+
export TF_VAR_pingone_davinci_admin_password=''
18+
export TF_VAR_pingone_davinci_admin_environment_id=''
19+
# The following is one of: NorthAmerica | Canada | Asia | Europe
20+
export TF_VAR_pingone_davinci_admin_region=''
21+
export PINGONE_TARGET_ENVIRONMENT_ID_PROD=''
22+
export PINGONE_TARGET_ENVIRONMENT_ID_QA=''
23+
24+
##########################################
25+
# S3 credentials and information for storing state
26+
##########################################
27+
# aws credentials and information for dev environment
28+
export AWS_ACCESS_KEY_ID=''
29+
export AWS_SECRET_ACCESS_KEY=''
30+
# bucket name for storing state - for example, 'ping-terraform-demo-mycompany'
31+
export TF_VAR_tf_state_bucket=''
32+
# region for storing state - for example, 'us-west-1'
33+
export TF_VAR_tf_state_region='us-west-1'
34+
# DO NOT EDIT, this will be suffixed with the branch name during script deployment
35+
# for example, 'application-state/dev/myfeature/terraform.tfstate'
36+
export TF_VAR_tf_state_key_prefix="application-state"

terraform/customer_simple_registration.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ resource "docker_image" "registration" {
9191
resource "docker_container" "registration" {
9292
name = "simple-registration"
9393
image = docker_image.registration.image_id
94+
network_mode = "bridge"
9495
ports {
9596
internal = 8443
9697
external = 8443

terraform/versions.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ terraform {
33
required_providers {
44
pingone = {
55
source = "pingidentity/pingone"
6-
version = "~> 1.0.0"
6+
version = ">= 1.1.1, < 2.0.0"
77
}
88
davinci = {
99
source = "pingidentity/davinci"
10-
version = ">= 0.2.1, < 1.0.0"
10+
version = "~> 0.4"
1111
}
1212
docker = {
1313
source = "kreuzwerker/docker"
@@ -21,4 +21,3 @@ terraform {
2121
backend "s3" {
2222
}
2323
}
24-

0 commit comments

Comments
 (0)