This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| locals { | |
| subnet_count = 3 | |
| availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"] | |
| } | |
| resource "aws_subnet" "terraform-blue-green" { | |
| count = "${local.subnet_count}" | |
| vpc_id = "${var.vpc_id}" | |
| availability_zone = "${element(local.availability_zones, count.index)}" | |
| cidr_block = "10.0.${local.subnet_count * (var.infrastructure_version - 1) + count.index + 1}.0/24" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "vpc_id" { | |
| default = "yourvpcid" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "infrastructure_version" { | |
| default = "1" | |
| } | |
| provider "aws" { | |
| region = "us-west-2" | |
| } | |
| terraform { | |
| backend "s3" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const platformSpecific = ({ios, android}) => (Platform.OS == ‘ios’) ? ios : android | |
| <View style={{ color: platformSpecific({ ios: 'black', android: 'white' }) }}/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const clear = (favoriteId) => state => ... | |
| const fetching = (favoriteId) => state => ... | |
| const finishFetching = (favoriteId, favorite) => state => ... | |
| export default (state = {}, action) => { | |
| switch (action.type) { | |
| case 'CLEAR_FAVORITE': | |
| return clear(action.favoriteId)(state); | |
| case 'FETCHING_FAVORITE': | |
| return fetching(action.favoriteId)(state); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mapDispatchToProps = (dispatch, props) => ({ | |
| onSelectFavorite: (favorite) => { | |
| props.onSelectFavorite(favorite); | |
| dispatch(fetchFavoriteInfo(favorite.id)); | |
| } | |
| }) | |
| const mapStateToProps = (state) => ({ | |
| favorites: state.favorites | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 8778879, | |
| "name": "Majestic SC Panoramic w/Queen bed", | |
| "typeText": "Entire home", | |
| "instantBook": true, | |
| "price": 79, | |
| "starRating": 5, | |
| "reviewsCount": 40, | |
| "previewImageURL": "https://a0.muscache.com/im/pictures/a5d62823-d3bc-4f58-b946-f4898a3c519d.jpg?aki_policy=x_medium", |
NewerOlder